提交 cf7d3c8e 编写于 作者: P Philippe Skowronski 提交者: Greg Kroah-Hartman

usb: langwell_udc: cancel pending requests when controller is suspended.

It is safer to cancel pending requests before free dTD and dQH when
controller enters suspend state.
Signed-off-by: NPhilippe Skowronski <philippe.skowronski@intel.com>
Signed-off-by: NHao Wu <hao.wu@intel.com>
[Switch to spin_lock_irq as suggested by Alan Stern]
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 c8458d59
......@@ -3391,6 +3391,11 @@ static int langwell_udc_suspend(struct pci_dev *pdev, pm_message_t state)
/* 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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册