This is a note to let you know that I've just added the patch titled
Subject: USB: fix interface sysfs file-creation bug
to my gregkh-2.6 tree. Its filename is
usb-fix-interface-sysfs-file-creation-bug.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From [email protected] Wed Oct 24 14:21:21 2007
From: Alan Stern <[email protected]>
Date: Fri, 19 Oct 2007 09:51:58 -0400 (EDT)
Subject: USB: fix interface sysfs file-creation bug
To: Greg KH <[email protected]>
Cc: USB development list <[email protected]>
Message-ID: <[email protected]>
This patch (as1005) fixes a rather subtle problem. When
usb_set_configuration() registers the interfaces and their files in
sysfs, it doesn't expect those files to exist already. But when an
interface is registered, its driver may call usb_set_interface() and
thereby cause the sysfs files to be created. The result is an error
when usb_set_configuration() goes on to create those same files again.
The (not-so-great) solution is to have usb_set_configuration() remove
any existing files before creating them.
Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/core/message.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1641,7 +1641,13 @@ free_interfaces:
intf->dev.bus_id, ret);
continue;
}
- usb_create_sysfs_intf_files (intf);
+
+ /* The driver's probe method can call usb_set_interface(),
+ * which would mean the interface's sysfs files are already
+ * created. Just in case, we'll remove them first.
+ */
+ usb_remove_sysfs_intf_files(intf);
+ usb_create_sysfs_intf_files(intf);
}
usb_autosuspend_device(dev);
Patches currently in gregkh-2.6 which might be from [email protected] are
driver/pm-acquire-device-locks-prior-to-suspending.patch
usb/usb-fix-scheduling-of-iso-urbs-in-uhci-hcd.patch
usb/usb-autosuspend-for-cdc-acm.patch
usb/usb-fix-interface-sysfs-file-creation-bug.patch
usb/usb-storage-always-set-the-allow_restart-flag.patch
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.