diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-24 16:43:12 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-24 16:43:12 -0700 |
| commit | b87d4000bd66e6b959468489753200fab5a2fda2 (patch) | |
| tree | 496fa3bb30afecbe4a991f05f33431725dc4bb3e /usb | |
| parent | b26c3a996515d6ea9be8d840f8973c5892c9961c (diff) | |
| download | patches-b87d4000bd66e6b959468489753200fab5a2fda2.tar.gz | |
usb patches and other fun.
Diffstat (limited to 'usb')
| -rw-r--r-- | usb/nls-utf8_wcstombs-fix-buffer-overflow.patch | 34 | ||||
| -rw-r--r-- | usb/nls-utf8_wcstombs-use-correct-buffer-size-in-error-case.patch | 30 | ||||
| -rw-r--r-- | usb/usb-add-the-usbfs-devices-file-to-debugfs.patch | 70 | ||||
| -rw-r--r-- | usb/usb-add-usb-debugfs-directory.patch | 79 | ||||
| -rw-r--r-- | usb/usb-ehci-use-the-new-usb-debugfs-directory.patch | 26 | ||||
| -rw-r--r-- | usb/usb-fhci-use-the-new-usb-debugfs-directory.patch | 26 | ||||
| -rw-r--r-- | usb/usb-ohci-use-the-new-usb-debugfs-directory.patch | 26 | ||||
| -rw-r--r-- | usb/usb-return-device-strings-in-utf-8.patch | 132 | ||||
| -rw-r--r-- | usb/usb-serial-ftdi-add-high-speed-device-support.patch | 18 | ||||
| -rw-r--r-- | usb/usb-uhci-use-the-new-usb-debugfs-directory.patch | 26 | ||||
| -rw-r--r-- | usb/usb-usbmon-use-the-new-usb-debugfs-directory.patch | 50 |
11 files changed, 508 insertions, 9 deletions
diff --git a/usb/nls-utf8_wcstombs-fix-buffer-overflow.patch b/usb/nls-utf8_wcstombs-fix-buffer-overflow.patch new file mode 100644 index 00000000000000..e09276df63eb61 --- /dev/null +++ b/usb/nls-utf8_wcstombs-fix-buffer-overflow.patch @@ -0,0 +1,34 @@ +From clemens@ladisch.de Fri Apr 24 15:32:58 2009 +From: Clemens Ladisch <clemens@ladisch.de> +Date: Fri, 24 Apr 2009 10:11:56 +0200 +Subject: nls: utf8_wcstombs: fix buffer overflow +To: Greg KH <greg@kroah.com> +Cc: Eugen Dedu <Eugen.Dedu@pu-pm.univ-fcomte.fr>, Alan Stern <stern@rowland.harvard.edu> +Message-ID: <49F1744C.9010203@ladisch.de> + + +utf8_wcstombs forgot to include one-byte UTF-8 characters when +calculating the output buffer size, i.e., theoretically, it was possible +to overflow the output buffer with an input string that contains enough +ASCII characters. + +In practice, this was no problem because the only user so far (VFAT) +always uses a big enough output buffer. + +Signed-off-by: Clemens Ladisch <clemens@ladisch.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + fs/nls/nls_base.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/nls/nls_base.c ++++ b/fs/nls/nls_base.c +@@ -150,6 +150,7 @@ utf8_wcstombs(__u8 *s, const wchar_t *pw + } + } else { + *op++ = (__u8) *ip; ++ maxlen--; + } + ip++; + } diff --git a/usb/nls-utf8_wcstombs-use-correct-buffer-size-in-error-case.patch b/usb/nls-utf8_wcstombs-use-correct-buffer-size-in-error-case.patch new file mode 100644 index 00000000000000..9ae94923bde110 --- /dev/null +++ b/usb/nls-utf8_wcstombs-use-correct-buffer-size-in-error-case.patch @@ -0,0 +1,30 @@ +From clemens@ladisch.de Fri Apr 24 15:32:40 2009 +From: Clemens Ladisch <clemens@ladisch.de> +Date: Fri, 24 Apr 2009 10:11:40 +0200 +Subject: nls: utf8_wcstombs: use correct buffer size in error case +To: Greg KH <greg@kroah.com> +Cc: Eugen Dedu <Eugen.Dedu@pu-pm.univ-fcomte.fr>, Alan Stern <stern@rowland.harvard.edu> +Message-ID: <49F1743C.3030705@ladisch.de> + + +When utf8_wcstombs encounters a character that cannot be encoded, we +must not decrease the remaining output buffer size because nothing has +been written to the output buffer. + +Signed-off-by: Clemens Ladisch <clemens@ladisch.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + fs/nls/nls_base.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/fs/nls/nls_base.c ++++ b/fs/nls/nls_base.c +@@ -144,7 +144,6 @@ utf8_wcstombs(__u8 *s, const wchar_t *pw + size = utf8_wctomb(op, *ip, maxlen); + if (size == -1) { + /* Ignore character and move on */ +- maxlen--; + } else { + op += size; + maxlen -= size; diff --git a/usb/usb-add-the-usbfs-devices-file-to-debugfs.patch b/usb/usb-add-the-usbfs-devices-file-to-debugfs.patch new file mode 100644 index 00000000000000..73ad17c89176dc --- /dev/null +++ b/usb/usb-add-the-usbfs-devices-file-to-debugfs.patch @@ -0,0 +1,70 @@ +From foo@baz Fri Apr 24 15:16:04 PDT 2009 +Date: Fri, 24 Apr 2009 15:16:04 -0700 +To: Greg KH <greg@kroah.com> +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: USB: add the usbfs devices file to debugfs + +People are very used to the devices file in usbfs. Now that we have +moved usbfs to be an "embedded" option only, the developers miss the +file, they had grown quite attached to it over all of these years. This +patch brings it back and puts it in the usb debugfs directory, so that +the developers don't feel sad anymore. + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/core/Makefile | 4 ++-- + drivers/usb/core/usb.c | 13 +++++++++++++ + 2 files changed, 15 insertions(+), 2 deletions(-) + +--- a/drivers/usb/core/Makefile ++++ b/drivers/usb/core/Makefile +@@ -4,14 +4,14 @@ + + usbcore-objs := usb.o hub.o hcd.o urb.o message.o driver.o \ + config.o file.o buffer.o sysfs.o endpoint.o \ +- devio.o notify.o generic.o quirks.o ++ devio.o notify.o generic.o quirks.o devices.o + + ifeq ($(CONFIG_PCI),y) + usbcore-objs += hcd-pci.o + endif + + ifeq ($(CONFIG_USB_DEVICEFS),y) +- usbcore-objs += inode.o devices.o ++ usbcore-objs += inode.o + endif + + obj-$(CONFIG_USB) += usbcore.o +--- a/drivers/usb/core/usb.c ++++ b/drivers/usb/core/usb.c +@@ -1005,16 +1005,29 @@ static struct notifier_block usb_bus_nb + struct dentry *usb_debug_root; + EXPORT_SYMBOL_GPL(usb_debug_root); + ++struct dentry *usb_debug_devices; ++ + static int usb_debugfs_init(void) + { + usb_debug_root = debugfs_create_dir("usb", NULL); + if (!usb_debug_root) + return -ENOENT; ++ ++ usb_debug_devices = debugfs_create_file("devices", 0444, ++ usb_debug_root, NULL, ++ &usbfs_devices_fops); ++ if (!usb_debug_devices) { ++ debugfs_remove(usb_debug_root); ++ usb_debug_root = NULL; ++ return -ENOENT; ++ } ++ + return 0; + } + + static void usb_debugfs_cleanup(void) + { ++ debugfs_remove(usb_debug_devices); + debugfs_remove(usb_debug_root); + } + diff --git a/usb/usb-add-usb-debugfs-directory.patch b/usb/usb-add-usb-debugfs-directory.patch new file mode 100644 index 00000000000000..7193549f89f3fd --- /dev/null +++ b/usb/usb-add-usb-debugfs-directory.patch @@ -0,0 +1,79 @@ +From foo@baz Fri Apr 24 14:56:26 PDT 2009 +Date: Fri, 24 Apr 2009 14:56:26 -0700 +To: Greg KH <greg@kroah.com> +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: USB: add usb debugfs directory + +Add a common usb directory in debugfs that the usb subsystem can use. + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/core/usb.c | 22 ++++++++++++++++++++++ + include/linux/usb.h | 3 +++ + 2 files changed, 25 insertions(+) + +--- a/drivers/usb/core/usb.c ++++ b/drivers/usb/core/usb.c +@@ -34,6 +34,7 @@ + #include <linux/usb.h> + #include <linux/mutex.h> + #include <linux/workqueue.h> ++#include <linux/debugfs.h> + + #include <asm/io.h> + #include <linux/scatterlist.h> +@@ -1001,6 +1002,22 @@ static struct notifier_block usb_bus_nb + .notifier_call = usb_bus_notify, + }; + ++struct dentry *usb_debug_root; ++EXPORT_SYMBOL_GPL(usb_debug_root); ++ ++static int usb_debugfs_init(void) ++{ ++ usb_debug_root = debugfs_create_dir("usb", NULL); ++ if (!usb_debug_root) ++ return -ENOENT; ++ return 0; ++} ++ ++static void usb_debugfs_cleanup(void) ++{ ++ debugfs_remove(usb_debug_root); ++} ++ + /* + * Init + */ +@@ -1012,6 +1029,10 @@ static int __init usb_init(void) + return 0; + } + ++ retval = usb_debugfs_init(); ++ if (retval) ++ goto out; ++ + retval = ksuspend_usb_init(); + if (retval) + goto out; +@@ -1083,6 +1104,7 @@ static void __exit usb_exit(void) + bus_unregister_notifier(&usb_bus_type, &usb_bus_nb); + bus_unregister(&usb_bus_type); + ksuspend_usb_cleanup(); ++ usb_debugfs_cleanup(); + } + + subsys_initcall(usb_init); +--- a/include/linux/usb.h ++++ b/include/linux/usb.h +@@ -1558,6 +1558,9 @@ extern void usb_unregister_notify(struct + #define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \ + format "\n" , ## arg) + ++/* debugfs stuff */ ++extern struct dentry *usb_debug_root; ++ + #endif /* __KERNEL__ */ + + #endif diff --git a/usb/usb-ehci-use-the-new-usb-debugfs-directory.patch b/usb/usb-ehci-use-the-new-usb-debugfs-directory.patch new file mode 100644 index 00000000000000..2c56b47df5a8f4 --- /dev/null +++ b/usb/usb-ehci-use-the-new-usb-debugfs-directory.patch @@ -0,0 +1,26 @@ +From foo@baz Fri Apr 24 15:13:18 PDT 2009 +Date: Fri, 24 Apr 2009 15:13:18 -0700 +To: Greg KH <greg@kroah.com> +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: USB: EHCI: use the new usb debugfs directory + +All usb debugfs files should be behind the usb directory, not at the +root of debugfs. + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ehci-hcd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/ehci-hcd.c ++++ b/drivers/usb/host/ehci-hcd.c +@@ -1097,7 +1097,7 @@ static int __init ehci_hcd_init(void) + sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); + + #ifdef DEBUG +- ehci_debug_root = debugfs_create_dir("ehci", NULL); ++ ehci_debug_root = debugfs_create_dir("ehci", usb_debug_root); + if (!ehci_debug_root) { + retval = -ENOENT; + goto err_debug; diff --git a/usb/usb-fhci-use-the-new-usb-debugfs-directory.patch b/usb/usb-fhci-use-the-new-usb-debugfs-directory.patch new file mode 100644 index 00000000000000..8335c1eac111f5 --- /dev/null +++ b/usb/usb-fhci-use-the-new-usb-debugfs-directory.patch @@ -0,0 +1,26 @@ +From foo@baz Fri Apr 24 15:14:25 PDT 2009 +Date: Fri, 24 Apr 2009 15:14:25 -0700 +To: Greg KH <greg@kroah.com> +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: USB: FHCI: use the new usb debugfs directory + +All usb debugfs files should be behind the usb directory, not at the +root of debugfs. + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/fhci-dbg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/fhci-dbg.c ++++ b/drivers/usb/host/fhci-dbg.c +@@ -108,7 +108,7 @@ void fhci_dfs_create(struct fhci_hcd *fh + { + struct device *dev = fhci_to_hcd(fhci)->self.controller; + +- fhci->dfs_root = debugfs_create_dir(dev_name(dev), NULL); ++ fhci->dfs_root = debugfs_create_dir(dev_name(dev), usb_debug_root); + if (!fhci->dfs_root) { + WARN_ON(1); + return; diff --git a/usb/usb-ohci-use-the-new-usb-debugfs-directory.patch b/usb/usb-ohci-use-the-new-usb-debugfs-directory.patch new file mode 100644 index 00000000000000..dc0b639582c0e7 --- /dev/null +++ b/usb/usb-ohci-use-the-new-usb-debugfs-directory.patch @@ -0,0 +1,26 @@ +From foo@baz Fri Apr 24 15:14:38 PDT 2009 +Date: Fri, 24 Apr 2009 15:14:38 -0700 +To: Greg KH <greg@kroah.com> +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: USB: OHCI: use the new usb debugfs directory + +All usb debugfs files should be behind the usb directory, not at the +root of debugfs. + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ohci-hcd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/ohci-hcd.c ++++ b/drivers/usb/host/ohci-hcd.c +@@ -1105,7 +1105,7 @@ static int __init ohci_hcd_mod_init(void + set_bit(USB_OHCI_LOADED, &usb_hcds_loaded); + + #ifdef DEBUG +- ohci_debug_root = debugfs_create_dir("ohci", NULL); ++ ohci_debug_root = debugfs_create_dir("ohci", usb_debug_root); + if (!ohci_debug_root) { + retval = -ENOENT; + goto error_debug; diff --git a/usb/usb-return-device-strings-in-utf-8.patch b/usb/usb-return-device-strings-in-utf-8.patch new file mode 100644 index 00000000000000..d6828a15389254 --- /dev/null +++ b/usb/usb-return-device-strings-in-utf-8.patch @@ -0,0 +1,132 @@ +From clemens@ladisch.de Fri Apr 24 15:33:21 2009 +From: Clemens Ladisch <clemens@ladisch.de> +Date: Fri, 24 Apr 2009 10:12:18 +0200 +Subject: usb: return device strings in UTF-8 +To: Greg KH <greg@kroah.com> +Cc: Eugen Dedu <Eugen.Dedu@pu-pm.univ-fcomte.fr>, Alan Stern <stern@rowland.harvard.edu> +Message-ID: <49F17462.3090804@ladisch.de> + + +Change the encoding of strings returned by usb_string() from ISO 8859-1 +to UTF-8. + +Signed-off-by: Clemens Ladisch <clemens@ladisch.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/Kconfig | 1 + + drivers/usb/core/message.c | 41 +++++++++++++++++------------------------ + 2 files changed, 18 insertions(+), 24 deletions(-) + +--- a/drivers/usb/core/message.c ++++ b/drivers/usb/core/message.c +@@ -10,6 +10,7 @@ + #include <linux/mm.h> + #include <linux/timer.h> + #include <linux/ctype.h> ++#include <linux/nls.h> + #include <linux/device.h> + #include <linux/scatterlist.h> + #include <linux/usb/quirks.h> +@@ -759,7 +760,7 @@ static int usb_string_sub(struct usb_dev + } + + /** +- * usb_string - returns ISO 8859-1 version of a string descriptor ++ * usb_string - returns UTF-8 version of a string descriptor + * @dev: the device whose string descriptor is being retrieved + * @index: the number of the descriptor + * @buf: where to put the string +@@ -767,17 +768,10 @@ static int usb_string_sub(struct usb_dev + * Context: !in_interrupt () + * + * This converts the UTF-16LE encoded strings returned by devices, from +- * usb_get_string_descriptor(), to null-terminated ISO-8859-1 encoded ones +- * that are more usable in most kernel contexts. Note that all characters +- * in the chosen descriptor that can't be encoded using ISO-8859-1 +- * are converted to the question mark ("?") character, and this function ++ * usb_get_string_descriptor(), to null-terminated UTF-8 encoded ones ++ * that are more usable in most kernel contexts. Note that this function + * chooses strings in the first language supported by the device. + * +- * The ASCII (or, redundantly, "US-ASCII") character set is the seven-bit +- * subset of ISO 8859-1. ISO-8859-1 is the eight-bit subset of Unicode, +- * and is appropriate for use many uses of English and several other +- * Western European languages. (But it doesn't include the "Euro" symbol.) +- * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns length of the string (>= 0) or usb_control_msg status (< 0). +@@ -786,14 +780,14 @@ int usb_string(struct usb_device *dev, i + { + unsigned char *tbuf; + int err; +- unsigned int u, idx; ++ unsigned int u; + + if (dev->state == USB_STATE_SUSPENDED) + return -EHOSTUNREACH; + if (size <= 0 || !buf || !index) + return -EINVAL; + buf[0] = 0; +- tbuf = kmalloc(256, GFP_NOIO); ++ tbuf = kmalloc(256 + 2, GFP_NOIO); + if (!tbuf) + return -ENOMEM; + +@@ -820,17 +814,13 @@ int usb_string(struct usb_device *dev, i + if (err < 0) + goto errout; + ++ for (u = 2; u < err; u += 2) ++ le16_to_cpus((u16 *)&tbuf[u]); ++ tbuf[u] = 0; ++ tbuf[u + 1] = 0; + size--; /* leave room for trailing NULL char in output buffer */ +- for (idx = 0, u = 2; u < err; u += 2) { +- if (idx >= size) +- break; +- if (tbuf[u+1]) /* high byte */ +- buf[idx++] = '?'; /* non ISO-8859-1 character */ +- else +- buf[idx++] = tbuf[u]; +- } +- buf[idx] = 0; +- err = idx; ++ err = utf8_wcstombs(buf, (u16 *)&tbuf[2], size); ++ buf[err] = 0; + + if (tbuf[1] != USB_DT_STRING) + dev_dbg(&dev->dev, +@@ -843,6 +833,9 @@ int usb_string(struct usb_device *dev, i + } + EXPORT_SYMBOL_GPL(usb_string); + ++/* one UTF-8-encoded 16-bit character has at most three bytes */ ++#define MAX_USB_STRING_SIZE (127 * 3 + 1) ++ + /** + * usb_cache_string - read a string descriptor and cache it for later use + * @udev: the device whose string descriptor is being read +@@ -860,9 +853,9 @@ char *usb_cache_string(struct usb_device + if (index <= 0) + return NULL; + +- buf = kmalloc(256, GFP_KERNEL); ++ buf = kmalloc(MAX_USB_STRING_SIZE, GFP_KERNEL); + if (buf) { +- len = usb_string(udev, index, buf, 256); ++ len = usb_string(udev, index, buf, MAX_USB_STRING_SIZE); + if (len > 0) { + smallbuf = kmalloc(++len, GFP_KERNEL); + if (!smallbuf) +--- a/drivers/usb/Kconfig ++++ b/drivers/usb/Kconfig +@@ -63,6 +63,7 @@ config USB_ARCH_HAS_EHCI + config USB + tristate "Support for Host-side USB" + depends on USB_ARCH_HAS_HCD ++ select NLS # for UTF-8 strings + ---help--- + Universal Serial Bus (USB) is a specification for a serial bus + subsystem which offers higher speeds and more features than the diff --git a/usb/usb-serial-ftdi-add-high-speed-device-support.patch b/usb/usb-serial-ftdi-add-high-speed-device-support.patch index 971f8a5bfa144d..31898b89a3e8e1 100644 --- a/usb/usb-serial-ftdi-add-high-speed-device-support.patch +++ b/usb/usb-serial-ftdi-add-high-speed-device-support.patch @@ -54,7 +54,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) }, { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) }, { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) }, -@@ -689,6 +691,8 @@ static const char *ftdi_chip_name[] = { +@@ -691,6 +693,8 @@ static const char *ftdi_chip_name[] = { [FT232BM] = "FT232BM", [FT2232C] = "FT2232C", [FT232RL] = "FT232RL", @@ -63,7 +63,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> }; -@@ -740,6 +744,8 @@ static unsigned short int ftdi_232am_bau +@@ -742,6 +746,8 @@ static unsigned short int ftdi_232am_bau static unsigned short int ftdi_232am_baud_to_divisor(int baud); static __u32 ftdi_232bm_baud_base_to_divisor(int baud, int base); static __u32 ftdi_232bm_baud_to_divisor(int baud); @@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static struct usb_serial_driver ftdi_sio_device = { .driver = { -@@ -833,6 +839,36 @@ static __u32 ftdi_232bm_baud_to_divisor( +@@ -835,6 +841,36 @@ static __u32 ftdi_232bm_baud_to_divisor( return ftdi_232bm_baud_base_to_divisor(baud, 48000000); } @@ -109,7 +109,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #define set_mctrl(port, set) update_mctrl((port), (set), 0) #define clear_mctrl(port, clear) update_mctrl((port), 0, (clear)) -@@ -991,6 +1027,19 @@ static __u32 get_ftdi_divisor(struct tty +@@ -993,6 +1029,19 @@ static __u32 get_ftdi_divisor(struct tty baud = 9600; } break; @@ -129,7 +129,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } /* priv->chip_type */ if (div_okay) { -@@ -1143,14 +1192,29 @@ static void ftdi_determine_type(struct u +@@ -1145,14 +1194,29 @@ static void ftdi_determine_type(struct u if (interfaces > 1) { int inter; @@ -165,7 +165,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* BM-type devices have a bug where bcdDevice gets set * to 0x200 when iSerialNumber is 0. */ if (version < 0x500) { -@@ -1287,7 +1351,9 @@ static int create_sysfs_attrs(struct usb +@@ -1289,7 +1353,9 @@ static int create_sysfs_attrs(struct usb if ((!retval) && (priv->chip_type == FT232BM || priv->chip_type == FT2232C || @@ -176,7 +176,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> retval = device_create_file(&port->dev, &dev_attr_latency_timer); } -@@ -1306,7 +1372,9 @@ static void remove_sysfs_attrs(struct us +@@ -1308,7 +1374,9 @@ static void remove_sysfs_attrs(struct us device_remove_file(&port->dev, &dev_attr_event_char); if (priv->chip_type == FT232BM || priv->chip_type == FT2232C || @@ -187,7 +187,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> device_remove_file(&port->dev, &dev_attr_latency_timer); } } -@@ -2300,6 +2368,8 @@ static int ftdi_tiocmget(struct tty_stru +@@ -2302,6 +2370,8 @@ static int ftdi_tiocmget(struct tty_stru case FT232BM: case FT2232C: case FT232RL: @@ -227,7 +227,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* * FIC / OpenMoko, Inc. http://wiki.openmoko.org/wiki/Neo1973_Debug_Board_v3 -@@ -1030,6 +1036,8 @@ typedef enum { +@@ -1036,6 +1042,8 @@ typedef enum { FT232BM = 3, FT2232C = 4, FT232RL = 5, diff --git a/usb/usb-uhci-use-the-new-usb-debugfs-directory.patch b/usb/usb-uhci-use-the-new-usb-debugfs-directory.patch new file mode 100644 index 00000000000000..ef129fb298df1e --- /dev/null +++ b/usb/usb-uhci-use-the-new-usb-debugfs-directory.patch @@ -0,0 +1,26 @@ +From foo@baz Fri Apr 24 15:15:00 PDT 2009 +Date: Fri, 24 Apr 2009 15:15:00 -0700 +To: Greg KH <greg@kroah.com> +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: USB: UHCI: use the new usb debugfs directory + +All usb debugfs files should be behind the usb directory, not at the +root of debugfs. + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/uhci-hcd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/uhci-hcd.c ++++ b/drivers/usb/host/uhci-hcd.c +@@ -961,7 +961,7 @@ static int __init uhci_hcd_init(void) + errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL); + if (!errbuf) + goto errbuf_failed; +- uhci_debugfs_root = debugfs_create_dir("uhci", NULL); ++ uhci_debugfs_root = debugfs_create_dir("uhci", usb_debug_root); + if (!uhci_debugfs_root) + goto debug_failed; + } diff --git a/usb/usb-usbmon-use-the-new-usb-debugfs-directory.patch b/usb/usb-usbmon-use-the-new-usb-debugfs-directory.patch new file mode 100644 index 00000000000000..f1d471d91f984f --- /dev/null +++ b/usb/usb-usbmon-use-the-new-usb-debugfs-directory.patch @@ -0,0 +1,50 @@ +From foo@baz Fri Apr 24 15:15:49 PDT 2009 +Date: Fri, 24 Apr 2009 15:15:49 -0700 +To: Greg KH <greg@kroah.com> +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: USB: usbmon: use the new usb debugfs directory + +All usb debugfs files should be behind the usb directory, not at the +root of debugfs. Unfortunately, I think there's some scripts that +expect usbmon to be at the root of debugfs. So we create a symlink to +keep them happy. + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/mon/mon_text.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/drivers/usb/mon/mon_text.c ++++ b/drivers/usb/mon/mon_text.c +@@ -86,6 +86,7 @@ struct mon_reader_text { + }; + + static struct dentry *mon_dir; /* Usually /sys/kernel/debug/usbmon */ ++static struct dentry *mon_dir_symlink; /* /sys/kernel/debug/usb/usbmon link */ + + static void mon_text_ctor(void *); + +@@ -733,7 +734,7 @@ int __init mon_text_init(void) + { + struct dentry *mondir; + +- mondir = debugfs_create_dir("usbmon", NULL); ++ mondir = debugfs_create_dir("usbmon", usb_debug_root); + if (IS_ERR(mondir)) { + printk(KERN_NOTICE TAG ": debugfs is not available\n"); + return -ENODEV; +@@ -742,11 +743,13 @@ int __init mon_text_init(void) + printk(KERN_NOTICE TAG ": unable to create usbmon directory\n"); + return -ENODEV; + } ++ mon_dir_symlink = debugfs_create_symlink("usbmon", NULL, "usb/usbmon"); + mon_dir = mondir; + return 0; + } + + void mon_text_exit(void) + { ++ debugfs_remove(mon_dir_symlink); + debugfs_remove(mon_dir); + } |
