It is safer to cancel pending requests before free dTD and dQH when
controller enters suspend state.
Change-Id: I5cb342093934af111ce70911908f492914c3001e
Signed-off-by: Philippe Skowronski <philippe.skowronski@intel.com>
Signed-off-by: Hao Wu <hao.wu@intel.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
static int langwell_udc_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct langwell_udc *dev = the_controller;
+ unsigned long flags;
dev_dbg(&dev->pdev->dev, "---> %s()\n", __func__);
free_irq(pdev->irq, dev);
dev->got_irq = 0;
+ spin_lock_irqsave(&dev->lock, flags);
+ /* stop all usb activities */
+ stop_activity(dev, dev->driver);
+ spin_unlock_irqrestore(&dev->lock, flags);
+
/* save PCI state */
pci_save_state(pdev);