On Fri, Aug 17, 2012 at 03:05:15PM +0200, Oliver Neukum wrote:
> On Friday 17 August 2012 15:01:16 Sebastian Andrzej Siewior wrote:
> > > It is possible that you get  -ENOMEM while a command is already being
> > > executed. The worst case is probably that you got a command to the device
> > > and you need to do autosense, but you get -ENOMEM.
> > 
> > Looking at the code, I see that we have have anchors so were are good. 
> > Except
> > for the cmd_urb.
> > That means the endless re-try loops stops once you plug the cable.
> 
> I am afraid this is not entirely true. Somebody may do a soft disconnect 
> (sysfs)
> between scheduling the work and executing it. In that case the work function
> will happily submit URBs to an interface it is no longer bound to. And as the 
> work
> is shared we cannot simply shut it down in disconnect()

I see. So the problem is that we have it in the uas_work_list and
uas_disconnect() frees that URB which we re-submit.
So the obvious thing would be something per-interface but do need this
re-submit at all?

> 
>       Regards
>               Oliver
> 

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

Reply via email to