On Friday 09 December 2005 8:01 pm, Greg KH wrote:
> On Fri, Dec 09, 2005 at 09:40:50PM -0500, Alan Stern wrote:
> > -           if (usb_submit_urb(usblp->readurb, GFP_KERNEL) < 0)
> > +           if (usblp->suspended || usb_submit_urb(usblp->readurb,
> > +                           GFP_KERNEL) < 0)
> >                     dbg("error submitting urb");
> 
> Why is this needed?  Every driver should not have to check to see if it
> is suspended, the usb core should handle this for us, like it does for
> removed devices.
> 
> If it does not, then it needs to be fixed :)

There's already a check "is the usb_device suspended".

What's not there is a "is the usb_interface associated with this
usb_host_endpoint suspended" check.  And that's a bit more complicated
to do, although it does seem at least possible nowadays.

Agreed about not wanting to modify every driver for this.  :)

- Dave



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to