On Mon, Dec 19, 2005 at 09:13:50AM +1100, Benjamin Herrenschmidt wrote:
> On Sun, 2005-12-18 at 13:50 -0800, Greg KH wrote:
>
> > Yes it is, and I have a patch in my tree now that fixes this up and
> > keeps the suspend process working properly for usb drivers that do not
> > have a suspend function.
> >
> > Hm, I wonder if it should go in for 2.6.15?
>
> Do you have an URL I can send to those users to test ?
Here's the patch itself, feel free to spread it around.
It's also at:
kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/usb/usbcore-allow-suspend-resume-even-if-drivers-don-t-support-it.patch
thanks,
greg k-h
>From [email protected] Wed Dec 14 09:39:01 2005
Date: Wed, 14 Dec 2005 12:22:17 -0500 (EST)
From: Alan Stern <[email protected]>
To: Greg KH <[email protected]>
cc: Carl-Daniel Hailfinger <[email protected]>
Subject: [PATCH] usbcore: allow suspend/resume even if drivers don't support it
Message-ID: <[email protected]>
This patch (as618) changes usbcore to prevent derailing the
suspend/resume sequence when a USB driver doesn't include support for
it. This is a workaround rather than a true fix; the core needs to be
changed so that URB submissions from suspended drivers can be refused
and outstanding URBs cancelled.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/core/usb.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- gregkh-2.6.orig/drivers/usb/core/usb.c
+++ gregkh-2.6/drivers/usb/core/usb.c
@@ -1029,7 +1029,8 @@ static int usb_generic_suspend(struct de
mark_quiesced(intf);
} else {
// FIXME else if there's no suspend method, disconnect...
- dev_warn(dev, "no %s?\n", "suspend");
+ dev_warn(dev, "no suspend for driver %s?\n", driver->name);
+ mark_quiesced(intf);
status = 0;
}
return status;
@@ -1057,8 +1058,10 @@ static int usb_generic_resume(struct dev
}
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);
@@ -1078,7 +1081,7 @@ static int usb_generic_resume(struct dev
mark_quiesced(intf);
}
} else
- dev_warn(dev, "no %s?\n", "resume");
+ dev_warn(dev, "no resume for driver %s?\n", driver->name);
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]