diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-10 10:46:57 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-10 10:46:57 -0700 |
| commit | 90997435be1ee5c35ec5bb0aadd64b2111786abe (patch) | |
| tree | 22236ad26db686f97b377b1c5ad4f117bb0a300a | |
| parent | a85dce8ff3533fc1dcdf4e09b6f29be7759d404d (diff) | |
| download | patches-90997435be1ee5c35ec5bb0aadd64b2111786abe.tar.gz | |
usb.current fixes
18 files changed, 1235 insertions, 1 deletions
diff --git a/driver-core.current/driver-model-fix-show-store-prototypes-in-doc.patch b/driver-core.current/driver-model-fix-show-store-prototypes-in-doc.patch new file mode 100644 index 00000000000000..58e7af14be045a --- /dev/null +++ b/driver-core.current/driver-model-fix-show-store-prototypes-in-doc.patch @@ -0,0 +1,33 @@ +From rdunlap@xenotime.net Fri Jul 10 10:30:14 2009 +From: vibi sreenivasan <vibi_sreenivasan@cms.com> +Date: Wed, 8 Jul 2009 15:37:03 -0700 +Subject: driver model: fix show/store prototypes in doc. +Cc: gregkh <greg@kroah.com>, vibi sreenivasan <vibi_sreenivasan@cms.com> +Message-ID: <20090708153703.01fef7e0.rdunlap@xenotime.net> + + +From: vibi sreenivasan <vibi_sreenivasan@cms.com> + +FIX prototypes for show & store method in struct driver_attribute + +Signed-off-by: vibi sreenivasan <vibi_sreenivasan@cms.com> +Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + Documentation/driver-model/driver.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/Documentation/driver-model/driver.txt ++++ b/Documentation/driver-model/driver.txt +@@ -207,8 +207,8 @@ Attributes + ~~~~~~~~~~ + struct driver_attribute { + struct attribute attr; +- ssize_t (*show)(struct device_driver *, char * buf, size_t count, loff_t off); +- ssize_t (*store)(struct device_driver *, const char * buf, size_t count, loff_t off); ++ ssize_t (*show)(struct device_driver *driver, char *buf); ++ ssize_t (*store)(struct device_driver *, const char * buf, size_t count); + }; + + Device drivers can export attributes via their sysfs directories. @@ -14,6 +14,7 @@ driver-core.current/partitions-fix-broken-uevent_suppress-conversion.patch driver-core.current/sparc-remove-driver-core-bus_id_size.patch driver-core.current/driver-core-remove-bus_id_size.patch driver-core.current/firmware-firmware_class-fix-lock-imbalance.patch +driver-core.current/driver-model-fix-show-store-prototypes-in-doc.patch # driver_data cleanups driver-core.current/sound-remove-direct-access-of-driver_data.patch @@ -57,6 +58,20 @@ usb.current/usb-serial-optimize-sysrq-function-calls.patch usb.current/usb-serial-ftdi-with-product-code-fb80-and-vendor-id-0403.patch usb.current/usb-rndis-gadget-fix-issues-talking-from-pxa.patch usb.current/usb-usb.h-fix-kernel-doc-notation.patch +usb.current/revert-usb-usbfs-deprecate-and-hide-option-for-embedded.patch +usb.current/usb-ftdi-support-ndi-devices.patch +usb.current/usb-gadget-audio-select-snd_pcm.patch +usb.current/usb-fix-option_ms-regression-in-2.6.31-rc2.patch +usb.current/usb-serial-add-support-for-arkham-technology-adapters.patch +usb.current/usb-option.c-add-a-link-3gu-device-id.patch +usb.current/usb-sierra-fix-oops-upon-device-close.patch +usb.current/usb-fix-race-leading-to-a-write-after-kfree-in-usbfs.patch +usb.current/usb-serial-add-id-for-turtelizer-an-ft2232l-based-jtag-rs-232-adapter.patch +usb.current/usb-serial-sierra-driver-id_table-additions.patch +usb.current/usb-fix-langid-0-regression.patch +usb.current/usb-musb_host-undo-incorrect-change-in-musb_advance_schedule.patch +usb.current/usb-cypress_m8-remove-invalid-clear-halt.patch +usb.current/usb-option-remove-unnecessary-and-erroneous-code.patch ##################################################################### @@ -86,6 +101,7 @@ usb/usb-move-endpoint-sync-type-definitions-from-usb-audio.h-to-usb-ch9.h.patch usb/usb-move-vendor-subclass-definition-from-usb-audio.h-to-usb-ch9.h.patch usb/usb-audio-gadget-prefix-all-macro-definitions-with-uac_-in-linux-usb-audio.h.patch usb/usb-audio-gadget-un-inline-generic_et_cmd.patch +usb/usb-add-nuvoton-ehci-driver-for-w90p910-platform.patch # stuff I want in my tree, but not to go into -next @@ -176,3 +192,4 @@ staging/staging-cpc-usb-remove-unused-include-linux-version.h.patch led_classdev.sysfs-name.patch + diff --git a/usb.current/revert-usb-usbfs-deprecate-and-hide-option-for-embedded.patch b/usb.current/revert-usb-usbfs-deprecate-and-hide-option-for-embedded.patch new file mode 100644 index 00000000000000..835e6aae6a1433 --- /dev/null +++ b/usb.current/revert-usb-usbfs-deprecate-and-hide-option-for-embedded.patch @@ -0,0 +1,38 @@ +From foo@baz Thu Jul 9 21:35:49 PDT 2009 +Date: Thu, 09 Jul 2009 21:35:49 -0700 +To: Greg KH <greg@kroah.com> +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: Revert USB: usbfs: deprecate and hide option for !embedded + +This reverts commit cc71329b3b89b4a5be849b617f2c4f151f0b9213, so that +Red Hat machines can boot properly. It seems that the Red Hat initrd +code tries to watch the /proc/bus/usb/devices file to monitor usb +devices showing up. While this task is prone to lots of races and does +not show the true state of the system, they seem to like it. + +So for now, don't move this option under the EMBEDDED config option. + + +Cc: Scott James Remnant <scott@canonical.com> +Cc: Kay Sievers <kay.sievers@vrfy.org> +Cc: Dave Airlie <airlied@gmail.com> +Cc: Peter Jones <pjones@redhat.com> +Cc: Jeff Chua <jeff.chua.linux@gmail.com> +Cc: Dave Jones <davej@redhat.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/core/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/core/Kconfig ++++ b/drivers/usb/core/Kconfig +@@ -28,7 +28,7 @@ comment "Miscellaneous USB options" + depends on USB + + config USB_DEVICEFS +- bool "USB device filesystem (DEPRECATED)" if EMBEDDED ++ bool "USB device filesystem (DEPRECATED)" + depends on USB + ---help--- + If you say Y here (and to "/proc file system support" in the "File diff --git a/usb.current/usb-cypress_m8-remove-invalid-clear-halt.patch b/usb.current/usb-cypress_m8-remove-invalid-clear-halt.patch new file mode 100644 index 00000000000000..67b3a0764453b4 --- /dev/null +++ b/usb.current/usb-cypress_m8-remove-invalid-clear-halt.patch @@ -0,0 +1,36 @@ +From stern@rowland.harvard.edu Fri Jul 10 10:33:47 2009 +From: Alan Stern <stern@rowland.harvard.edu> +Date: Thu, 9 Jul 2009 12:59:57 -0400 (EDT) +Subject: USB: cypress_m8: remove invalid Clear-Halt +To: Greg KH <greg@kroah.com> +Message-ID: <Pine.LNX.4.44L0.0907091258430.11201-100000@iolanthe.rowland.org> + + +This patch (as1265) removes an erroneous call to usb_clear_halt from +the cypress_m8 driver. The call isn't valid because it is made from +interrupt context whereas usb_clear_halt is a blocking routine. + +Presumably the code has never been executed; if it did it would cause +an oops. So instead treat -EPIPE like any other sort of unexplained +error. + +Signed-off-by: Alan Stern <stern@rowland.harvard.edu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/cypress_m8.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/usb/serial/cypress_m8.c ++++ b/drivers/usb/serial/cypress_m8.c +@@ -1228,8 +1228,8 @@ static void cypress_read_int_callback(st + /* precursor to disconnect so just go away */ + return; + case -EPIPE: +- usb_clear_halt(port->serial->dev, 0x81); +- break; ++ /* Can't call usb_clear_halt while in_interrupt */ ++ /* FALLS THROUGH */ + default: + /* something ugly is going on... */ + dev_err(&urb->dev->dev, diff --git a/usb.current/usb-fix-langid-0-regression.patch b/usb.current/usb-fix-langid-0-regression.patch new file mode 100644 index 00000000000000..bcff822bad1450 --- /dev/null +++ b/usb.current/usb-fix-langid-0-regression.patch @@ -0,0 +1,116 @@ +From daniel@caiaq.de Fri Jul 10 10:32:11 2009 +From: Daniel Mack <daniel@caiaq.de> +Date: Fri, 10 Jul 2009 11:04:58 +0200 +Subject: USB: fix LANGID=0 regression +To: jouni <jouni.susiluoto@helsinki.fi> +Cc: Steve Calfee <stevecalfee@gmail.com>, Alan Stern <stern@rowland.harvard.edu> +Message-ID: <20090710090458.GA9464@buzzloop.caiaq.de> +Content-Disposition: inline + + +commit b7af0bb ("USB: allow malformed LANGID descriptors") broke support +for devices without string descriptor support. + +Reporting string descriptors is optional to USB devices, and a device +lets us know it can't deal with strings by responding to the LANGID +request with a STALL token. + +The kernel handled that correctly before b7af0bb came in, but failed +hard if the LANGID was reported but broken. More than that, if a device +was not able to provide string descriptors, the LANGID was retrieved +over and over again at each string read request. + +This patch changes the behaviour so that + + a) the LANGID is only queried once + b) devices which can't handle string requests are not asked again + c) devices with malformed LANGID values have a sane fallback to 0x0409 + +Signed-off-by: Daniel Mack <daniel@caiaq.de> +Acked-by: Alan Stern <stern@rowland.harvard.edu> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/core/message.c | 63 ++++++++++++++++++++++++++++++++------------- + 1 file changed, 45 insertions(+), 18 deletions(-) + +--- a/drivers/usb/core/message.c ++++ b/drivers/usb/core/message.c +@@ -806,6 +806,48 @@ static int usb_string_sub(struct usb_dev + return rc; + } + ++static int usb_get_langid(struct usb_device *dev, unsigned char *tbuf) ++{ ++ int err; ++ ++ if (dev->have_langid) ++ return 0; ++ ++ if (dev->string_langid < 0) ++ return -EPIPE; ++ ++ err = usb_string_sub(dev, 0, 0, tbuf); ++ ++ /* If the string was reported but is malformed, default to english ++ * (0x0409) */ ++ if (err == -ENODATA || (err > 0 && err < 4)) { ++ dev->string_langid = 0x0409; ++ dev->have_langid = 1; ++ dev_err(&dev->dev, ++ "string descriptor 0 malformed (err = %d), " ++ "defaulting to 0x%04x\n", ++ err, dev->string_langid); ++ return 0; ++ } ++ ++ /* In case of all other errors, we assume the device is not able to ++ * deal with strings at all. Set string_langid to -1 in order to ++ * prevent any string to be retrieved from the device */ ++ if (err < 0) { ++ dev_err(&dev->dev, "string descriptor 0 read error: %d\n", ++ err); ++ dev->string_langid = -1; ++ return -EPIPE; ++ } ++ ++ /* always use the first langid listed */ ++ dev->string_langid = tbuf[2] | (tbuf[3] << 8); ++ dev->have_langid = 1; ++ dev_dbg(&dev->dev, "default language 0x%04x\n", ++ dev->string_langid); ++ return 0; ++} ++ + /** + * usb_string - returns UTF-8 version of a string descriptor + * @dev: the device whose string descriptor is being retrieved +@@ -837,24 +879,9 @@ int usb_string(struct usb_device *dev, i + if (!tbuf) + return -ENOMEM; + +- /* get langid for strings if it's not yet known */ +- if (!dev->have_langid) { +- err = usb_string_sub(dev, 0, 0, tbuf); +- if (err < 0) { +- dev_err(&dev->dev, +- "string descriptor 0 read error: %d\n", +- err); +- } else if (err < 4) { +- dev_err(&dev->dev, "string descriptor 0 too short\n"); +- } else { +- dev->string_langid = tbuf[2] | (tbuf[3] << 8); +- /* always use the first langid listed */ +- dev_dbg(&dev->dev, "default language 0x%04x\n", +- dev->string_langid); +- } +- +- dev->have_langid = 1; +- } ++ err = usb_get_langid(dev, tbuf); ++ if (err < 0) ++ goto errout; + + err = usb_string_sub(dev, dev->string_langid, index, tbuf); + if (err < 0) diff --git a/usb.current/usb-fix-option_ms-regression-in-2.6.31-rc2.patch b/usb.current/usb-fix-option_ms-regression-in-2.6.31-rc2.patch new file mode 100644 index 00000000000000..558ab0b56c11b1 --- /dev/null +++ b/usb.current/usb-fix-option_ms-regression-in-2.6.31-rc2.patch @@ -0,0 +1,35 @@ +From noodles@earth.li Fri Jul 10 10:26:03 2009 +From: Jonathan McDowell <noodles@earth.li> +Date: Sun, 5 Jul 2009 12:29:51 +0100 +Subject: USB: Fix option_ms regression in 2.6.31-rc2 +To: Josua Dietze <digidietze@draisberghof.de>, Alan Stern <stern@rowland.harvard.edu>, Greg Kroah-Hartman <gregkh@suse.de> +Cc: usb-storage@lists.one-eyed-alien.net, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org +Message-ID: <20090705112951.GC23150@earth.li> +Content-Disposition: inline + + +Commit 32ebbe7b6ad44ae9c276419710b56de6ba705303 which filters the +SCSI REZERO command in option_ms based on a SCSI INQUIRY with a vendor +of Option breaks my Option Icon 225 (0af0:6971). This device returns a +vendor of ZCOPTION for the ZeroCD device. The following trivial patch +fixes things for me. + +Signed-Off-By: Jonathan McDowell <noodles@earth.li> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/storage/option_ms.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/usb/storage/option_ms.c ++++ b/drivers/usb/storage/option_ms.c +@@ -118,6 +118,9 @@ static int option_inquiry(struct us_data + + result = memcmp(buffer+8, "Option", 6); + ++ if (result != 0) ++ result = memcmp(buffer+8, "ZCOPTION", 8); ++ + /* Read the CSW */ + usb_stor_bulk_transfer_buf(us, + us->recv_bulk_pipe, diff --git a/usb.current/usb-fix-race-leading-to-a-write-after-kfree-in-usbfs.patch b/usb.current/usb-fix-race-leading-to-a-write-after-kfree-in-usbfs.patch new file mode 100644 index 00000000000000..c54ebbcd906595 --- /dev/null +++ b/usb.current/usb-fix-race-leading-to-a-write-after-kfree-in-usbfs.patch @@ -0,0 +1,85 @@ +From oliver@neukum.org Fri Jul 10 10:29:15 2009 +From: Oliver Neukum <oliver@neukum.org> +Date: Wed, 8 Jul 2009 19:09:23 +0200 +Subject: USB: fix race leading to a write after kfree in usbfs +To: Greg KH <greg@kroah.com>, Alan Stern <stern@rowland.harvard.edu>, Sarah Sharp <sarah.a.sharp@linux.intel.com> +Message-ID: <200907081909.24254.oliver@neukum.org> +Content-Disposition: inline + + + +this fixes a race between async_completed() and proc_reapurbnonblock(). + +CPU A CPU B + +spin_lock(&ps->lock); +list_move_tail(&as->asynclist, &ps->async_completed); +spin_unlock(&ps->lock); + + if (!(as = async_getcompleted(ps))) + return -EAGAIN; + return processcompl(as, (void __user * __user *)arg); + +processcompl() calls free_async() which calls kfree(as) + +as->status = urb->status; +if (as->signr) { + sinfo.si_signo = as->signr; + sinfo.si_errno = as->status; + sinfo.si_code = SI_ASYNCIO; + sinfo.si_addr = as->userurb; + kill_pid_info_as_uid(as->signr, &sinfo, as->pid, as->uid, + as->euid, as->secid); +} +snoop(&urb->dev->dev, "urb complete\n"); +snoop_urb(urb, as->userurb); + +write after kfree + +Signed-off-by: Oliver Neukum <oliver@neukum.org> + +--- + drivers/usb/core/devio.c | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +--- a/drivers/usb/core/devio.c ++++ b/drivers/usb/core/devio.c +@@ -325,21 +325,34 @@ static void async_completed(struct urb * + struct async *as = urb->context; + struct dev_state *ps = as->ps; + struct siginfo sinfo; ++ struct pid *pid = NULL; ++ uid_t uid = 0; ++ uid_t euid = 0; ++ u32 secid = 0; ++ int signr; + + spin_lock(&ps->lock); + list_move_tail(&as->asynclist, &ps->async_completed); +- spin_unlock(&ps->lock); + as->status = urb->status; +- if (as->signr) { ++ signr = as->signr; ++ if (signr) { + sinfo.si_signo = as->signr; + sinfo.si_errno = as->status; + sinfo.si_code = SI_ASYNCIO; + sinfo.si_addr = as->userurb; +- kill_pid_info_as_uid(as->signr, &sinfo, as->pid, as->uid, +- as->euid, as->secid); ++ pid = as->pid; ++ uid = as->uid; ++ euid = as->euid; ++ secid = as->secid; + } + snoop(&urb->dev->dev, "urb complete\n"); + snoop_urb(urb, as->userurb); ++ spin_unlock(&ps->lock); ++ ++ if (signr) ++ kill_pid_info_as_uid(sinfo.si_signo, &sinfo, pid, uid, ++ euid, secid); ++ + wake_up(&ps->wait); + } + diff --git a/usb.current/usb-ftdi-support-ndi-devices.patch b/usb.current/usb-ftdi-support-ndi-devices.patch new file mode 100644 index 00000000000000..2d5429fcbbe904 --- /dev/null +++ b/usb.current/usb-ftdi-support-ndi-devices.patch @@ -0,0 +1,174 @@ +From mgeleyns@ndigital.com Fri Jul 10 10:19:31 2009 +From: "Martin Geleynse" <mgeleyns@ndigital.com> +Date: Thu, 02 Jul 2009 13:10:35 -0400 +Subject: USB: ftdi: support NDI devices +To: <gregkh@suse.de> +Message-ID: <4A4CB1CB.9576.003F.0@ndigital.com> + + +It enhances the driver for FTDI-based USB serial adapters to recognize and +support Northern Digital Inc (NDI) measurement equipment. NDI has been +providing this patch for various kernel flavors for several years and we would +like to see these changes built in to the driver so that our equipement works +without the need for customers to patch the kernel themselves. + +The patch makes small modifications to 2 files: ./drivers/usb/serial/ftdi_sio.c +and ./drivers/usb/serial/ftdi_sio.h. It accomplishes 3 things: + +1. Define the VID and PIDs to allow the driver to recognize the NDI devices. +2. Map the 19200 baud rate setting to our higher baud rate of 1.2Mb + We would have chosen to map 38400 to the higher rate, similar to what + several other vendors have done, but some of our legacy customers actually + use 38400, therefore we remap 19200 to the higher rate. +3. We set the default transmit latency in the FTDI chip to 1ms for our devices. + Our devices are typically polled at 60Hz and the default ftdi latency + seriously affects turn-around time and results in missed data frames. We + have created a modprobe option that allows this setting to be increased. + This has proven necessary particularly in some virtualized environments. + +Signed-off-by: Martin P. Geleynse <mgeleyns@ndigital.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/usb/serial/ftdi_sio.c | 61 +++++++++++++++++++++++++++++++++++++++++- + drivers/usb/serial/ftdi_sio.h | 12 ++++++-- + 2 files changed, 69 insertions(+), 4 deletions(-) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -107,6 +107,7 @@ struct ftdi_sio_quirk { + + static int ftdi_jtag_probe(struct usb_serial *serial); + static int ftdi_mtxorb_hack_setup(struct usb_serial *serial); ++static int ftdi_NDI_device_setup(struct usb_serial *serial); + static void ftdi_USB_UIRT_setup(struct ftdi_private *priv); + static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv); + +@@ -118,6 +119,10 @@ static struct ftdi_sio_quirk ftdi_mtxorb + .probe = ftdi_mtxorb_hack_setup, + }; + ++static struct ftdi_sio_quirk ftdi_NDI_device_quirk = { ++ .probe = ftdi_NDI_device_setup, ++}; ++ + static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = { + .port_probe = ftdi_USB_UIRT_setup, + }; +@@ -648,6 +653,16 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13S_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13U_PID) }, + { USB_DEVICE(ELEKTOR_VID, ELEKTOR_FT323R_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_NDI_HUC_PID), ++ .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, ++ { USB_DEVICE(FTDI_VID, FTDI_NDI_SPECTRA_SCU_PID), ++ .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, ++ { USB_DEVICE(FTDI_VID, FTDI_NDI_FUTURE_2_PID), ++ .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, ++ { USB_DEVICE(FTDI_VID, FTDI_NDI_FUTURE_3_PID), ++ .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, ++ { USB_DEVICE(FTDI_VID, FTDI_NDI_AURORA_SCU_PID), ++ .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, + { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, +@@ -671,7 +686,6 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, + { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, + { USB_DEVICE(FTDI_VID, DIEBOLD_BCS_SE923_PID) }, +- { USB_DEVICE(FTDI_VID, FTDI_NDI_HUC_PID) }, + { USB_DEVICE(ATMEL_VID, STK541_PID) }, + { USB_DEVICE(DE_VID, STB_PID) }, + { USB_DEVICE(DE_VID, WHT_PID) }, +@@ -1027,6 +1041,16 @@ static __u32 get_ftdi_divisor(struct tty + case FT2232C: /* FT2232C chip */ + case FT232RL: + if (baud <= 3000000) { ++ __u16 product_id = le16_to_cpu( ++ port->serial->dev->descriptor.idProduct); ++ if (((FTDI_NDI_HUC_PID == product_id) || ++ (FTDI_NDI_SPECTRA_SCU_PID == product_id) || ++ (FTDI_NDI_FUTURE_2_PID == product_id) || ++ (FTDI_NDI_FUTURE_3_PID == product_id) || ++ (FTDI_NDI_AURORA_SCU_PID == product_id)) && ++ (baud == 19200)) { ++ baud = 1200000; ++ } + div_value = ftdi_232bm_baud_to_divisor(baud); + } else { + dbg("%s - Baud rate too high!", __func__); +@@ -1558,6 +1582,39 @@ static void ftdi_HE_TIRA1_setup(struct f + } /* ftdi_HE_TIRA1_setup */ + + /* ++ * Module parameter to control latency timer for NDI FTDI-based USB devices. ++ * If this value is not set in modprobe.conf.local its value will be set to 1ms. ++ */ ++static int ndi_latency_timer = 1; ++ ++/* Setup for the NDI FTDI-based USB devices, which requires hardwired ++ * baudrate (19200 gets mapped to 1200000). ++ * ++ * Called from usbserial:serial_probe. ++ */ ++static int ftdi_NDI_device_setup(struct usb_serial *serial) ++{ ++ struct usb_device *udev = serial->dev; ++ int latency = ndi_latency_timer; ++ int rv = 0; ++ char buf[1]; ++ ++ if (latency == 0) ++ latency = 1; ++ if (latency > 99) ++ latency = 99; ++ ++ dbg("%s setting NDI device latency to %d", __func__, latency); ++ dev_info(&udev->dev, "NDI device with a latency value of %d", latency); ++ ++ rv = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), ++ FTDI_SIO_SET_LATENCY_TIMER_REQUEST, ++ FTDI_SIO_SET_LATENCY_TIMER_REQUEST_TYPE, ++ latency, 0, buf, 0, WDR_TIMEOUT); ++ return 0; ++} ++ ++/* + * First port on JTAG adaptors such as Olimex arm-usb-ocd or the FIC/OpenMoko + * Neo1973 Debug Board is reserved for JTAG interface and can be accessed from + * userspace using openocd. +@@ -2626,3 +2683,5 @@ MODULE_PARM_DESC(vendor, "User specified + module_param(product, ushort, 0); + MODULE_PARM_DESC(product, "User specified product ID"); + ++module_param(ndi_latency_timer, int, S_IRUGO | S_IWUSR); ++MODULE_PARM_DESC(ndi_latency_timer, "NDI device latency timer override"); +--- a/drivers/usb/serial/ftdi_sio.h ++++ b/drivers/usb/serial/ftdi_sio.h +@@ -740,6 +740,15 @@ + #define FTDI_PYRAMID_PID 0xE6C8 /* Pyramid Appliance Display */ + + /* ++ * NDI (www.ndigital.com) product ids ++ */ ++#define FTDI_NDI_HUC_PID 0xDA70 /* NDI Host USB Converter */ ++#define FTDI_NDI_SPECTRA_SCU_PID 0xDA71 /* NDI Spectra SCU */ ++#define FTDI_NDI_FUTURE_2_PID 0xDA72 /* NDI future device #2 */ ++#define FTDI_NDI_FUTURE_3_PID 0xDA73 /* NDI future device #3 */ ++#define FTDI_NDI_AURORA_SCU_PID 0xDA74 /* NDI Aurora SCU */ ++ ++/* + * Posiflex inc retail equipment (http://www.posiflex.com.tw) + */ + #define POSIFLEX_VID 0x0d3a /* Vendor ID */ +@@ -852,9 +861,6 @@ + #define TML_VID 0x1B91 /* Vendor ID */ + #define TML_USB_SERIAL_PID 0x0064 /* USB - Serial Converter */ + +-/* NDI Polaris System */ +-#define FTDI_NDI_HUC_PID 0xDA70 +- + /* Propox devices */ + #define FTDI_PROPOX_JTAGCABLEII_PID 0xD738 + diff --git a/usb.current/usb-gadget-audio-select-snd_pcm.patch b/usb.current/usb-gadget-audio-select-snd_pcm.patch new file mode 100644 index 00000000000000..c7f3e417aa2ce1 --- /dev/null +++ b/usb.current/usb-gadget-audio-select-snd_pcm.patch @@ -0,0 +1,41 @@ +From randy.dunlap@oracle.com Fri Jul 10 10:25:25 2009 +From: Randy Dunlap <randy.dunlap@oracle.com> +Date: Fri, 3 Jul 2009 13:26:57 -0700 +Subject: USB: gadget audio: select SND_PCM +To: Stephen Rothwell <sfr@canb.auug.org.au>, akpm <akpm@linux-foundation.org>, dbrownell@users.sourceforge.net +Message-ID: <20090703132657.3289cdcf.randy.dunlap@oracle.com> + + +From: Randy Dunlap <randy.dunlap@oracle.com> + +Fix USB gadget audio: select SND_PCM, like many other sound +drivers do, to fix build errors: + +drivers/built-in.o: In function `f_audio_playback_work': +audio.c:(.text+0x15a3e7): undefined reference to `snd_pcm_kernel_ioctl' +audio.c:(.text+0x15a471): undefined reference to `snd_pcm_lib_write' +drivers/built-in.o: In function `_snd_pcm_hw_param_set': +audio.c:(.text+0x15aca7): undefined reference to `snd_interval_refine' +drivers/built-in.o: In function `gaudio_setup': +(.init.text+0x12adf): undefined reference to `_snd_pcm_hw_params_any' +drivers/built-in.o: In function `gaudio_setup': +(.init.text+0x12b43): undefined reference to `snd_pcm_kernel_ioctl' + +Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> +Acked-by: David Brownell <dbrownell@users.sourceforge.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/gadget/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/gadget/Kconfig ++++ b/drivers/usb/gadget/Kconfig +@@ -604,6 +604,7 @@ config USB_ZERO_HNPTEST + config USB_AUDIO + tristate "Audio Gadget (EXPERIMENTAL)" + depends on SND ++ select SND_PCM + help + Gadget Audio is compatible with USB Audio Class specification 1.0. + It will include at least one AudioControl interface, zero or more diff --git a/usb.current/usb-musb_host-undo-incorrect-change-in-musb_advance_schedule.patch b/usb.current/usb-musb_host-undo-incorrect-change-in-musb_advance_schedule.patch new file mode 100644 index 00000000000000..25dcd0333059c3 --- /dev/null +++ b/usb.current/usb-musb_host-undo-incorrect-change-in-musb_advance_schedule.patch @@ -0,0 +1,33 @@ +From sshtylyov@ru.mvista.com Fri Jul 10 10:33:25 2009 +From: Sergei Shtylyov <sshtylyov@ru.mvista.com> +Date: Fri, 10 Jul 2009 20:02:44 +0300 +Subject: USB: musb_host: undo incorrect change in musb_advance_schedule() +To: gregkh@suse.de +Cc: linux-usb@vger.kernel.org, david-b@pacbell.net, felipe.balbi@nokia.com +Message-ID: <200907102102.44733.sshtylyov@ru.mvista.com> +Content-Disposition: inline + + +Commit c9cd06b3d6ea825c62e277def929cc4315802b48 (musb_host: refactor +URB giveback) included due to my overlook the change incorrect in the +context of the current kernel -- undo it. + +Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> +Acked-by: David Brownell <dbrownell@users.sourceforge.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/musb/musb_host.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/musb/musb_host.c ++++ b/drivers/usb/musb/musb_host.c +@@ -373,7 +373,7 @@ static void musb_advance_schedule(struct + musb_save_toggle(qh, is_in, urb); + break; + case USB_ENDPOINT_XFER_ISOC: +- if (urb->error_count) ++ if (status == 0 && urb->error_count) + status = -EXDEV; + break; + } diff --git a/usb.current/usb-option-remove-unnecessary-and-erroneous-code.patch b/usb.current/usb-option-remove-unnecessary-and-erroneous-code.patch new file mode 100644 index 00000000000000..b4aaae4972d047 --- /dev/null +++ b/usb.current/usb-option-remove-unnecessary-and-erroneous-code.patch @@ -0,0 +1,95 @@ +From stern@rowland.harvard.edu Fri Jul 10 10:34:03 2009 +From: Alan Stern <stern@rowland.harvard.edu> +Date: Thu, 9 Jul 2009 12:58:43 -0400 (EDT) +Subject: USB: option: remove unnecessary and erroneous code +To: Greg KH <greg@kroah.com> +Message-ID: <Pine.LNX.4.44L0.0907091257050.11201-100000@iolanthe.rowland.org> + + +This patch (as1264) removes a bunch of unnecessary and erroneous stuff +from the option USB-serial driver. Clearly there's no need to verify +that the device pointer stored in the URBs is right or to store the +same pointer over again. After all, the pointer can't change once it +has been set up. + +There's also no need to call usb_clear_halt for the IN endpoint +multiple times -- in fact, doing so is an error since every time after +the first there will be active URBs queued for that endpoint. Since +the Clear-Halts don't appear to be needed at all, the patch simply +removes them. + +Signed-off-by: Alan Stern <stern@rowland.harvard.edu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 27 +-------------------------- + 1 file changed, 1 insertion(+), 26 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -748,7 +748,6 @@ static int option_write(struct tty_struc + memcpy(this_urb->transfer_buffer, buf, todo); + this_urb->transfer_buffer_length = todo; + +- this_urb->dev = port->serial->dev; + err = usb_submit_urb(this_urb, GFP_ATOMIC); + if (err) { + dbg("usb_submit_urb %p (write bulk) failed " +@@ -876,7 +875,6 @@ static void option_instat_callback(struc + + /* Resubmit urb so we continue receiving IRQ data */ + if (status != -ESHUTDOWN && status != -ENOENT) { +- urb->dev = serial->dev; + err = usb_submit_urb(urb, GFP_ATOMIC); + if (err) + dbg("%s: resubmit intr urb failed. (%d)", +@@ -937,23 +935,11 @@ static int option_open(struct tty_struct + + dbg("%s", __func__); + +- /* Reset low level data toggle and start reading from endpoints */ ++ /* Start reading from the IN endpoint */ + for (i = 0; i < N_IN_URB; i++) { + urb = portdata->in_urbs[i]; + if (!urb) + continue; +- if (urb->dev != serial->dev) { +- dbg("%s: dev %p != %p", __func__, +- urb->dev, serial->dev); +- continue; +- } +- +- /* +- * make sure endpoint data toggle is synchronized with the +- * device +- */ +- usb_clear_halt(urb->dev, urb->pipe); +- + err = usb_submit_urb(urb, GFP_KERNEL); + if (err) { + dbg("%s: submit urb %d failed (%d) %d", +@@ -962,16 +948,6 @@ static int option_open(struct tty_struct + } + } + +- /* Reset low level data toggle on out endpoints */ +- for (i = 0; i < N_OUT_URB; i++) { +- urb = portdata->out_urbs[i]; +- if (!urb) +- continue; +- urb->dev = serial->dev; +- /* usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), +- usb_pipeout(urb->pipe), 0); */ +- } +- + option_send_setup(port); + + return 0; +@@ -1234,7 +1210,6 @@ static int option_resume(struct usb_seri + dbg("%s: No interrupt URB for port %d\n", __func__, i); + continue; + } +- port->interrupt_in_urb->dev = serial->dev; + err = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO); + dbg("Submitted interrupt URB for port %d (result %d)", i, err); + if (err < 0) { diff --git a/usb.current/usb-option.c-add-a-link-3gu-device-id.patch b/usb.current/usb-option.c-add-a-link-3gu-device-id.patch new file mode 100644 index 00000000000000..9816a45f5a03c2 --- /dev/null +++ b/usb.current/usb-option.c-add-a-link-3gu-device-id.patch @@ -0,0 +1,50 @@ +From anssi.hannula@gmail.com Fri Jul 10 10:26:42 2009 +From: Anssi Hannula <anssi.hannula@gmail.com> +Date: Mon, 06 Jul 2009 19:08:59 +0300 +Subject: USB: option.c: add A-Link 3GU device id +To: Matthias Urlichs <smurf@smurf.noris.de> +Cc: linux-usb@vger.kernel.org +Message-ID: <4A52219B.1090407@gmail.com> + + +Add A-Link 3GU device id 1e0e:9200 into option driver. The device +has 4 interfaces, of which 1 is handled by storage and the other 3 +by option driver. + +The device appears first as CD-only 1e0e:f000 device and must be +switched to 1e0e:9200 mode either by using "eject CD" or +usb_modeswitch. + +For the record, the device does not work with generic usbserial +driver (usb disconnect when sending the ATDT command). + +Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/usb/serial/option.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -319,6 +319,9 @@ static int option_resume(struct usb_ser + #define TOSHIBA_VENDOR_ID 0x0930 + #define TOSHIBA_PRODUCT_HSDPA_MINICARD 0x1302 + ++#define ALINK_VENDOR_ID 0x1e0e ++#define ALINK_PRODUCT_3GU 0x9200 ++ + static struct usb_device_id option_ids[] = { + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, +@@ -542,7 +545,8 @@ static struct usb_device_id option_ids[] + { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, + { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4519) }, + { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */ +- { USB_DEVICE(0x1e0e, 0x9000) }, ++ { USB_DEVICE(ALINK_VENDOR_ID, 0x9000) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) }, + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, option_ids); diff --git a/usb.current/usb-serial-add-id-for-turtelizer-an-ft2232l-based-jtag-rs-232-adapter.patch b/usb.current/usb-serial-add-id-for-turtelizer-an-ft2232l-based-jtag-rs-232-adapter.patch new file mode 100644 index 00000000000000..88031a4c7caf55 --- /dev/null +++ b/usb.current/usb-serial-add-id-for-turtelizer-an-ft2232l-based-jtag-rs-232-adapter.patch @@ -0,0 +1,40 @@ +From khc@pm.waw.pl Fri Jul 10 10:31:00 2009 +From: Krzysztof Halasa <khc@pm.waw.pl> +Date: Fri, 10 Jul 2009 01:06:23 +0200 +Subject: USB serial: Add ID for Turtelizer, an FT2232L-based JTAG/RS-232 adapter. +To: Greg Kroah-Hartman <gregkh@suse.de> +Message-ID: <m3skh5v4ls.fsf@intrepid.localdomain> + + +Adds USB ID for Turtelizer, an FT2232L-based JTAG/RS-232 adapter. + +Signed-off-by: Krzysztof Ha�asa <khc@pm.waw.pl> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/ftdi_sio.c | 2 ++ + drivers/usb/serial/ftdi_sio.h | 2 ++ + 2 files changed, 4 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -679,6 +679,8 @@ static struct usb_device_id id_table_com + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(FTDI_VID, LMI_LM3S_EVAL_BOARD_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, ++ { USB_DEVICE(FTDI_VID, FTDI_TURTELIZER_PID), ++ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, + { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, + { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, +--- a/drivers/usb/serial/ftdi_sio.h ++++ b/drivers/usb/serial/ftdi_sio.h +@@ -944,6 +944,8 @@ + #define MARVELL_VID 0x9e88 + #define MARVELL_SHEEVAPLUG_PID 0x9e8f + ++#define FTDI_TURTELIZER_PID 0xBDC8 /* JTAG/RS-232 adapter by egnite GmBH */ ++ + /* + * BmRequestType: 1100 0000b + * bRequest: FTDI_E2_READ diff --git a/usb.current/usb-serial-add-support-for-arkham-technology-adapters.patch b/usb.current/usb-serial-add-support-for-arkham-technology-adapters.patch new file mode 100644 index 00000000000000..90b245dc085b08 --- /dev/null +++ b/usb.current/usb-serial-add-support-for-arkham-technology-adapters.patch @@ -0,0 +1,29 @@ +From amit.kucheria@canonical.com Fri Jul 10 10:26:20 2009 +From: Amit Kucheria <amit.kucheria@canonical.com> +Date: Mon, 6 Jul 2009 14:19:59 +0300 +Subject: USB: Serial: Add support for Arkham Technology adapters +Cc: dpotts@arkhamtechnology.com, craig@microtron.org.uk, gregkh@suse.de +Message-ID: <1246879199-12304-1-git-send-email-amit.kucheria@canonical.com> + + +As reported by David Potts from Arkham Technology, the current driver +works with their hardware on addition of the device ids. + +Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/cp210x.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -67,6 +67,8 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x10AB, 0x10C5) }, /* Siemens MC60 Cable */ + { USB_DEVICE(0x10B5, 0xAC70) }, /* Nokia CA-42 USB */ + { USB_DEVICE(0x10C4, 0x0F91) }, /* Vstabi */ ++ { USB_DEVICE(0x10C4, 0x1101) }, /* Arkham Technology DS101 Bus Monitor */ ++ { USB_DEVICE(0x10C4, 0x1601) }, /* Arkham Technology DS101 Adapter */ + { USB_DEVICE(0x10C4, 0x800A) }, /* SPORTident BSM7-D-USB main station */ + { USB_DEVICE(0x10C4, 0x803B) }, /* Pololu USB-serial converter */ + { USB_DEVICE(0x10C4, 0x8053) }, /* Enfora EDG1228 */ diff --git a/usb.current/usb-serial-sierra-driver-id_table-additions.patch b/usb.current/usb-serial-sierra-driver-id_table-additions.patch new file mode 100644 index 00000000000000..0578548dcde2d4 --- /dev/null +++ b/usb.current/usb-serial-sierra-driver-id_table-additions.patch @@ -0,0 +1,106 @@ +From epasheva@sierrawireless.com Fri Jul 10 10:31:30 2009 +From: Elina Pasheva <epasheva@sierrawireless.com> +Date: Thu, 9 Jul 2009 17:55:18 -0700 +Subject: USB: serial: sierra driver id_table additions +To: "gregkh@suse.de" <gregkh@suse.de>, <alan@lxorguk.ukuu.org.uk> +Cc: <epasheva@sierrawireless.com>, <rfiler@sierrawireless.com>, <linux-usb@vger.kernel.org> +Message-ID: <1247187318.25913.29.camel@Linuxdev3> + + +From: Elina Pasheva <epasheva@sierrawireless.com> + + - Updated the id_table with all devices that Sierra Wireless currently + support + - Re-ordered the contents of the id_table for better readability + +Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/sierra.c | 46 +++++++++++++++++++++++++++----------------- + 1 file changed, 29 insertions(+), 17 deletions(-) + +--- a/drivers/usb/serial/sierra.c ++++ b/drivers/usb/serial/sierra.c +@@ -181,35 +181,50 @@ static const struct sierra_iface_info di + }; + + static struct usb_device_id id_table [] = { ++ { USB_DEVICE(0x0F3D, 0x0112) }, /* Airprime/Sierra PC 5220 */ ++ { USB_DEVICE(0x03F0, 0x1B1D) }, /* HP ev2200 a.k.a MC5720 */ ++ { USB_DEVICE(0x03F0, 0x1E1D) }, /* HP hs2300 a.k.a MC8775 */ ++ + { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ + { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ +- { USB_DEVICE(0x03f0, 0x1b1d) }, /* HP ev2200 a.k.a MC5720 */ + { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ +- { USB_DEVICE(0x1199, 0x0024) }, /* Sierra Wireless MC5727 */ + { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ ++ { USB_DEVICE(0x1199, 0x0022) }, /* Sierra Wireless EM5725 */ ++ { USB_DEVICE(0x1199, 0x0024) }, /* Sierra Wireless MC5727 */ ++ { USB_DEVICE(0x1199, 0x0224) }, /* Sierra Wireless MC5727 */ + { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ + { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ ++ { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U */ +- /* Sierra Wireless C597 */ ++ /* Sierra Wireless C597 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x0023, 0xFF, 0xFF, 0xFF) }, +- /* Sierra Wireless Device */ ++ /* Sierra Wireless T598 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x0025, 0xFF, 0xFF, 0xFF) }, +- { USB_DEVICE(0x1199, 0x0026) }, /* Sierra Wireless Device */ +- { USB_DEVICE(0x1199, 0x0027) }, /* Sierra Wireless Device */ +- { USB_DEVICE(0x1199, 0x0028) }, /* Sierra Wireless Device */ ++ { USB_DEVICE(0x1199, 0x0026) }, /* Sierra Wireless T11 */ ++ { USB_DEVICE(0x1199, 0x0027) }, /* Sierra Wireless AC402 */ ++ { USB_DEVICE(0x1199, 0x0028) }, /* Sierra Wireless MC5728 */ ++ { USB_DEVICE(0x1199, 0x0029) }, /* Sierra Wireless Device */ + + { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ +- { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ + { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ ++ { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 */ ++ { USB_DEVICE(0x1199, 0x6805) }, /* Sierra Wireless MC8765 */ ++ { USB_DEVICE(0x1199, 0x6808) }, /* Sierra Wireless MC8755 */ ++ { USB_DEVICE(0x1199, 0x6809) }, /* Sierra Wireless MC8765 */ + { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */ +- { USB_DEVICE(0x1199, 0x6813) }, /* Sierra Wireless MC8775 (Lenovo) */ ++ { USB_DEVICE(0x1199, 0x6813) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6815) }, /* Sierra Wireless MC8775 */ +- { USB_DEVICE(0x03f0, 0x1e1d) }, /* HP hs2300 a.k.a MC8775 */ ++ { USB_DEVICE(0x1199, 0x6816) }, /* Sierra Wireless MC8775 */ + { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ + { USB_DEVICE(0x1199, 0x6821) }, /* Sierra Wireless AirCard 875U */ ++ { USB_DEVICE(0x1199, 0x6822) }, /* Sierra Wireless AirCard 875E */ + { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780 */ + { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781 */ ++ { USB_DEVICE(0x1199, 0x6834) }, /* Sierra Wireless MC8780 */ ++ { USB_DEVICE(0x1199, 0x6835) }, /* Sierra Wireless MC8781 */ ++ { USB_DEVICE(0x1199, 0x6838) }, /* Sierra Wireless MC8780 */ ++ { USB_DEVICE(0x1199, 0x6839) }, /* Sierra Wireless MC8781 */ + { USB_DEVICE(0x1199, 0x683A) }, /* Sierra Wireless MC8785 */ + { USB_DEVICE(0x1199, 0x683B) }, /* Sierra Wireless MC8785 Composite */ + /* Sierra Wireless MC8790, MC8791, MC8792 Composite */ +@@ -227,16 +242,13 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x1199, 0x685A) }, /* Sierra Wireless AirCard 885 E */ + /* Sierra Wireless C885 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6880, 0xFF, 0xFF, 0xFF)}, +- /* Sierra Wireless Device */ ++ /* Sierra Wireless C888, Air Card 501, USB 303, USB 304 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6890, 0xFF, 0xFF, 0xFF)}, +- /* Sierra Wireless Device */ ++ /* Sierra Wireless C22/C33 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6891, 0xFF, 0xFF, 0xFF)}, +- /* Sierra Wireless Device */ ++ /* Sierra Wireless HSPA Non-Composite Device */ + { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6892, 0xFF, 0xFF, 0xFF)}, +- +- { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ +- { USB_DEVICE(0x0F3D, 0x0112) }, /* Airprime/Sierra PC 5220 */ +- ++ { USB_DEVICE(0x1199, 0x6893) }, /* Sierra Wireless Device */ + { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ + .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist + }, diff --git a/usb.current/usb-sierra-fix-oops-upon-device-close.patch b/usb.current/usb-sierra-fix-oops-upon-device-close.patch new file mode 100644 index 00000000000000..7d635fa8af0b95 --- /dev/null +++ b/usb.current/usb-sierra-fix-oops-upon-device-close.patch @@ -0,0 +1,53 @@ +From stern@rowland.harvard.edu Fri Jul 10 10:28:44 2009 +From: Alan Stern <stern@rowland.harvard.edu> +Date: Tue, 7 Jul 2009 09:50:14 -0400 (EDT) +Subject: USB: Sierra: fix oops upon device close +To: Greg KH <greg@kroah.com> +Cc: Peter Naulls <peter@mushroomnetworks.com> +Message-ID: <Pine.LNX.4.44L0.0907070948270.3297-100000@iolanthe.rowland.org> + + +This patch (as1263) fixes a mixup that occurred when conflicting +patches for the sierra driver were merged incorrectly. The former +sierra_shutdown routine should have been become sierra_release, not +sierra_disconnect. + +The symptom this fixes is an oops when the device file is closed after +a Sierra device has been unplugged (Bugzilla #13675). + +Signed-off-by: Alan Stern <stern@rowland.harvard.edu> +Tested-by: Peter Naulls <peter@mushroomnetworks.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/sierra.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/usb/serial/sierra.c ++++ b/drivers/usb/serial/sierra.c +@@ -814,7 +814,7 @@ static int sierra_startup(struct usb_ser + return 0; + } + +-static void sierra_disconnect(struct usb_serial *serial) ++static void sierra_release(struct usb_serial *serial) + { + int i; + struct usb_serial_port *port; +@@ -830,7 +830,6 @@ static void sierra_disconnect(struct usb + if (!portdata) + continue; + kfree(portdata); +- usb_set_serial_port_data(port, NULL); + } + } + +@@ -853,7 +852,7 @@ static struct usb_serial_driver sierra_d + .tiocmget = sierra_tiocmget, + .tiocmset = sierra_tiocmset, + .attach = sierra_startup, +- .disconnect = sierra_disconnect, ++ .release = sierra_release, + .read_int_callback = sierra_instat_callback, + }; + diff --git a/usb/usb-add-nuvoton-ehci-driver-for-w90p910-platform.patch b/usb/usb-add-nuvoton-ehci-driver-for-w90p910-platform.patch new file mode 100644 index 00000000000000..d1dfe894fe65a4 --- /dev/null +++ b/usb/usb-add-nuvoton-ehci-driver-for-w90p910-platform.patch @@ -0,0 +1,253 @@ +From mcuos.com@gmail.com Fri Jul 10 10:12:54 2009 +From: Wan ZongShun <mcuos.com@gmail.com> +Date: Sat, 13 Jun 2009 09:14:28 +0800 +Subject: USB: Add nuvoton Ehci driver for w90p910 platform +To: Wan ZongShun <mcuos.com@gmail.com>, David Brownell <david-b@pacbell.net> +Cc: Eric Miao <eric.y.miao@gmail.com>, Greg KH <greg@kroah.com> +Message-ID: <4A32FD74.3050608@gmail.com> + + +Add ehci support for w90p910 platform. + +Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> +Cc: David Brownell <david-b@pacbell.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/Kconfig | 2 + drivers/usb/host/Kconfig | 6 + + drivers/usb/host/ehci-hcd.c | 5 + + drivers/usb/host/ehci-w90x900.c | 181 ++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 194 insertions(+) + +--- a/drivers/usb/host/ehci-hcd.c ++++ b/drivers/usb/host/ehci-hcd.c +@@ -1116,6 +1116,11 @@ MODULE_LICENSE ("GPL"); + #define PLATFORM_DRIVER ixp4xx_ehci_driver + #endif + ++#ifdef CONFIG_USB_W90X900_EHCI ++#include "ehci-w90x900.c" ++#define PLATFORM_DRIVER ehci_hcd_w90x900_driver ++#endif ++ + #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \ + !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) + #error "missing bus glue for ehci-hcd" +--- /dev/null ++++ b/drivers/usb/host/ehci-w90x900.c +@@ -0,0 +1,181 @@ ++/* ++ * linux/driver/usb/host/ehci-w90x900.c ++ * ++ * Copyright (c) 2008 Nuvoton technology corporation. ++ * ++ * Wan ZongShun <mcuos.com@gmail.com> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation;version 2 of the License. ++ * ++ */ ++ ++#include <linux/platform_device.h> ++ ++/*ebable phy0 and phy1 for w90p910*/ ++#define ENPHY (0x01<<8) ++#define PHY0_CTR (0xA4) ++#define PHY1_CTR (0xA8) ++ ++static int __devinit usb_w90x900_probe(const struct hc_driver *driver, ++ struct platform_device *pdev) ++{ ++ struct usb_hcd *hcd; ++ struct ehci_hcd *ehci; ++ struct resource *res; ++ int retval = 0, irq; ++ unsigned long val; ++ ++ ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ if (!res) { ++ retval = -ENXIO; ++ goto err1; ++ } ++ ++ hcd = usb_create_hcd(driver, &pdev->dev, "w90x900 EHCI"); ++ if (!hcd) { ++ retval = -ENOMEM; ++ goto err1; ++ } ++ ++ hcd->rsrc_start = res->start; ++ hcd->rsrc_len = res->end - res->start + 1; ++ ++ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { ++ retval = -EBUSY; ++ goto err2; ++ } ++ ++ hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); ++ if (hcd->regs == NULL) { ++ retval = -EFAULT; ++ goto err3; ++ } ++ ++ ehci = hcd_to_ehci(hcd); ++ ehci->caps = hcd->regs; ++ ehci->regs = hcd->regs + ++ HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); ++ ++ /* enable PHY 0,1,the regs only apply to w90p910 ++ * 0xA4,0xA8 were offsets of PHY0 and PHY1 controller of ++ * w90p910 IC relative to ehci->regs. ++ */ ++ val = __raw_readl(ehci->regs+PHY0_CTR); ++ val |= ENPHY; ++ __raw_writel(val, ehci->regs+PHY0_CTR); ++ ++ val = __raw_readl(ehci->regs+PHY1_CTR); ++ val |= ENPHY; ++ __raw_writel(val, ehci->regs+PHY1_CTR); ++ ++ ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); ++ ehci->sbrn = 0x20; ++ ++ irq = platform_get_irq(pdev, 0); ++ if (irq < 0) ++ goto err4; ++ ++ retval = usb_add_hcd(hcd, irq, IRQF_SHARED); ++ if (retval != 0) ++ goto err4; ++ ++ ehci_writel(ehci, 1, &ehci->regs->configured_flag); ++ ++ return retval; ++err4: ++ iounmap(hcd->regs); ++err3: ++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ++err2: ++ usb_put_hcd(hcd); ++err1: ++ return retval; ++} ++ ++static ++void usb_w90x900_remove(struct usb_hcd *hcd, struct platform_device *pdev) ++{ ++ usb_remove_hcd(hcd); ++ iounmap(hcd->regs); ++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ++ usb_put_hcd(hcd); ++} ++ ++static const struct hc_driver ehci_w90x900_hc_driver = { ++ .description = hcd_name, ++ .product_desc = "Nuvoton w90x900 EHCI Host Controller", ++ .hcd_priv_size = sizeof(struct ehci_hcd), ++ ++ /* ++ * generic hardware linkage ++ */ ++ .irq = ehci_irq, ++ .flags = HCD_USB2|HCD_MEMORY, ++ ++ /* ++ * basic lifecycle operations ++ */ ++ .reset = ehci_init, ++ .start = ehci_run, ++ ++ .stop = ehci_stop, ++ .shutdown = ehci_shutdown, ++ ++ /* ++ * managing i/o requests and associated device resources ++ */ ++ .urb_enqueue = ehci_urb_enqueue, ++ .urb_dequeue = ehci_urb_dequeue, ++ .endpoint_disable = ehci_endpoint_disable, ++ ++ /* ++ * scheduling support ++ */ ++ .get_frame_number = ehci_get_frame, ++ ++ /* ++ * root hub support ++ */ ++ .hub_status_data = ehci_hub_status_data, ++ .hub_control = ehci_hub_control, ++#ifdef CONFIG_PM ++ .bus_suspend = ehci_bus_suspend, ++ .bus_resume = ehci_bus_resume, ++#endif ++ .relinquish_port = ehci_relinquish_port, ++ .port_handed_over = ehci_port_handed_over, ++}; ++ ++static int __devinit ehci_w90x900_probe(struct platform_device *pdev) ++{ ++ if (usb_disabled()) ++ return -ENODEV; ++ ++ return usb_w90x900_probe(&ehci_w90x900_hc_driver, pdev); ++} ++ ++static int __devexit ehci_w90x900_remove(struct platform_device *pdev) ++{ ++ struct usb_hcd *hcd = platform_get_drvdata(pdev); ++ ++ usb_w90x900_remove(hcd, pdev); ++ ++ return 0; ++} ++ ++static struct platform_driver ehci_hcd_w90x900_driver = { ++ .probe = ehci_w90x900_probe, ++ .remove = __devexit_p(ehci_w90x900_remove), ++ .driver = { ++ .name = "w90x900-ehci", ++ .owner = THIS_MODULE, ++ }, ++}; ++ ++MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); ++MODULE_DESCRIPTION("w90p910 usb ehci driver!"); ++MODULE_LICENSE("GPL"); ++MODULE_ALIAS("platform:w90p910-ehci"); +--- a/drivers/usb/host/Kconfig ++++ b/drivers/usb/host/Kconfig +@@ -113,6 +113,12 @@ config USB_EHCI_HCD_PPC_OF + Enables support for the USB controller present on the PowerPC + OpenFirmware platform bus. + ++config USB_W90X900_EHCI ++ bool "W90X900(W90P910) EHCI support" ++ depends on USB_EHCI_HCD && ARCH_W90X900 ++ ---help--- ++ Enables support for the W90X900 USB controller ++ + config USB_OXU210HP_HCD + tristate "OXU210HP HCD support" + depends on USB +--- a/drivers/usb/Kconfig ++++ b/drivers/usb/Kconfig +@@ -39,6 +39,7 @@ config USB_ARCH_HAS_OHCI + default y if ARCH_AT91 + default y if ARCH_PNX4008 && I2C + default y if MFD_TC6393XB ++ default y if ARCH_W90X900 + # PPC: + default y if STB03xxx + default y if PPC_MPC52xx +@@ -58,6 +59,7 @@ config USB_ARCH_HAS_EHCI + default y if PPC_83xx + default y if SOC_AU1200 + default y if ARCH_IXP4XX ++ default y if ARCH_W90X900 + default PCI + + # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface. @@ -1 +1 @@ -2.6.31-rc1 +2.6.31-rc2 |
