Alan, I'm starting to get some complaints about this issue (almost no
usb drivers have a suspend/resume function, nor should they be required
to.)

Mind if I add the patch below to the tree?

thanks,

greg k-h


On Wed, Dec 07, 2005 at 11:30:48AM -0500, Alan Stern wrote:
> Darn it.  There were two problem pathways in that code and the patch 
> changed the wrong one.  Okay, this patch changes both.
> 
> Bear in mind that this is just a temporary band-aid.  The real problem is 
> that the usblp driver doesn't have any suspend/resume support.  That still 
> needs to be fixed.
> 
> If you don't feel like using the patch below, you can simply rmmod usblp
> before suspending and modprobe usblp after resuming.  That's actually a
> safer approach.
> 
> Alan Stern
> 
> 
> 
> Index: linux-2.6.15-rc3/drivers/usb/core/usb.c
> ===================================================================
> --- linux-2.6.15-rc3.orig/drivers/usb/core/usb.c
> +++ linux-2.6.15-rc3/drivers/usb/core/usb.c
> @@ -1414,8 +1414,10 @@ static int usb_generic_suspend(struct de
>       }
>  
>       if ((dev->driver == NULL) ||
> -         (dev->driver_data == &usb_generic_driver_data))
> +         (dev->driver_data == &usb_generic_driver_data)) {
> +             dev->power.power_state.event = PM_EVENT_FREEZE;
>               return 0;
> +     }
>  
>       intf = to_usb_interface(dev);
>       driver = to_usb_driver(dev->driver);
> @@ -1433,6 +1435,7 @@ static int usb_generic_suspend(struct de
>       } else {
>               // FIXME else if there's no suspend method, disconnect...
>               dev_warn(dev, "no %s?\n", "suspend");
> +             mark_quiesced(intf);
>               status = 0;
>       }
>       return status;
> 
> 
> 
> -------------------------------------------------------
> 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

-- 


-------------------------------------------------------
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