[RFC PATCH 5/5] xhci-pci: Use flag to not register roothub while adding primary HCD

From: Kishon Vijay Abraham I
Date: Tue Aug 24 2021 - 06:53:48 EST


Invoke __usb_hcd_pci_probe() without setting "register_hub" so that
primary roothub is not registered here. Instead it will be registered
along with secondary roothub. This is required for cold plugged USB
devices to be detected in certain PCIe USB cards (like Inateck USB
card).

Signed-off-by: Kishon Vijay Abraham I <kishon@xxxxxx>
---
drivers/usb/host/xhci-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 1c9a7957c45c..7734ff13aea9 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -397,7 +397,7 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
* to say USB 2.0, but I'm not sure what the implications would be in
* the other parts of the HCD code.
*/
- retval = usb_hcd_pci_probe(dev, id, &xhci_pci_hc_driver);
+ retval = __usb_hcd_pci_probe(dev, id, &xhci_pci_hc_driver, 0);

if (retval)
goto put_runtime_pm;
--
2.17.1