diff options
| author | Mark Brown <broonie@kernel.org> | 2024-03-18 17:30:46 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2024-03-18 17:30:46 +0000 |
| commit | 5bd249aec71d75f0088357e4aba27fde0610f823 (patch) | |
| tree | ed63b21b48b711430492734564775758a39eb94c /drivers/usb/core/port.c | |
| parent | 7397175cb7b48f7a3fc699083aa46f1234904c7e (diff) | |
| parent | e8f897f4afef0031fe618a8e94127a0934896aba (diff) | |
spi: Merge up v6.8 release
An i.MX fix depends on other fixes that were sent to v6.8.
Diffstat (limited to 'drivers/usb/core/port.c')
| -rw-r--r-- | drivers/usb/core/port.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index c628c1abc907..4d63496f98b6 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -573,7 +573,7 @@ static int match_location(struct usb_device *peer_hdev, void *p) struct usb_hub *peer_hub = usb_hub_to_struct_hub(peer_hdev); struct usb_device *hdev = to_usb_device(port_dev->dev.parent->parent); - if (!peer_hub) + if (!peer_hub || port_dev->connect_type == USB_PORT_NOT_USED) return 0; hcd = bus_to_hcd(hdev->bus); @@ -584,7 +584,8 @@ static int match_location(struct usb_device *peer_hdev, void *p) for (port1 = 1; port1 <= peer_hdev->maxchild; port1++) { peer = peer_hub->ports[port1 - 1]; - if (peer && peer->location == port_dev->location) { + if (peer && peer->connect_type != USB_PORT_NOT_USED && + peer->location == port_dev->location) { link_peers_report(port_dev, peer); return 1; /* done */ } |