DM USB: xHCI: fix error logic of allocating xHCI slot

The 'slot_allocated[]' field of pci_xhci_vdev is used as flag of
slot allocation. In current design, this variable is not set to
false in disconnection callback 'pci_xhci_native_usb_dev_disconn_cb'.
This patch is used to fix it.

Tracked-On: #1894
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-11-12 16:58:00 +08:00 committed by wenlingz
parent 32c4ce9b9a
commit 5b39fd0ed3
1 changed files with 1 additions and 0 deletions

View File

@ -836,6 +836,7 @@ pci_xhci_native_usb_dev_disconn_cb(void *hci_data, void *dev_data)
edev->dev_slotstate = XHCI_ST_DISABLED;
xdev->devices[vport] = NULL;
xdev->slots[slot] = NULL;
xdev->slot_allocated[slot] = false;
pci_xhci_dev_destroy(edev);
need_intr = 0;
return 0;