It is safer to cancel pending requests before free dTD and dQH when
controller enters suspend state.
Signed-off-by: Philippe Skowronski <[email protected]>
Signed-off-by: Hao Wu <[email protected]>
[Switch to spin_lock_irq as suggested by Alan Stern]
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
/* save PCI state */
pci_save_state(pdev);
+ spin_lock_irq(&dev->lock);
+ /* stop all usb activities */
+ stop_activity(dev, dev->driver);
+ spin_unlock_irq(&dev->lock);
+
/* free dTD dma_pool and dQH */
if (dev->dtd_pool)
dma_pool_destroy(dev->dtd_pool);