DM USB: xHCI: fix incorrect device searching logic

The function pci_xhci_get_native_port_index_by_path didn't
compare the bus number during the process of native USB
device searching. This patch is used to fix it.

Tracked-On: #1434
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Liang Yang <liang3.yang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
Xiaoguang Wu 2018-10-18 17:45:26 +08:00 committed by Xie, Nanlin
parent 6b2a18a866
commit ecf0585bf2

View File

@ -548,6 +548,9 @@ pci_xhci_get_native_port_index_by_path(struct pci_xhci_vdev *xdev,
for (i = 0; i < XHCI_MAX_VIRT_PORTS; i++) {
p = &xdev->native_ports[i].info.path;
if (p->bus != path->bus)
continue;
if (p->depth != path->depth)
continue;