Re: pre_reset() in bas-gigaset.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 12, 2012 at 5:26 PM, Tilman Schmidt <tilman@xxxxxxx> wrote:

>
> Good point. I'll have to think about that.
>
> At first sight, I can simply omit the cancel_work_sync() in
> the pre_reset() case. In the worst case, the uncancelled
> int_in_work() will call usb_clear_halt(), try to resubmit the
> already submitted URB, fail, and trigger another reset
> needlessly. Doesn't sound too bad?
>
> The alternative would be to introduce a new flag in the device
> state to skip the cancel_work_sync() call if int_in_work() is
> in the call to usb_reset_device().

The above is not good, running pre_reset() means that the
device is being reset and the device lock has been held,
so int_in_work() can't acquire the device lock and complete
the reset.

On easy solution is that skipping reset device in int_in_work()
if the device is being reset.


Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux