* [GIT PATCH] USB fixes for suspend issues
@ 2006-06-23 5:57 Greg KH
2006-06-23 5:58 ` [PATCH 1/2] [PATCH] USB: get USB suspend to work again Greg KH
2006-06-23 6:27 ` [GIT PATCH] USB fixes for suspend issues Linus Torvalds
0 siblings, 2 replies; 4+ messages in thread
From: Greg KH @ 2006-06-23 5:57 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, linux-usb-devel
Here are the two patches that fix the suspend issue and the USB oops
issue in your current tree.
Please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/
The full patches will be sent to the linux-kernel mailing list, if
anyone wants to see them.
thanks,
greg k-h
drivers/base/core.c | 19 +++++++++++--------
drivers/usb/core/usb.c | 2 ++
2 files changed, 13 insertions(+), 8 deletions(-)
---------------
Greg Kroah-Hartman:
USB: get USB suspend to work again
Driver core: fix locking issues with the devices that are attached to classes
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] [PATCH] USB: get USB suspend to work again 2006-06-23 5:57 [GIT PATCH] USB fixes for suspend issues Greg KH @ 2006-06-23 5:58 ` Greg KH 2006-06-23 5:58 ` [PATCH 2/2] [PATCH] Driver core: fix locking issues with the devices that are attached to classes Greg KH 2006-06-23 6:27 ` [GIT PATCH] USB fixes for suspend issues Linus Torvalds 1 sibling, 1 reply; 4+ messages in thread From: Greg KH @ 2006-06-23 5:58 UTC (permalink / raw) To: linux-kernel; +Cc: linux-usb-devel, Greg Kroah-Hartman From: Greg Kroah-Hartman <gregkh@suse.de> Yeah, it's a hack, but it is only temporary until Alan's patches reworking this area make it in. We really should not care what devices below us are doing, especially when we do not really know what type of devices they are. This patch relies on the fact that the endpoint devices do not have a driver assigned to us. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/usb/core/usb.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 5153107..fb488c8 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -991,6 +991,8 @@ void usb_buffer_unmap_sg (struct usb_dev static int verify_suspended(struct device *dev, void *unused) { + if (dev->driver == NULL) + return 0; return (dev->power.power_state.event == PM_EVENT_ON) ? -EBUSY : 0; } -- 1.4.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] [PATCH] Driver core: fix locking issues with the devices that are attached to classes 2006-06-23 5:58 ` [PATCH 1/2] [PATCH] USB: get USB suspend to work again Greg KH @ 2006-06-23 5:58 ` Greg KH 0 siblings, 0 replies; 4+ messages in thread From: Greg KH @ 2006-06-23 5:58 UTC (permalink / raw) To: linux-kernel; +Cc: linux-usb-devel, Greg Kroah-Hartman From: Greg Kroah-Hartman <gregkh@suse.de> Doh, that was foolish... Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/base/core.c | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index d0f84ff..27c2176 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -356,6 +356,13 @@ int device_add(struct device *dev) if (parent) klist_add_tail(&dev->knode_parent, &parent->klist_children); + if (dev->class) { + /* tie the class to the device */ + down(&dev->class->sem); + list_add_tail(&dev->node, &dev->class->devices); + up(&dev->class->sem); + } + /* notify platform of device entry */ if (platform_notify) platform_notify(dev); @@ -455,6 +462,9 @@ void device_del(struct device * dev) sysfs_remove_link(&dev->kobj, "device"); sysfs_remove_link(&dev->parent->kobj, class_name); kfree(class_name); + down(&dev->class->sem); + list_del_init(&dev->node); + up(&dev->class->sem); } device_remove_file(dev, &dev->uevent_attr); @@ -601,11 +611,6 @@ struct device *device_create(struct clas if (retval) goto error; - /* tie the class to the device */ - down(&class->sem); - list_add_tail(&dev->node, &class->devices); - up(&class->sem); - return dev; error: @@ -636,9 +641,7 @@ void device_destroy(struct class *class, } up(&class->sem); - if (dev) { - list_del_init(&dev->node); + if (dev) device_unregister(dev); - } } EXPORT_SYMBOL_GPL(device_destroy); -- 1.4.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [GIT PATCH] USB fixes for suspend issues 2006-06-23 5:57 [GIT PATCH] USB fixes for suspend issues Greg KH 2006-06-23 5:58 ` [PATCH 1/2] [PATCH] USB: get USB suspend to work again Greg KH @ 2006-06-23 6:27 ` Linus Torvalds 1 sibling, 0 replies; 4+ messages in thread From: Linus Torvalds @ 2006-06-23 6:27 UTC (permalink / raw) To: Greg KH; +Cc: Andrew Morton, linux-kernel, linux-usb-devel On Thu, 22 Jun 2006, Greg KH wrote: > > Here are the two patches that fix the suspend issue and the USB oops > issue in your current tree. Ack. My box works again with this. Linus ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-23 6:27 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-06-23 5:57 [GIT PATCH] USB fixes for suspend issues Greg KH 2006-06-23 5:58 ` [PATCH 1/2] [PATCH] USB: get USB suspend to work again Greg KH 2006-06-23 5:58 ` [PATCH 2/2] [PATCH] Driver core: fix locking issues with the devices that are attached to classes Greg KH 2006-06-23 6:27 ` [GIT PATCH] USB fixes for suspend issues Linus Torvalds
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox