RE: [PATCH net] r8152: use cancel_delayed_work for runtime suspend

2014-10-19 Thread Hayes Wang
Oliver Neukum [mailto:oli...@neukum.org] > Sent: Sunday, October 19, 2014 3:48 AM [...] > The diagnosis is good, the fix is not good. It opens a race > during which the queued work can touch a suspended device. The delayed work would wake up the device by calling usb_autopm_get_interface() befor

Re: [PATCH net] r8152: use cancel_delayed_work for runtime suspend

2014-10-18 Thread Oliver Neukum
On Fri, 2014-10-17 at 13:55 +0800, Hayes Wang wrote: > It would cause dead lock for runtime suspend, when the workqueue > is running and runtime suspend occurs before the workqueue wakes > up the device. The rtl8152_suspend() waits the workqueue to finish > because of calling cancel_delayed_work_sy

Re: [PATCH net] r8152: use cancel_delayed_work for runtime suspend

2014-10-17 Thread Bjørn Mork
Hayes Wang writes: > It would cause dead lock for runtime suspend, when the workqueue > is running and runtime suspend occurs before the workqueue wakes > up the device. The rtl8152_suspend() waits the workqueue to finish > because of calling cancel_delayed_work_sync(). The workqueue waits > the

[PATCH net] r8152: use cancel_delayed_work for runtime suspend

2014-10-16 Thread Hayes Wang
It would cause dead lock for runtime suspend, when the workqueue is running and runtime suspend occurs before the workqueue wakes up the device. The rtl8152_suspend() waits the workqueue to finish because of calling cancel_delayed_work_sync(). The workqueue waits the suspend function to finish for