usb-xhci: add delay in shutdown path

QEMU implementation of XHCI doesn't implement halt properly. There might
be ongoing activities and active DMAs, introduce 50ms delay during
shutdown path.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
This commit is contained in:
Nikunj A Dadhania 2015-09-18 14:16:57 +05:30 committed by Alexey Kardashevskiy
parent 41c2c5df4f
commit 2a37eb9a6a
1 changed files with 12 additions and 0 deletions

View File

@ -870,6 +870,18 @@ static bool xhci_hcd_exit(struct xhci_hcd *xhcd)
SLOF_dma_map_out(xhcd->dcbaap_dma, (void *)xhcd->dcbaap, XHCI_DCBAAP_MAX_SIZE);
SLOF_dma_free((void *)xhcd->dcbaap, XHCI_DCBAAP_MAX_SIZE);
}
/*
* QEMU implementation of XHCI doesn't implement halt
* properly. It basically says that it's halted immediately
* but doesn't actually terminate ongoing activities and
* DMAs. This needs to be fixed in QEMU.
*
* For now, wait for 50ms grace time till qemu stops using
* this device.
*/
SLOF_msleep(50);
return true;
}