diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-15 06:59:51 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-15 06:59:51 -0700 |
| commit | e41a99ca6591586ac2f8b883427c0cbb00d87114 (patch) | |
| tree | 6d5767517356d12251d0bb1ed857fbd74083522a | |
| parent | b632b9a7f13fc9a82a43d8e0bd9d541060a75095 (diff) | |
| download | patches-e41a99ca6591586ac2f8b883427c0cbb00d87114.tar.gz | |
more bugfixes, and 2.6.31-rc3 resync
14 files changed, 566 insertions, 35 deletions
diff --git a/driver-core.current/sysfs-fix-hardlink-count-on-device_move.patch b/driver-core.current/sysfs-fix-hardlink-count-on-device_move.patch new file mode 100644 index 00000000000000..65114d98f3f5aa --- /dev/null +++ b/driver-core.current/sysfs-fix-hardlink-count-on-device_move.patch @@ -0,0 +1,42 @@ +From oberpar@linux.vnet.ibm.com Wed Jul 15 06:34:34 2009 +From: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> +Date: Tue, 14 Jul 2009 17:56:15 +0200 +Subject: sysfs: fix hardlink count on device_move +To: gregkh@suse.de +Message-ID: <4A5CAA9F.1050302@linux.vnet.ibm.com> + + +From: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> + +Update directory hardlink count when moving kobjects to a new parent. +Fixes the following problem which occurs when several devices are +moved to the same parent and then unregistered: + +> ls -laF /sys/devices/css0/defunct/ +> total 0 +> drwxr-xr-x 4294967295 root root 0 2009-07-14 17:02 ./ +> drwxr-xr-x 114 root root 0 2009-07-14 17:02 ../ +> drwxr-xr-x 2 root root 0 2009-07-14 17:01 power/ +> -rw-r--r-- 1 root root 4096 2009-07-14 17:01 uevent + +Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + fs/sysfs/dir.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/fs/sysfs/dir.c ++++ b/fs/sysfs/dir.c +@@ -939,8 +939,10 @@ again: + /* Remove from old parent's list and insert into new parent's list. */ + sysfs_unlink_sibling(sd); + sysfs_get(new_parent_sd); ++ drop_nlink(old_parent->d_inode); + sysfs_put(sd->s_parent); + sd->s_parent = new_parent_sd; ++ inc_nlink(new_parent->d_inode); + sysfs_link_sibling(sd); + + out_unlock: @@ -10,11 +10,21 @@ gregkh/gkh-version.patch # Driver core patches for 2.6.31 ################################# # driver_data cleanups +driver-core.current/sysfs-fix-hardlink-count-on-device_move.patch + driver-core.current/driver-core-move-dev_get-set_drvdata-to-drivers-base-dd.c.patch ################################# # USB patches for 2.6.31 ################################# +usb.current/usb-option-remove-unused-variable.patch +usb.current/usb-let-the-option-driver-compile-without-config_pm.patch +usb.current/usb-storage-raise-timeout-in-usb_stor_bulk_max_lun.patch +usb.current/usb-omap-ohci-hc_driver-s-stop-method-should-call-ohci_stop.patch +usb.current/usb-ftdi_sio-add-support-for-gn-otometrics-aurical-usb-audiometer.patch +usb.current/usb-xhci-fix-less-and-greater-than-confusion.patch +usb.current/usb-cp210x-add-new-device-ids.patch +usb.current/usb-ehci-orion-call-ehci_reset-before-ehci_halt.patch ##################################################################### @@ -70,6 +80,9 @@ usb/usb-musb-cleanup-the-nop-registration-for-omap3evm.patch ################################# # for before .31 is done: +staging/staging-serqt_usb2-add-missing-calls-to-tty_kref_put.patch +staging/staging-serqt_usb2-fix-memory-leak-in-error-case.patch +staging/staging-android-lowmemorykiller.c-fix-it-for-oom-move-oom_adj-value-from-task_struct-to-mm_struct.patch # for after .31: @@ -78,7 +91,6 @@ staging/staging-android-binder-remove-a-predefine.patch staging/staging-android-binder-add-enum-usage-in-function-arguments.patch staging/staging-android-binder-global-variable-cleanup.patch staging/staging-android-binder-clean-up-for-all-the-stat-statments.patch -staging/staging-android-lowmemorykiller.c-fix-it-for-oom-move-oom_adj-value-from-task_struct-to-mm_struct.patch staging/staging-android-binder-cleanup-some-long-lines.patch staging/staging-android-lowmemorykiller-remove-a-predefine.patch staging/staging-android-lowmemorykiller-delete-the-decription-file.patch diff --git a/staging/staging-serqt_usb2-add-missing-calls-to-tty_kref_put.patch b/staging/staging-serqt_usb2-add-missing-calls-to-tty_kref_put.patch new file mode 100644 index 00000000000000..bd20d5c9057aa1 --- /dev/null +++ b/staging/staging-serqt_usb2-add-missing-calls-to-tty_kref_put.patch @@ -0,0 +1,87 @@ +From wfp5p@virginia.edu Wed Jul 15 06:35:06 2009 +From: Bill Pemberton <wfp5p@virginia.edu> +Date: Tue, 14 Jul 2009 15:33:52 -0400 +Subject: Staging: serqt_usb2: add missing calls to tty_kref_put() +To: greg@kroah.com +Cc: Bill Pemberton <wfp5p@virginia.edu> +Message-ID: <1247600032-4447-1-git-send-email-wfp5p@virginia.edu> + + +tty_port_tty_get() was called without a corresponding tty_kref_put() +in qt_read_bulk_callback() and qt_close(). + +Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/serqt_usb2/serqt_usb2.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +--- a/drivers/staging/serqt_usb2/serqt_usb2.c ++++ b/drivers/staging/serqt_usb2/serqt_usb2.c +@@ -360,18 +360,18 @@ static void qt_read_bulk_callback(struct + if (port_paranoia_check(port, __func__) != 0) { + dbg("%s - port_paranoia_check, exiting\n", __func__); + qt_port->ReadBulkStopped = 1; +- return; ++ goto exit; + } + + if (!serial) { + dbg("%s - bad serial pointer, exiting\n", __func__); +- return; ++ goto exit; + } + if (qt_port->closePending == 1) { + /* Were closing , stop reading */ + dbg("%s - (qt_port->closepending == 1\n", __func__); + qt_port->ReadBulkStopped = 1; +- return; ++ goto exit; + } + + /* +@@ -381,7 +381,7 @@ static void qt_read_bulk_callback(struct + */ + if (qt_port->RxHolding == 1) { + qt_port->ReadBulkStopped = 1; +- return; ++ goto exit; + } + + if (urb->status) { +@@ -389,7 +389,7 @@ static void qt_read_bulk_callback(struct + + dbg("%s - nonzero read bulk status received: %d\n", + __func__, urb->status); +- return; ++ goto exit; + } + + if (tty && RxCount) { +@@ -463,6 +463,8 @@ static void qt_read_bulk_callback(struct + } + + schedule_work(&port->work); ++exit: ++ tty_kref_put(tty); + } + + /* +@@ -1041,7 +1043,7 @@ static void qt_block_until_empty(struct + } + } + +-static void qt_close( struct usb_serial_port *port) ++static void qt_close(struct usb_serial_port *port) + { + struct usb_serial *serial = port->serial; + struct quatech_port *qt_port; +@@ -1068,6 +1070,7 @@ static void qt_close( struct usb_serial_ + /* wait up to for transmitter to empty */ + if (serial->dev) + qt_block_until_empty(tty, qt_port); ++ tty_kref_put(tty); + + /* Close uart channel */ + status = qt_close_channel(serial, index); diff --git a/staging/staging-serqt_usb2-fix-memory-leak-in-error-case.patch b/staging/staging-serqt_usb2-fix-memory-leak-in-error-case.patch new file mode 100644 index 00000000000000..1788cfbbfe1ccf --- /dev/null +++ b/staging/staging-serqt_usb2-fix-memory-leak-in-error-case.patch @@ -0,0 +1,33 @@ +From oliver@neukum.org Wed Jul 15 06:46:43 2009 +From: Oliver Neukum <oliver@neukum.org> +Date: Mon, 13 Jul 2009 10:46:57 +0200 +Subject: Staging: serqt_usb2: fix memory leak in error case +To: Greg KH <greg@kroah.com> +Message-ID: <200907131046.57912.oliver@neukum.org> +Content-Disposition: inline + + +a standard memory leak, as later allocations may fail even if prior +allocations did not. Then the prior allocations must be undone. + +Signed-off-by: Oliver Neukum <oliver@neukum.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/serqt_usb2/serqt_usb2.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/staging/serqt_usb2/serqt_usb2.c ++++ b/drivers/staging/serqt_usb2/serqt_usb2.c +@@ -738,6 +738,11 @@ static int qt_startup(struct usb_serial + if (!qt_port) { + dbg("%s: kmalloc for quatech_port (%d) failed!.", + __func__, i); ++ for(--i; i >= 0; i--) { ++ port = serial->port[i]; ++ kfree(usb_get_serial_port_data(port)); ++ usb_set_serial_port_data(port, NULL); ++ } + return -ENOMEM; + } + spin_lock_init(&qt_port->lock); diff --git a/usb.current/usb-cp210x-add-new-device-ids.patch b/usb.current/usb-cp210x-add-new-device-ids.patch new file mode 100644 index 00000000000000..dca4edccb42fd4 --- /dev/null +++ b/usb.current/usb-cp210x-add-new-device-ids.patch @@ -0,0 +1,37 @@ +From craig@microtron.org.uk Wed Jul 15 06:44:55 2009 +From: Craig Shelley <craig@microtron.org.uk> +Date: Sun, 12 Jul 2009 21:52:33 +0100 +Subject: USB: CP210x Add new device IDs +To: greg@kroah.com +Cc: linux-usb@vger.kernel.org +Message-ID: <1247432154375824083@teratron> + + + +Signed-off-by: Craig Shelley <craig@microtron.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/cp210x.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -80,6 +80,7 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ + { USB_DEVICE(0x10C4, 0x8115) }, /* Arygon NFC/Mifare Reader */ + { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */ ++ { USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */ + { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ + { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ + { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ +@@ -96,7 +97,9 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */ + { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */ + { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ ++ { USB_DEVICE(0x10C4, 0x8382) }, /* Cygnal Integrated Products, Inc. */ + { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */ ++ { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */ + { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ + { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ + { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ diff --git a/usb.current/usb-ehci-orion-call-ehci_reset-before-ehci_halt.patch b/usb.current/usb-ehci-orion-call-ehci_reset-before-ehci_halt.patch new file mode 100644 index 00000000000000..4c215d3e7c5150 --- /dev/null +++ b/usb.current/usb-ehci-orion-call-ehci_reset-before-ehci_halt.patch @@ -0,0 +1,50 @@ +From simon.kagstrom@netinsight.net Wed Jul 15 06:46:21 2009 +From: Simon Kagstrom <simon.kagstrom@netinsight.net> +Date: Mon, 13 Jul 2009 08:25:09 +0200 +Subject: USB: ehci-orion: Call ehci_reset before ehci_halt +To: linux-usb@vger.kernel.org +Message-ID: <20090713082509.345aade5@marrow.netinsight.se> + + +I noticed that USB initialization didn't setup correctly on my kirkwood +based board (OpenRD base) if I hadn't initialized USB in U-boot first. +The error message looks like this: + + ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver + orion-ehci orion-ehci.0: Marvell Orion EHCI + orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1 + orion-ehci orion-ehci.0: can't setup + orion-ehci orion-ehci.0: USB bus 1 deregistered + orion-ehci orion-ehci.0: init orion-ehci.0 fail, -110 + orion-ehci: probe of orion-ehci.0 failed with error -110 + +which is caused by ehci_halt() timing out in the handshake() call. I +noticed that U-boot does a reset before calling handshake(), so this +patch does the same thing for Linux. USB now works for me. + +Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> +Acked-by: Nicolas Pitre <nico@marvell.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ehci-orion.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/ehci-orion.c ++++ b/drivers/usb/host/ehci-orion.c +@@ -105,6 +105,7 @@ static int ehci_orion_setup(struct usb_h + struct ehci_hcd *ehci = hcd_to_ehci(hcd); + int retval; + ++ ehci_reset(ehci); + retval = ehci_halt(ehci); + if (retval) + return retval; +@@ -118,7 +119,6 @@ static int ehci_orion_setup(struct usb_h + + hcd->has_tt = 1; + +- ehci_reset(ehci); + ehci_port_power(ehci, 0); + + return retval; diff --git a/usb.current/usb-ftdi_sio-add-support-for-gn-otometrics-aurical-usb-audiometer.patch b/usb.current/usb-ftdi_sio-add-support-for-gn-otometrics-aurical-usb-audiometer.patch new file mode 100644 index 00000000000000..84d82a3e98c976 --- /dev/null +++ b/usb.current/usb-ftdi_sio-add-support-for-gn-otometrics-aurical-usb-audiometer.patch @@ -0,0 +1,46 @@ +From vsundber@gmail.com Wed Jul 15 06:35:18 2009 +From: Ville Sundberg <vsundber@gmail.com> +Date: Wed, 15 Jul 2009 00:27:28 +0300 +Subject: USB: ftdi_sio: Add support for GN Otometrics Aurical USB Audiometer +To: linux-usb@vger.kernel.org +Message-ID: <246ec9720907141427u210ed99hf575e73c07e2d7fc@mail.gmail.com> + + +The patch adds support for the GN Otometrics Aurical USB Audiometer +(FT232BM-based). +A new VID and a new PID is added. + +Signed-off-by: Ville Sundberg <vsundber@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/ftdi_sio.c | 1 + + drivers/usb/serial/ftdi_sio.h | 7 +++++++ + 2 files changed, 8 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -698,6 +698,7 @@ static struct usb_device_id id_table_com + { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) }, ++ { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) }, + { }, /* Optional parameter entry */ + { } /* Terminating entry */ + }; +--- a/drivers/usb/serial/ftdi_sio.h ++++ b/drivers/usb/serial/ftdi_sio.h +@@ -947,6 +947,13 @@ + #define FTDI_TURTELIZER_PID 0xBDC8 /* JTAG/RS-232 adapter by egnite GmBH */ + + /* ++ * GN Otometrics (http://www.otometrics.com) ++ * Submitted by Ville Sundberg. ++ */ ++#define GN_OTOMETRICS_VID 0x0c33 /* Vendor ID */ ++#define AURICAL_USB_PID 0x0010 /* Aurical USB Audiometer */ ++ ++/* + * BmRequestType: 1100 0000b + * bRequest: FTDI_E2_READ + * wValue: 0 diff --git a/usb.current/usb-let-the-option-driver-compile-without-config_pm.patch b/usb.current/usb-let-the-option-driver-compile-without-config_pm.patch new file mode 100644 index 00000000000000..09e7fed47fabd9 --- /dev/null +++ b/usb.current/usb-let-the-option-driver-compile-without-config_pm.patch @@ -0,0 +1,70 @@ +From oliver@neukum.org Wed Jul 15 06:31:25 2009 +From: Oliver Neukum <oliver@neukum.org> +Date: Mon, 13 Jul 2009 23:24:10 +0200 +Subject: USB: let the option driver compile without CONFIG_PM +To: Randy Dunlap <randy.dunlap@oracle.com>, Greg KH <greg@kroah.com>, USB list <linux-usb@vger.kernel.org>, "zhao1980ming" <zhao1980ming@163.com> +Message-ID: <200907132324.11444.oliver@neukum.org> +Content-Disposition: inline + + +This is needed for compilation without CONFIG_PM. + +Signed-off-by: Oliver Neukum <oliver@neukum.org> +Acked-by: Randy Dunlap <randy.dunlap@oracle.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -66,8 +66,10 @@ static int option_tiocmget(struct tty_s + static int option_tiocmset(struct tty_struct *tty, struct file *file, + unsigned int set, unsigned int clear); + static int option_send_setup(struct usb_serial_port *port); ++#ifdef CONFIG_PM + static int option_suspend(struct usb_serial *serial, pm_message_t message); + static int option_resume(struct usb_serial *serial); ++#endif + + /* Vendor and product IDs */ + #define OPTION_VENDOR_ID 0x0AF0 +@@ -555,8 +557,10 @@ static struct usb_driver option_driver = + .name = "option", + .probe = usb_serial_probe, + .disconnect = usb_serial_disconnect, ++#ifdef CONFIG_PM + .suspend = usb_serial_suspend, + .resume = usb_serial_resume, ++#endif + .id_table = option_ids, + .no_dynamic_id = 1, + }; +@@ -588,8 +592,10 @@ static struct usb_serial_driver option_1 + .disconnect = option_disconnect, + .release = option_release, + .read_int_callback = option_instat_callback, ++#ifdef CONFIG_PM + .suspend = option_suspend, + .resume = option_resume, ++#endif + }; + + static int debug; +@@ -1185,6 +1191,7 @@ static void option_release(struct usb_se + } + } + ++#ifdef CONFIG_PM + static int option_suspend(struct usb_serial *serial, pm_message_t message) + { + dbg("%s entered", __func__); +@@ -1243,6 +1250,7 @@ static int option_resume(struct usb_seri + } + return 0; + } ++#endif + + MODULE_AUTHOR(DRIVER_AUTHOR); + MODULE_DESCRIPTION(DRIVER_DESC); diff --git a/usb.current/usb-omap-ohci-hc_driver-s-stop-method-should-call-ohci_stop.patch b/usb.current/usb-omap-ohci-hc_driver-s-stop-method-should-call-ohci_stop.patch new file mode 100644 index 00000000000000..2833021c59f61d --- /dev/null +++ b/usb.current/usb-omap-ohci-hc_driver-s-stop-method-should-call-ohci_stop.patch @@ -0,0 +1,36 @@ +From gadiyar@ti.com Wed Jul 15 06:34:11 2009 +From: Anand Gadiyar <gadiyar@ti.com> +Date: Tue, 14 Jul 2009 16:41:00 +0530 +Subject: USB: OMAP: OHCI: hc_driver's stop method should call ohci_stop +To: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org> +Cc: "dbrownell@users.sourceforge.net" <dbrownell@users.sourceforge.net>, "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org> +Message-ID: <5A47E75E594F054BAF48C5E4FC4B92AB0305D662CF@dbde02.ent.ti.com> + + +From: Anand Gadiyar <gadiyar@ti.com> + +OMAP: OHCI: hc_driver's stop method should call ohci_stop + +Without this, the ohci-omap driver will not cleanup the debugfs +nodes when the driver is unloaded. So the next insmod will fail, +if CONFIG_DEBUG_FS and CONFIG_USB_DEBUG are both selected. + +Reported-by: vikram pandita <vikram.pandita@ti.com> +Cc: David Brownell <dbrownell@users.sourceforge.net> +Signed-off-by: Anand Gadiyar <gadiyar@ti.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ohci-omap.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/host/ohci-omap.c ++++ b/drivers/usb/host/ohci-omap.c +@@ -282,6 +282,7 @@ static int ohci_omap_init(struct usb_hcd + static void ohci_omap_stop(struct usb_hcd *hcd) + { + dev_dbg(hcd->self.controller, "stopping USB Controller\n"); ++ ohci_stop(hcd); + omap_ohci_clock_power(0); + } + diff --git a/usb.current/usb-option-remove-unused-variable.patch b/usb.current/usb-option-remove-unused-variable.patch new file mode 100644 index 00000000000000..19924cd67d629d --- /dev/null +++ b/usb.current/usb-option-remove-unused-variable.patch @@ -0,0 +1,48 @@ +From crmafra@aei.mpg.de Wed Jul 15 06:30:54 2009 +From: "Carlos R. Mafra" <crmafra@aei.mpg.de> +Date: Mon, 13 Jul 2009 21:45:03 +0200 +Subject: USB: option: Remove unused variable +To: linux-kernel@vger.kernel.org +Cc: Alan Stern <stern@rowland.harvard.edu>, Greg Kroah-Hartman <gregkh@suse.de> +Message-ID: <20090713194502.GA20723@Pilar.aei.mpg.de> +Content-Disposition: inline + + +From: Carlos R. Mafra <crmafra@aei.mpg.de> + +After commit f092c240494f2d807401d93f95f683909b90af96 ("USB: option: +remove unnecessary and erroneous code") the variable 'serial' becomes +unused, as gcc-4.3.2 points out: + +drivers/usb/serial/option.c: In function 'option_instat_callback': +drivers/usb/serial/option.c:834: warning: unused variable 'serial' +drivers/usb/serial/option.c: In function 'option_open': +drivers/usb/serial/option.c:930: warning: unused variable 'serial' + +So I removed it. + +Signed-off-by: Carlos R. Mafra <crmafra@aei.mpg.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -831,7 +831,6 @@ static void option_instat_callback(struc + int status = urb->status; + struct usb_serial_port *port = urb->context; + struct option_port_private *portdata = usb_get_serial_port_data(port); +- struct usb_serial *serial = port->serial; + + dbg("%s", __func__); + dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata); +@@ -927,7 +926,6 @@ static int option_open(struct tty_struct + struct usb_serial_port *port, struct file *filp) + { + struct option_port_private *portdata; +- struct usb_serial *serial = port->serial; + int i, err; + struct urb *urb; + diff --git a/usb.current/usb-storage-raise-timeout-in-usb_stor_bulk_max_lun.patch b/usb.current/usb-storage-raise-timeout-in-usb_stor_bulk_max_lun.patch new file mode 100644 index 00000000000000..9a768b41e38ee1 --- /dev/null +++ b/usb.current/usb-storage-raise-timeout-in-usb_stor_bulk_max_lun.patch @@ -0,0 +1,40 @@ +From james@develia.org Wed Jul 15 06:33:19 2009 +From: Giacomo Lozito <james@develia.org> +Date: Mon, 13 Jul 2009 23:23:33 +0200 +Subject: USB: storage: raise timeout in usb_stor_Bulk_max_lun +To: Alan Stern <stern@rowland.harvard.edu> +Cc: linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, "Greg Kroah-Hartman" <gregkh@suse.de> +Message-ID: <200907132323.33759.james@develia.org> + + +From: Giacomo Lozito <james@develia.org> + +Requests to get max LUN, for certain USB storage devices, require a +longer timeout before a correct reply is returned. This happens for a +Realtek USB Card Reader (0bda:0152), which has a max LUN of 3 but is set +to 0, thus losing functionality, because of the timeout occurring too +quickly. + +Raising the timeout value fixes the issue and might help other devices +to return a correct max LUN value as well. + +Signed-off-by: Giacomo Lozito <james@develia.org> +Acked-by: Alan Stern <stern@rowland.harvard.edu> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/storage/transport.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/storage/transport.c ++++ b/drivers/usb/storage/transport.c +@@ -961,7 +961,7 @@ int usb_stor_Bulk_max_lun(struct us_data + US_BULK_GET_MAX_LUN, + USB_DIR_IN | USB_TYPE_CLASS | + USB_RECIP_INTERFACE, +- 0, us->ifnum, us->iobuf, 1, HZ); ++ 0, us->ifnum, us->iobuf, 1, 10*HZ); + + US_DEBUGP("GetMaxLUN command result is %d, data is %d\n", + result, us->iobuf[0]); diff --git a/usb.current/usb-xhci-fix-less-and-greater-than-confusion.patch b/usb.current/usb-xhci-fix-less-and-greater-than-confusion.patch new file mode 100644 index 00000000000000..62e0b10fd26609 --- /dev/null +++ b/usb.current/usb-xhci-fix-less-and-greater-than-confusion.patch @@ -0,0 +1,38 @@ +From roel.kluin@gmail.com Wed Jul 15 06:44:15 2009 +From: Roel Kluin <roel.kluin@gmail.com> +Date: Mon, 13 Jul 2009 00:23:47 +0200 +Subject: USB: xhci: fix less- and greater than confusion +To: sarah.a.sharp@linux.intel.com, linux-usb@vger.kernel.org, gregkh@suse.de, Andrew Morton <akpm@linux-foundation.org> +Message-ID: <4A5A6273.5030702@gmail.com> + + +Without this change the loops won't start + +Signed-off-by: Roel Kluin <roel.kluin@gmail.com> +Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/xhci-dbg.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/usb/host/xhci-dbg.c ++++ b/drivers/usb/host/xhci-dbg.c +@@ -419,7 +419,7 @@ void xhci_dbg_ctx(struct xhci_hcd *xhci, + &ctx->add_flags, (unsigned long long)dma, + ctx->add_flags); + dma += field_size; +- for (i = 0; i > 6; ++i) { ++ for (i = 0; i < 6; ++i) { + xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd[%d]\n", + &ctx->rsvd[i], (unsigned long long)dma, + ctx->rsvd[i], i); +@@ -443,7 +443,7 @@ void xhci_dbg_ctx(struct xhci_hcd *xhci, + &ctx->slot.dev_state, + (unsigned long long)dma, ctx->slot.dev_state); + dma += field_size; +- for (i = 0; i > 4; ++i) { ++ for (i = 0; i < 4; ++i) { + xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd[%d]\n", + &ctx->slot.reserved[i], (unsigned long long)dma, + ctx->slot.reserved[i], i); diff --git a/usb/usb-serial-full-autosuspend-support-for-the-option-driver.patch b/usb/usb-serial-full-autosuspend-support-for-the-option-driver.patch index adc9b123f35cb6..1fea6fed7f57e8 100644 --- a/usb/usb-serial-full-autosuspend-support-for-the-option-driver.patch +++ b/usb/usb-serial-full-autosuspend-support-for-the-option-driver.patch @@ -18,20 +18,20 @@ Tested-off-by: Zhao Ming <zhao.ming9@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- - drivers/usb/serial/option.c | 134 +++++++++++++++++++++++++++++++++++++------- - 1 file changed, 115 insertions(+), 19 deletions(-) + drivers/usb/serial/option.c | 134 ++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 116 insertions(+), 18 deletions(-) --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -559,6 +559,7 @@ static struct usb_driver option_driver = +@@ -560,6 +560,7 @@ static struct usb_driver option_driver = + #ifdef CONFIG_PM + .suspend = usb_serial_suspend, .resume = usb_serial_resume, ++ .supports_autosuspend = 1, + #endif .id_table = option_ids, .no_dynamic_id = 1, -+ .supports_autosuspend = 1, - }; - - /* The card has three separate interfaces, which the serial driver -@@ -601,6 +602,12 @@ static int debug; +@@ -607,6 +608,12 @@ static int debug; #define IN_BUFLEN 4096 #define OUT_BUFLEN 4096 @@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> struct option_port_private { /* Input endpoints and buffer for this port */ struct urb *in_urbs[N_IN_URB]; -@@ -609,6 +616,8 @@ struct option_port_private { +@@ -615,6 +622,8 @@ struct option_port_private { struct urb *out_urbs[N_OUT_URB]; u8 *out_buffer[N_OUT_URB]; unsigned long out_busy; /* Bit vector of URBs in use */ @@ -53,7 +53,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Settings for the port */ int rts_state; /* Handshaking pins (outputs) */ -@@ -655,12 +664,17 @@ module_exit(option_exit); +@@ -661,12 +670,17 @@ module_exit(option_exit); static int option_probe(struct usb_serial *serial, const struct usb_device_id *id) { @@ -71,7 +71,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return 0; } -@@ -717,12 +731,15 @@ static int option_write(struct tty_struc +@@ -723,12 +737,15 @@ static int option_write(struct tty_struc const unsigned char *buf, int count) { struct option_port_private *portdata; @@ -87,7 +87,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> dbg("%s: write (%d chars)", __func__, count); -@@ -744,17 +761,33 @@ static int option_write(struct tty_struc +@@ -750,17 +767,33 @@ static int option_write(struct tty_struc dbg("%s: endpoint %d buf %d", __func__, usb_pipeendpoint(this_urb->pipe), i); @@ -127,7 +127,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> portdata->tx_start_time[i] = jiffies; buf += todo; left -= todo; -@@ -798,7 +831,10 @@ static void option_indat_callback(struct +@@ -804,7 +837,10 @@ static void option_indat_callback(struct if (err) printk(KERN_ERR "%s: resubmit read urb failed. " "(%d)", __func__, err); @@ -138,7 +138,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } return; } -@@ -807,15 +843,21 @@ static void option_outdat_callback(struc +@@ -813,15 +849,21 @@ static void option_outdat_callback(struc { struct usb_serial_port *port; struct option_port_private *portdata; @@ -161,29 +161,21 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> for (i = 0; i < N_OUT_URB; ++i) { if (portdata->out_urbs[i] == urb) { smp_mb__before_clear_bit(); -@@ -831,7 +873,6 @@ static void option_instat_callback(struc - int status = urb->status; - struct usb_serial_port *port = urb->context; - struct option_port_private *portdata = usb_get_serial_port_data(port); -- struct usb_serial *serial = port->serial; - - dbg("%s", __func__); - dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata); -@@ -927,11 +968,13 @@ static int option_open(struct tty_struct +@@ -932,10 +974,13 @@ static int option_open(struct tty_struct struct usb_serial_port *port, struct file *filp) { struct option_port_private *portdata; + struct option_intf_private *intfdata; - struct usb_serial *serial = port->serial; ++ struct usb_serial *serial = port->serial; int i, err; struct urb *urb; portdata = usb_get_serial_port_data(port); -+ intfdata = port->serial->private; ++ intfdata = serial->private; dbg("%s", __func__); -@@ -950,6 +993,12 @@ static int option_open(struct tty_struct +@@ -954,6 +999,12 @@ static int option_open(struct tty_struct option_send_setup(port); @@ -196,7 +188,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return 0; } -@@ -974,16 +1023,23 @@ static void option_close(struct usb_seri +@@ -978,16 +1029,23 @@ static void option_close(struct usb_seri int i; struct usb_serial *serial = port->serial; struct option_port_private *portdata; @@ -220,7 +212,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } } -@@ -1088,6 +1144,7 @@ static int option_startup(struct usb_ser +@@ -1092,6 +1150,7 @@ static int option_startup(struct usb_ser __func__, i); return 1; } @@ -228,8 +220,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> for (j = 0; j < N_IN_URB; j++) { buffer = (u8 *)__get_free_page(GFP_KERNEL); -@@ -1189,18 +1246,52 @@ static void option_release(struct usb_se - +@@ -1194,18 +1253,52 @@ static void option_release(struct usb_se + #ifdef CONFIG_PM static int option_suspend(struct usb_serial *serial, pm_message_t message) { + struct option_intf_private *intfdata = serial->private; @@ -283,7 +275,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> dbg("%s entered", __func__); /* get the interrupt URBs resubmitted unconditionally */ -@@ -1215,7 +1306,7 @@ static int option_resume(struct usb_seri +@@ -1220,7 +1313,7 @@ static int option_resume(struct usb_seri if (err < 0) { err("%s: Error %d for interrupt URB of port%d", __func__, err, i); @@ -292,7 +284,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } } -@@ -1223,27 +1314,32 @@ static int option_resume(struct usb_seri +@@ -1228,27 +1321,32 @@ static int option_resume(struct usb_seri /* walk all ports */ port = serial->port[i]; portdata = usb_get_serial_port_data(port); @@ -331,5 +323,5 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +err_out: + return err; } + #endif - MODULE_AUTHOR(DRIVER_AUTHOR); @@ -1 +1 @@ -2.6.31-rc2-git10 +2.6.31-rc3 |
