]> git.baikalelectronics.ru Git - kernel.git/commit
bas_gigaset: fix pre_reset handling
authorTilman Schmidt <tilman@imap.cc>
Wed, 24 Oct 2012 08:44:32 +0000 (08:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Oct 2012 06:20:36 +0000 (02:20 -0400)
commitb85e05d36d948f44c86f3c57ec2fed300946dd6a
tree3a7b4adf2480e45fdc07702d2708291a496a7c9b
parentf8d36709160d5eddf79e97bf7346327f9c04a3e6
bas_gigaset: fix pre_reset handling

The delayed work function int_in_work() may call usb_reset_device()
and thus, indirectly, the driver's pre_reset method. Trying to
cancel the work synchronously in that situation would deadlock.
Fix by avoiding cancel_work_sync() in the pre_reset method.

If the reset was NOT initiated by int_in_work() this might cause
int_in_work() to run after the post_reset method, with urb_int_in
already resubmitted, so handle that case gracefully.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/gigaset/bas-gigaset.c