From e5ea3c44c8894774d326e4fcc2fdccaab8961e4f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 1 Feb 2023 13:36:15 +0000 Subject: [PATCH] Revert "xhci: Add update_hub_device override for PCI xHCI hosts" This reverts commit 83e3a5be7475c4b1670b4f3a57728287077cec9e which is commit 23a3b8d5a2365653fd9bc5a9454d1e7f4facbf85 upstream. It breaks the android kernel abi and is not needed for android at this point in time as the USB3 issues it resolves are not in Android devices. If this is needed in the future, it can be brought back in an ABI-safe way. Bug: 161946584 Change-Id: Iccadc22dd77b1c9f6f0c20c8f0ed4b554762b899 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-pci.c | 9 --------- drivers/usb/host/xhci.c | 5 +---- drivers/usb/host/xhci.h | 4 ---- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 90c71979ba5e..88248a09fdaa 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -77,12 +77,9 @@ static const char hcd_name[] = "xhci_hcd"; static struct hc_driver __read_mostly xhci_pci_hc_driver; static int xhci_pci_setup(struct usb_hcd *hcd); -static int xhci_pci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev, - struct usb_tt *tt, gfp_t mem_flags); static const struct xhci_driver_overrides xhci_pci_overrides __initconst = { .reset = xhci_pci_setup, - .update_hub_device = xhci_pci_update_hub_device, }; /* called after powerup, by probe or system-pm "wakeup" */ @@ -385,12 +382,6 @@ static int xhci_pci_setup(struct usb_hcd *hcd) return xhci_pci_reinit(xhci, pdev); } -static int xhci_pci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev, - struct usb_tt *tt, gfp_t mem_flags) -{ - return xhci_update_hub_device(hcd, hdev, tt, mem_flags); -} - /* * We need to register our own PCI probe function (instead of the USB core's * function) in order to create a second roothub under xHCI. diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 380d3d3b4705..cdb65d40810b 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -5075,7 +5075,7 @@ static int xhci_disable_usb3_lpm_timeout(struct usb_hcd *hcd, /* Once a hub descriptor is fetched for a device, we need to update the xHC's * internal data structures for the device. */ -int xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev, +static int xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev, struct usb_tt *tt, gfp_t mem_flags) { struct xhci_hcd *xhci = hcd_to_xhci(hcd); @@ -5184,7 +5184,6 @@ int xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev, xhci_free_command(xhci, config_cmd); return ret; } -EXPORT_SYMBOL_GPL(xhci_update_hub_device); static int xhci_get_frame(struct usb_hcd *hcd) { @@ -5465,8 +5464,6 @@ void xhci_init_driver(struct hc_driver *drv, drv->bus_suspend = over->bus_suspend; if (over->bus_resume) drv->bus_resume = over->bus_resume; - if (over->update_hub_device) - drv->update_hub_device = over->update_hub_device; } } EXPORT_SYMBOL_GPL(xhci_init_driver); diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index b17a6c7b866d..782cee6d5e7e 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1962,8 +1962,6 @@ struct xhci_driver_overrides { int (*address_device)(struct usb_hcd *hcd, struct usb_device *udev); int (*bus_suspend)(struct usb_hcd *hcd); int (*bus_resume)(struct usb_hcd *hcd); - int (*update_hub_device)(struct usb_hcd *hcd, struct usb_device *hdev, - struct usb_tt *tt, gfp_t mem_flags); }; #define XHCI_CFC_DELAY 10 @@ -2121,8 +2119,6 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev, int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev); -int xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev, - struct usb_tt *tt, gfp_t mem_flags); int xhci_disable_slot(struct xhci_hcd *xhci, u32 slot_id); int xhci_ext_cap_init(struct xhci_hcd *xhci);