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 :) > +#ifdef CONFIG_PM Do we really need the #ifdef? > +static int usblp_suspend(struct usb_interface *intf, pm_message_t message) > +{ > + struct usblp *usblp = usb_get_intfdata(intf); > + > + down(&usblp->sem); > + usblp->suspended = 1; > + usblp_unlink_urbs(usblp); > + intf->dev.power.power_state.event = message.event; Shouldn't this line be done by the usb core? > + up(&usblp->sem); > + return 0; > +} > + > +static int usblp_resume(struct usb_interface *intf) > +{ > + struct usblp *usblp = usb_get_intfdata(intf); > + > + down(&usblp->sem); > + usblp->suspended = 0; > + intf->dev.power.power_state.event = PM_EVENT_ON; Same here, the core should do this for us. And yes, I know I've been ignoring your and David's pm changes to the usb core, sorry. But making all USB drivers handle things this way isn't going to work out. thanks, greg k-h ------------------------------------------------------- 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