From: Greg Kroah-Hartman Date: Tue, 1 Nov 2011 21:17:29 +0000 (-0700) Subject: 3.1 patches X-Git-Tag: v3.0.9~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc1c5f6a2edaf5ecc8a8bca80e07dd341c0ebccc;p=thirdparty%2Fkernel%2Fstable-queue.git 3.1 patches --- diff --git a/queue-3.1/ath9k-disable-unnecessary-phy-error-reporting.patch b/queue-3.1/ath9k-disable-unnecessary-phy-error-reporting.patch new file mode 100644 index 00000000000..2a768c39591 --- /dev/null +++ b/queue-3.1/ath9k-disable-unnecessary-phy-error-reporting.patch @@ -0,0 +1,60 @@ +From ac06697c79bad09e44a8b1d52104014016fb90de Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sat, 8 Oct 2011 15:49:57 +0200 +Subject: ath9k: disable unnecessary PHY error reporting + +From: Felix Fietkau + +commit ac06697c79bad09e44a8b1d52104014016fb90de upstream. + +PHY errors relevant for ANI are always tracked by hardware counters, the +bits that allow them to pass through the rx filter are independent of that. +Enabling PHY errors in the rx filter often creates lots of useless DMA traffic +and might be responsible for some of the rx dma stop failure warnings. + +Signed-off-by: Felix Fietkau +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/ani.c | 5 ----- + drivers/net/wireless/ath/ath9k/recv.c | 5 +---- + 2 files changed, 1 insertion(+), 9 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/ani.c ++++ b/drivers/net/wireless/ath/ath9k/ani.c +@@ -502,9 +502,6 @@ static void ath9k_ani_reset_old(struct a + ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR, + ATH9K_ANI_CCK_WEAK_SIG_THR); + +- ath9k_hw_setrxfilter(ah, ath9k_hw_getrxfilter(ah) | +- ATH9K_RX_FILTER_PHYERR); +- + ath9k_ani_restart(ah); + return; + } +@@ -525,8 +522,6 @@ static void ath9k_ani_reset_old(struct a + ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, + aniState->firstepLevel); + +- ath9k_hw_setrxfilter(ah, ath9k_hw_getrxfilter(ah) & +- ~ATH9K_RX_FILTER_PHYERR); + ath9k_ani_restart(ah); + + ENABLE_REGWRITE_BUFFER(ah); +--- a/drivers/net/wireless/ath/ath9k/recv.c ++++ b/drivers/net/wireless/ath/ath9k/recv.c +@@ -433,12 +433,9 @@ void ath_rx_cleanup(struct ath_softc *sc + + u32 ath_calcrxfilter(struct ath_softc *sc) + { +-#define RX_FILTER_PRESERVE (ATH9K_RX_FILTER_PHYERR | ATH9K_RX_FILTER_PHYRADAR) +- + u32 rfilt; + +- rfilt = (ath9k_hw_getrxfilter(sc->sc_ah) & RX_FILTER_PRESERVE) +- | ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST ++ rfilt = ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST + | ATH9K_RX_FILTER_MCAST; + + if (sc->rx.rxfilter & FIF_PROBE_REQ) diff --git a/queue-3.1/ath9k_htc-add-avm-fritz-wlan-11n-v2-support.patch b/queue-3.1/ath9k_htc-add-avm-fritz-wlan-11n-v2-support.patch new file mode 100644 index 00000000000..ef5a1dd0f86 --- /dev/null +++ b/queue-3.1/ath9k_htc-add-avm-fritz-wlan-11n-v2-support.patch @@ -0,0 +1,35 @@ +From 8c34559b4a6df32e4af1b073397fa4dc189a5485 Mon Sep 17 00:00:00 2001 +From: "Luis R. Rodriguez" +Date: Thu, 29 Sep 2011 10:42:19 -0700 +Subject: ath9k_htc: add AVM FRITZ!WLAN 11N v2 support + +From: "Luis R. Rodriguez" + +commit 8c34559b4a6df32e4af1b073397fa4dc189a5485 upstream. + +This was reported and tested by Martin Walter over at AVM GmbH Berlin. +This also applies to 3.0.1 so sendint to stable. + +Cc: s.kirste@avm.de +Cc: d.friedel@avm.de +Cc: Martin Walter +Cc: Peter Grabienski +Tested-by: Martin Walter +Signed-off-by: Luis R. Rodriguez +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/hif_usb.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/ath/ath9k/hif_usb.c ++++ b/drivers/net/wireless/ath/ath9k/hif_usb.c +@@ -38,6 +38,7 @@ static struct usb_device_id ath9k_hif_us + { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ + { USB_DEVICE(0x040D, 0x3801) }, /* VIA */ + { USB_DEVICE(0x0cf3, 0xb003) }, /* Ubiquiti WifiStation Ext */ ++ { USB_DEVICE(0x057c, 0x8403) }, /* AVM FRITZ!WLAN 11N v2 USB */ + + { USB_DEVICE(0x0cf3, 0x7015), + .driver_info = AR9287_USB }, /* Atheros */ diff --git a/queue-3.1/ath9k_hw-fix-descriptor-status-of-txopexceeded.patch b/queue-3.1/ath9k_hw-fix-descriptor-status-of-txopexceeded.patch new file mode 100644 index 00000000000..6630723a5e0 --- /dev/null +++ b/queue-3.1/ath9k_hw-fix-descriptor-status-of-txopexceeded.patch @@ -0,0 +1,36 @@ +From 2a15b394f8e46dd3e2ab365ab41cfa701d92fa77 Mon Sep 17 00:00:00 2001 +From: Rajkumar Manoharan +Date: Sat, 20 Aug 2011 17:22:09 +0530 +Subject: ath9k_hw: Fix descriptor status of TxOpExceeded + +From: Rajkumar Manoharan + +commit 2a15b394f8e46dd3e2ab365ab41cfa701d92fa77 upstream. + +Signed-off-by: Rajkumar Manoharan +Signed-off-by: John W. Linville + +--- + drivers/net/wireless/ath/ath9k/ar9003_mac.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c ++++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c +@@ -253,8 +253,6 @@ static int ar9003_hw_proc_txdesc(struct + return -EIO; + } + +- if (status & AR_TxOpExceeded) +- ts->ts_status |= ATH9K_TXERR_XTXOP; + ts->ts_rateindex = MS(status, AR_FinalTxIdx); + ts->ts_seqnum = MS(status, AR_SeqNum); + ts->tid = MS(status, AR_TxTid); +@@ -264,6 +262,8 @@ static int ar9003_hw_proc_txdesc(struct + ts->ts_status = 0; + ts->ts_flags = 0; + ++ if (status & AR_TxOpExceeded) ++ ts->ts_status |= ATH9K_TXERR_XTXOP; + status = ACCESS_ONCE(ads->status2); + ts->ts_rssi_ctl0 = MS(status, AR_TxRSSIAnt00); + ts->ts_rssi_ctl1 = MS(status, AR_TxRSSIAnt01); diff --git a/queue-3.1/ath9k_hw-fix-magnitude-phase-coeff-correction.patch b/queue-3.1/ath9k_hw-fix-magnitude-phase-coeff-correction.patch new file mode 100644 index 00000000000..b219cbfb853 --- /dev/null +++ b/queue-3.1/ath9k_hw-fix-magnitude-phase-coeff-correction.patch @@ -0,0 +1,38 @@ +From e9c10469cf3c71bc1c6b0f01319161e277d6ac9b Mon Sep 17 00:00:00 2001 +From: Rajkumar Manoharan +Date: Thu, 15 Sep 2011 19:02:25 +0530 +Subject: ath9k_hw: Fix magnitude/phase coeff correction + +From: Rajkumar Manoharan + +commit e9c10469cf3c71bc1c6b0f01319161e277d6ac9b upstream. + +Do the magnitude/phase coeff correction only if the outlier +is detected. Updating wrong magnitude/phase coeff factor +impacts not only tx gain setting but also leads to poor +performance in congested networks. In the clear environment +the impact is very minimal because the outlier happens +very rarely according to the past experiment. It occured +less than once every 1000 calibrations. + +Signed-off-by: Rajkumar Manoharan +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/ar9003_calib.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c ++++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c +@@ -643,8 +643,9 @@ static void ar9003_hw_detect_outlier(int + outlier_idx = max_idx; + else + outlier_idx = min_idx; ++ ++ mp_coeff[outlier_idx] = mp_avg; + } +- mp_coeff[outlier_idx] = mp_avg; + } + + static void ar9003_hw_tx_iqcal_load_avg_2_passes(struct ath_hw *ah, diff --git a/queue-3.1/ath9k_hw-fix-number-of-gpio-pins-for-ar9287-9300.patch b/queue-3.1/ath9k_hw-fix-number-of-gpio-pins-for-ar9287-9300.patch new file mode 100644 index 00000000000..340c17017cc --- /dev/null +++ b/queue-3.1/ath9k_hw-fix-number-of-gpio-pins-for-ar9287-9300.patch @@ -0,0 +1,36 @@ +From 6321eb0977b011ac61dfca36e7c69b2c4325b104 Mon Sep 17 00:00:00 2001 +From: Mohammed Shafi Shajakhan +Date: Fri, 30 Sep 2011 11:31:27 +0530 +Subject: ath9k_hw: Fix number of GPIO pins for AR9287/9300 + +From: Mohammed Shafi Shajakhan + +commit 6321eb0977b011ac61dfca36e7c69b2c4325b104 upstream. + +this patch fixes the assumption of maximum number of GPIO pins present +in AR9287/AR9300. this fix is essential as we might encounter some +functionality issues involved in accessing the status of GPIO pins which +are all incorrectly assumed to be not within the range of max_num_gpio +of AR9300/AR9287 chipsets + +Signed-off-by: Mohammed Shafi Shajakhan +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/hw.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -2101,6 +2101,10 @@ int ath9k_hw_fill_cap_info(struct ath_hw + pCap->num_gpio_pins = AR9271_NUM_GPIO; + else if (AR_DEVID_7010(ah)) + pCap->num_gpio_pins = AR7010_NUM_GPIO; ++ else if (AR_SREV_9300_20_OR_LATER(ah)) ++ pCap->num_gpio_pins = AR9300_NUM_GPIO; ++ else if (AR_SREV_9287_11_OR_LATER(ah)) ++ pCap->num_gpio_pins = AR9287_NUM_GPIO; + else if (AR_SREV_9285_12_OR_LATER(ah)) + pCap->num_gpio_pins = AR9285_NUM_GPIO; + else if (AR_SREV_9280_20_OR_LATER(ah)) diff --git a/queue-3.1/maintaners-update-qualcomm-atheros-addresses.patch b/queue-3.1/maintaners-update-qualcomm-atheros-addresses.patch new file mode 100644 index 00000000000..1ce485ea8ab --- /dev/null +++ b/queue-3.1/maintaners-update-qualcomm-atheros-addresses.patch @@ -0,0 +1,62 @@ +From fe8e084455f273b32cc57a5fbaf6c22ef984d657 Mon Sep 17 00:00:00 2001 +From: "Luis R. Rodriguez" +Date: Tue, 23 Aug 2011 15:07:31 -0700 +Subject: MAINTANERS: update Qualcomm Atheros addresses + +From: "Luis R. Rodriguez" + +commit fe8e084455f273b32cc57a5fbaf6c22ef984d657 upstream. + +Qualcomm ate up Atheros, all of the old e-mail addresses +no longer work and e-mails sent to it will bounce. Update +the addresses to the new shiny Qualcomm Atheros (QCA) ones. + +Cc: stable@kernel.org +Cc: netdev@vger.kernel.org +Cc: jouni@qca.qualcomm.com +Cc: yangjie@qca.qualcomm.com +Cc: vthiagar@qca.qualcomm.com +Cc: senthilb@qca.qualcomm.com +Signed-off-by: Luis R. Rodriguez +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + MAINTAINERS | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -1230,7 +1230,7 @@ F: Documentation/aoe/ + F: drivers/block/aoe/ + + ATHEROS ATH GENERIC UTILITIES +-M: "Luis R. Rodriguez" ++M: "Luis R. Rodriguez" + L: linux-wireless@vger.kernel.org + S: Supported + F: drivers/net/wireless/ath/* +@@ -1238,7 +1238,7 @@ F: drivers/net/wireless/ath/* + ATHEROS ATH5K WIRELESS DRIVER + M: Jiri Slaby + M: Nick Kossifidis +-M: "Luis R. Rodriguez" ++M: "Luis R. Rodriguez" + M: Bob Copeland + L: linux-wireless@vger.kernel.org + L: ath5k-devel@lists.ath5k.org +@@ -1247,10 +1247,10 @@ S: Maintained + F: drivers/net/wireless/ath/ath5k/ + + ATHEROS ATH9K WIRELESS DRIVER +-M: "Luis R. Rodriguez" +-M: Jouni Malinen +-M: Vasanthakumar Thiagarajan +-M: Senthil Balasubramanian ++M: "Luis R. Rodriguez" ++M: Jouni Malinen ++M: Vasanthakumar Thiagarajan ++M: Senthil Balasubramanian + L: linux-wireless@vger.kernel.org + L: ath9k-devel@lists.ath9k.org + W: http://wireless.kernel.org/en/users/Drivers/ath9k diff --git a/queue-3.1/series b/queue-3.1/series index 30332d886de..a6839f4127e 100644 --- a/queue-3.1/series +++ b/queue-3.1/series @@ -47,3 +47,26 @@ epoll-fix-spurious-lockdep-warnings.patch leds-save-the-delay-values-after-a-successful-call-to-blink_set.patch leds-turn-the-blink_timer-off-before-starting-to-blink.patch target-re-org-of-core_tmr_lun_reset.patch +usbmon-vs.-tcpdump-fix-dropped-packet-count.patch +usb-storage-fix-realtek-cr-configuration.patch +usb-storage-use-normalized-sense-when-emulating-autosense.patch +usb-fix-runtime-wakeup-on-ohci.patch +usb-g_printer-fix-bug-in-unregistration.patch +usb-core-devio.c-check-for-printer-class-specific-request.patch +usb-pid_ns-ensure-pid-is-not-freed-during.patch +usb-cdc-acm-owen-si-30-support.patch +usb-add-reset_resume-for-webcams-shown-to-be-quirky.patch +usb-pl2303-add-id-for-smart-device.patch +usb-ftdi_sio-add-pid-for-sony-ericsson-urban.patch +usb-ftdi_sio-support-ti-luminary-micro-stellaris-bd-icdi.patch +usb-option-convert-interface-blacklisting-to-bitfields.patch +usb-option-convert-huawei-k3765-k4505-k4605-reservered.patch +usb-option-add-zte-product-0x0037-to-sendsetup-blacklist.patch +usb-option-add-various-zte-device-network-interfaces-to.patch +maintaners-update-qualcomm-atheros-addresses.patch +ath9k_hw-fix-descriptor-status-of-txopexceeded.patch +ath9k_hw-fix-magnitude-phase-coeff-correction.patch +ath9k_htc-add-avm-fritz-wlan-11n-v2-support.patch +ath9k_hw-fix-number-of-gpio-pins-for-ar9287-9300.patch +ath9k-disable-unnecessary-phy-error-reporting.patch +usb-add-quirk-for-logitech-c300-web-cam.patch diff --git a/queue-3.1/usb-add-quirk-for-logitech-c300-web-cam.patch b/queue-3.1/usb-add-quirk-for-logitech-c300-web-cam.patch new file mode 100644 index 00000000000..76d22d4d3a0 --- /dev/null +++ b/queue-3.1/usb-add-quirk-for-logitech-c300-web-cam.patch @@ -0,0 +1,29 @@ +From 5b253d88cc6c65a23cefc457a5a4ef139913c5fc Mon Sep 17 00:00:00 2001 +From: Jon Levell +Date: Thu, 29 Sep 2011 20:42:52 +0100 +Subject: USB: add quirk for Logitech C300 web cam + +From: Jon Levell + +commit 5b253d88cc6c65a23cefc457a5a4ef139913c5fc upstream. + +My webcam is a Logitech C300 and I get "chipmunk"ed squeaky sound. +The following trivial patch fixes it. + +Signed-off-by: Jon Levell +Signed-off-by: Greg Kroah-Hartman + +diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c +index 38f0510..d6a8d82 100644 +--- a/drivers/usb/core/quirks.c ++++ b/drivers/usb/core/quirks.c +@@ -44,6 +44,9 @@ static const struct usb_device_id usb_quirk_list[] = { + /* Logitech Webcam C250 */ + { USB_DEVICE(0x046d, 0x0804), .driver_info = USB_QUIRK_RESET_RESUME }, + ++ /* Logitech Webcam C300 */ ++ { USB_DEVICE(0x046d, 0x0805), .driver_info = USB_QUIRK_RESET_RESUME }, ++ + /* Logitech Webcam B/C500 */ + { USB_DEVICE(0x046d, 0x0807), .driver_info = USB_QUIRK_RESET_RESUME }, + diff --git a/queue-3.1/usb-add-reset_resume-for-webcams-shown-to-be-quirky.patch b/queue-3.1/usb-add-reset_resume-for-webcams-shown-to-be-quirky.patch new file mode 100644 index 00000000000..3130515c84c --- /dev/null +++ b/queue-3.1/usb-add-reset_resume-for-webcams-shown-to-be-quirky.patch @@ -0,0 +1,62 @@ +From 2394d67e446bf616a0885167d5f0d397bdacfdfc Mon Sep 17 00:00:00 2001 +From: Oliver Neukum +Date: Tue, 13 Sep 2011 08:42:21 +0200 +Subject: USB: add RESET_RESUME for webcams shown to be quirky + +From: Oliver Neukum + +commit 2394d67e446bf616a0885167d5f0d397bdacfdfc upstream. + +The new runtime PM code has shown that many webcams suffer +from a race condition that may crash them upon resume. +Runtime PM is especially prone to show the problem because +it retains power to the cameras at all times. However +system suspension may also crash the devices and retain +power to the devices. +The only way to solve this problem without races is in +usbcore with the RESET_RESUME quirk. + +Signed-off-by: Oliver Neukum +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/quirks.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +--- a/drivers/usb/core/quirks.c ++++ b/drivers/usb/core/quirks.c +@@ -38,6 +38,24 @@ static const struct usb_device_id usb_qu + /* Creative SB Audigy 2 NX */ + { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME }, + ++ /* Logitech Webcam C200 */ ++ { USB_DEVICE(0x046d, 0x0802), .driver_info = USB_QUIRK_RESET_RESUME }, ++ ++ /* Logitech Webcam C250 */ ++ { USB_DEVICE(0x046d, 0x0804), .driver_info = USB_QUIRK_RESET_RESUME }, ++ ++ /* Logitech Webcam B/C500 */ ++ { USB_DEVICE(0x046d, 0x0807), .driver_info = USB_QUIRK_RESET_RESUME }, ++ ++ /* Logitech Webcam Pro 9000 */ ++ { USB_DEVICE(0x046d, 0x0809), .driver_info = USB_QUIRK_RESET_RESUME }, ++ ++ /* Logitech Webcam C310 */ ++ { USB_DEVICE(0x046d, 0x081b), .driver_info = USB_QUIRK_RESET_RESUME }, ++ ++ /* Logitech Webcam C270 */ ++ { USB_DEVICE(0x046d, 0x0825), .driver_info = USB_QUIRK_RESET_RESUME }, ++ + /* Logitech Harmony 700-series */ + { USB_DEVICE(0x046d, 0xc122), .driver_info = USB_QUIRK_DELAY_INIT }, + +@@ -69,6 +87,9 @@ static const struct usb_device_id usb_qu + { USB_DEVICE(0x06a3, 0x0006), .driver_info = + USB_QUIRK_CONFIG_INTF_STRINGS }, + ++ /* Guillemot Webcam Hercules Dualpix Exchange*/ ++ { USB_DEVICE(0x06f8, 0x0804), .driver_info = USB_QUIRK_RESET_RESUME }, ++ + /* M-Systems Flash Disk Pioneers */ + { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, + diff --git a/queue-3.1/usb-cdc-acm-owen-si-30-support.patch b/queue-3.1/usb-cdc-acm-owen-si-30-support.patch new file mode 100644 index 00000000000..3ce3102d28a --- /dev/null +++ b/queue-3.1/usb-cdc-acm-owen-si-30-support.patch @@ -0,0 +1,43 @@ +From 65e52f41fa944cef2e6d4222b8c54f46cc575214 Mon Sep 17 00:00:00 2001 +From: Denis Pershin +Date: Sun, 4 Sep 2011 17:37:21 +0700 +Subject: usb: cdc-acm: Owen SI-30 support + +From: Denis Pershin + +commit 65e52f41fa944cef2e6d4222b8c54f46cc575214 upstream. + +here is the patch to support Owen SI-30 device. +This is a pulse counter controller. +http://www.owen.ru/en/catalog/93788515 + +usb-drivers output: +T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 +D: Ver= 2.00 Cls=02(commc) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 +P: Vendor=03eb ProdID=0030 Rev=01.01 +C: #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=0mA +I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm +I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm + +This patch is installed on my home system which receives data from this +controller connected to cold water counter. + +Signed-off-by: Denis Pershin +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/class/cdc-acm.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/usb/class/cdc-acm.c ++++ b/drivers/usb/class/cdc-acm.c +@@ -1534,6 +1534,9 @@ static const struct usb_device_id acm_id + { NOKIA_PCSUITE_ACM_INFO(0x03cd), }, /* Nokia C7 */ + { SAMSUNG_PCSUITE_ACM_INFO(0x6651), }, /* Samsung GTi8510 (INNOV8) */ + ++ /* Support for Owen devices */ ++ { USB_DEVICE(0x03eb, 0x0030), }, /* Owen SI30 */ ++ + /* NOTE: non-Nokia COMM/ACM/0xff is likely MSFT RNDIS... NOT a modem! */ + + /* Support Lego NXT using pbLua firmware */ diff --git a/queue-3.1/usb-core-devio.c-check-for-printer-class-specific-request.patch b/queue-3.1/usb-core-devio.c-check-for-printer-class-specific-request.patch new file mode 100644 index 00000000000..3c28691933e --- /dev/null +++ b/queue-3.1/usb-core-devio.c-check-for-printer-class-specific-request.patch @@ -0,0 +1,74 @@ +From 393cbb5151ecda9f9e14e3082d048dd27a1ff9f6 Mon Sep 17 00:00:00 2001 +From: Matthias Dellweg <2500@gmx.de> +Date: Sun, 25 Sep 2011 14:26:25 +0200 +Subject: usb/core/devio.c: Check for printer class specific request + +From: Matthias Dellweg <2500@gmx.de> + +commit 393cbb5151ecda9f9e14e3082d048dd27a1ff9f6 upstream. + +In the usb printer class specific request get_device_id the value of +wIndex is (interface << 8 | altsetting) instead of just interface. +This enables the detection of some printers with libusb. + +Acked-by: Alan Stern +Signed-off-by: Matthias Dellweg <2500@gmx.de> +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/devio.c | 21 ++++++++++++++++++--- + 1 file changed, 18 insertions(+), 3 deletions(-) + +--- a/drivers/usb/core/devio.c ++++ b/drivers/usb/core/devio.c +@@ -607,9 +607,10 @@ static int findintfep(struct usb_device + } + + static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype, +- unsigned int index) ++ unsigned int request, unsigned int index) + { + int ret = 0; ++ struct usb_host_interface *alt_setting; + + if (ps->dev->state != USB_STATE_UNAUTHENTICATED + && ps->dev->state != USB_STATE_ADDRESS +@@ -618,6 +619,19 @@ static int check_ctrlrecip(struct dev_st + if (USB_TYPE_VENDOR == (USB_TYPE_MASK & requesttype)) + return 0; + ++ /* ++ * check for the special corner case 'get_device_id' in the printer ++ * class specification, where wIndex is (interface << 8 | altsetting) ++ * instead of just interface ++ */ ++ if (requesttype == 0xa1 && request == 0) { ++ alt_setting = usb_find_alt_setting(ps->dev->actconfig, ++ index >> 8, index & 0xff); ++ if (alt_setting ++ && alt_setting->desc.bInterfaceClass == USB_CLASS_PRINTER) ++ index >>= 8; ++ } ++ + index &= 0xff; + switch (requesttype & USB_RECIP_MASK) { + case USB_RECIP_ENDPOINT: +@@ -770,7 +784,8 @@ static int proc_control(struct dev_state + + if (copy_from_user(&ctrl, arg, sizeof(ctrl))) + return -EFAULT; +- ret = check_ctrlrecip(ps, ctrl.bRequestType, ctrl.wIndex); ++ ret = check_ctrlrecip(ps, ctrl.bRequestType, ctrl.bRequest, ++ ctrl.wIndex); + if (ret) + return ret; + wLength = ctrl.wLength; /* To suppress 64k PAGE_SIZE warning */ +@@ -1100,7 +1115,7 @@ static int proc_do_submiturb(struct dev_ + kfree(dr); + return -EINVAL; + } +- ret = check_ctrlrecip(ps, dr->bRequestType, ++ ret = check_ctrlrecip(ps, dr->bRequestType, dr->bRequest, + le16_to_cpup(&dr->wIndex)); + if (ret) { + kfree(dr); diff --git a/queue-3.1/usb-fix-runtime-wakeup-on-ohci.patch b/queue-3.1/usb-fix-runtime-wakeup-on-ohci.patch new file mode 100644 index 00000000000..34811e29aad --- /dev/null +++ b/queue-3.1/usb-fix-runtime-wakeup-on-ohci.patch @@ -0,0 +1,40 @@ +From a8b43c00ef06aec49b9fe0a5bad8a6a320e4d27b Mon Sep 17 00:00:00 2001 +From: Matthew Garrett +Date: Thu, 6 Oct 2011 15:35:43 -0400 +Subject: USB: Fix runtime wakeup on OHCI + +From: Matthew Garrett + +commit a8b43c00ef06aec49b9fe0a5bad8a6a320e4d27b upstream. + +At least some OHCI hardware (such as the MCP89) fails to flag any change +in the host status register or the port status registers when receiving +a remote wakeup while in D3 state. This results in the controller being +resumed but no device state change being noticed, at which point the +controller is put back to sleep again. Since there doesn't seem to be any +reliable way to identify the state change, just unconditionally resume the +hub. It'll be put back to sleep in the near future anyway if there are no +active devices attached to it. + +Signed-off-by: Matthew Garrett +Cc: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ohci-hub.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/drivers/usb/host/ohci-hub.c ++++ b/drivers/usb/host/ohci-hub.c +@@ -356,10 +356,7 @@ static void ohci_finish_controller_resum + msleep(20); + } + +- /* Does the root hub have a port wakeup pending? */ +- if (ohci_readl(ohci, &ohci->regs->intrstatus) & +- (OHCI_INTR_RD | OHCI_INTR_RHSC)) +- usb_hcd_resume_root_hub(hcd); ++ usb_hcd_resume_root_hub(hcd); + } + + /* Carry out polling-, autostop-, and autoresume-related state changes */ diff --git a/queue-3.1/usb-ftdi_sio-add-pid-for-sony-ericsson-urban.patch b/queue-3.1/usb-ftdi_sio-add-pid-for-sony-ericsson-urban.patch new file mode 100644 index 00000000000..4cc795e607e --- /dev/null +++ b/queue-3.1/usb-ftdi_sio-add-pid-for-sony-ericsson-urban.patch @@ -0,0 +1,47 @@ +From 74bdf22b5c3858b06af46f19d05c23e76c40a3bb Mon Sep 17 00:00:00 2001 +From: Hakan Kvist +Date: Mon, 3 Oct 2011 13:41:15 +0200 +Subject: USB: ftdi_sio: add PID for Sony Ericsson Urban + +From: Hakan Kvist + +commit 74bdf22b5c3858b06af46f19d05c23e76c40a3bb upstream. + +Add PID 0xfc8a, 0xfc8b for device Sony Ericsson Urban + +Signed-off-by: Hakan Kvist +Signed-off-by: Oskar Andero +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 2 ++ + drivers/usb/serial/ftdi_sio_ids.h | 6 ++++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -207,6 +207,8 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, FTDI_XF_640_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_XF_642_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_DSS20_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_URBAN_0_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_URBAN_1_PID) }, + { USB_DEVICE(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_VNHCPCUSB_D_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_MTXORB_0_PID) }, +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -420,9 +420,11 @@ + #define PROTEGO_SPECIAL_4 0xFC73 /* special/unknown device */ + + /* +- * DSS-20 Sync Station for Sony Ericsson P800 ++ * Sony Ericsson product ids + */ +-#define FTDI_DSS20_PID 0xFC82 ++#define FTDI_DSS20_PID 0xFC82 /* DSS-20 Sync Station for Sony Ericsson P800 */ ++#define FTDI_URBAN_0_PID 0xFC8A /* Sony Ericsson Urban, uart #0 */ ++#define FTDI_URBAN_1_PID 0xFC8B /* Sony Ericsson Urban, uart #1 */ + + /* www.irtrans.de device */ + #define FTDI_IRTRANS_PID 0xFC60 /* Product Id */ diff --git a/queue-3.1/usb-ftdi_sio-support-ti-luminary-micro-stellaris-bd-icdi.patch b/queue-3.1/usb-ftdi_sio-support-ti-luminary-micro-stellaris-bd-icdi.patch new file mode 100644 index 00000000000..94fe473d64d --- /dev/null +++ b/queue-3.1/usb-ftdi_sio-support-ti-luminary-micro-stellaris-bd-icdi.patch @@ -0,0 +1,48 @@ +From 3687f641307eeff6f7fe31a88dc39db88e89238b Mon Sep 17 00:00:00 2001 +From: Peter Stuge +Date: Mon, 10 Oct 2011 03:34:54 +0200 +Subject: USB: ftdi_sio: Support TI/Luminary Micro Stellaris BD-ICDI + Board + +From: Peter Stuge + +commit 3687f641307eeff6f7fe31a88dc39db88e89238b upstream. + +Some Stellaris evaluation kits have the JTAG/SWD FTDI chip onboard, +and some, like EK-LM3S9B90, come with a separate In-Circuit Debugger +Interface Board. The ICDI board can also be used stand-alone, for +other boards and chips than the kit it came with. The ICDI has both +old style 20-pin JTAG connector and new style JTAG/SWD 10-pin 1.27mm +pitch connector. + +Tested with EK-LM3S9B90, where the BD-ICDI board is included. + +Signed-off-by: Peter Stuge +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 2 ++ + drivers/usb/serial/ftdi_sio_ids.h | 1 + + 2 files changed, 3 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -747,6 +747,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, LMI_LM3S_ICDI_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) }, +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -54,6 +54,7 @@ + /* FTDI 2332C Dual channel device, side A=245 FIFO (JTAG), Side B=RS232 UART */ + #define LMI_LM3S_DEVEL_BOARD_PID 0xbcd8 + #define LMI_LM3S_EVAL_BOARD_PID 0xbcd9 ++#define LMI_LM3S_ICDI_BOARD_PID 0xbcda + + #define FTDI_TURTELIZER_PID 0xBDC8 /* JTAG/RS-232 adapter by egnite GmbH */ + diff --git a/queue-3.1/usb-g_printer-fix-bug-in-unregistration.patch b/queue-3.1/usb-g_printer-fix-bug-in-unregistration.patch new file mode 100644 index 00000000000..f1474b3be73 --- /dev/null +++ b/queue-3.1/usb-g_printer-fix-bug-in-unregistration.patch @@ -0,0 +1,33 @@ +From 8582d86143c690c68cc42f996def466a035bee34 Mon Sep 17 00:00:00 2001 +From: Fabian Godehardt +Date: Thu, 1 Sep 2011 14:15:46 +0200 +Subject: USB: g_printer: fix bug in unregistration + +From: Fabian Godehardt + +commit 8582d86143c690c68cc42f996def466a035bee34 upstream. + +The allocated chardevice region range is only 1 device but on +unregister it currently tries to deregister 2. + +Found this while doing a insmod/rmmod/insmod/rm... of the module +which seemed to eat major numbers. + +Signed-off-by: Fabian Godehardt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/gadget/printer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/gadget/printer.c ++++ b/drivers/usb/gadget/printer.c +@@ -1611,7 +1611,7 @@ cleanup(void) + if (status) + ERROR(dev, "usb_gadget_unregister_driver %x\n", status); + +- unregister_chrdev_region(g_printer_devno, 2); ++ unregister_chrdev_region(g_printer_devno, 1); + class_destroy(usb_gadget_class); + mutex_unlock(&usb_printer_gadget.lock_printer_io); + } diff --git a/queue-3.1/usb-option-add-various-zte-device-network-interfaces-to.patch b/queue-3.1/usb-option-add-various-zte-device-network-interfaces-to.patch new file mode 100644 index 00000000000..b8094a50a16 --- /dev/null +++ b/queue-3.1/usb-option-add-various-zte-device-network-interfaces-to.patch @@ -0,0 +1,159 @@ +From c58a76cdd7ab5a945a44fd2d64f6faf40323f95b Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Tue, 13 Sep 2011 13:52:52 -0500 +Subject: USB: option: add various ZTE device network interfaces to + the blacklist + +From: Dan Williams + +commit c58a76cdd7ab5a945a44fd2d64f6faf40323f95b upstream. + +IDs found in the Windows driver's ZTEusbnet.inf file from the +ZTE MF100 drivers (O2 UK). Also fixes the ZTE MF626 device +since it really is distinct from the 4G Systems stick and +apparently needs the net interface blacklisted too, while +there's no indication (yet) that the 4G Systems stick does. + +Signed-off-by: Dan Williams +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 63 ++++++++++++++++++++++++++++++++++---------- + 1 file changed, 49 insertions(+), 14 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -497,12 +497,34 @@ static const struct option_blacklist_inf + + static const struct option_blacklist_info zte_k3765_z_blacklist = { + .sendsetup = BIT(0) | BIT(1) | BIT(2), ++ .reserved = BIT(4), + }; + + static const struct option_blacklist_info huawei_cdc12_blacklist = { + .reserved = BIT(1) | BIT(2), + }; + ++static const struct option_blacklist_info net_intf1_blacklist = { ++ .reserved = BIT(1), ++}; ++ ++static const struct option_blacklist_info net_intf3_blacklist = { ++ .reserved = BIT(3), ++}; ++ ++static const struct option_blacklist_info net_intf4_blacklist = { ++ .reserved = BIT(4), ++}; ++ ++static const struct option_blacklist_info net_intf5_blacklist = { ++ .reserved = BIT(5), ++}; ++ ++static const struct option_blacklist_info zte_mf626_blacklist = { ++ .sendsetup = BIT(0) | BIT(1), ++ .reserved = BIT(4), ++}; ++ + static const struct usb_device_id option_ids[] = { + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, +@@ -709,7 +731,8 @@ static const struct usb_device_id option + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0003, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0004, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0005, 0xff, 0xff, 0xff) }, +@@ -724,26 +747,30 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000f, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0010, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0011, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0018, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0020, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0022, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0023, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, + /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) }, */ + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff, +- 0xff, 0xff), .driver_info = (kernel_ulong_t)&four_g_w14_blacklist }, ++ 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_mf626_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0034, 0xff, 0xff, 0xff) }, +@@ -752,24 +779,30 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0038, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0039, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0040, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0042, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0042, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0043, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0044, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0048, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0049, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0049, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf5_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0050, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0053, 0xff, 0xff, 0xff) }, */ + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0056, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0064, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0065, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) }, +@@ -784,11 +817,13 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0083, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0086, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0087, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0106, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0108, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0113, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0113, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf5_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0117, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0118, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0121, 0xff, 0xff, 0xff) }, diff --git a/queue-3.1/usb-option-add-zte-product-0x0037-to-sendsetup-blacklist.patch b/queue-3.1/usb-option-add-zte-product-0x0037-to-sendsetup-blacklist.patch new file mode 100644 index 00000000000..9f31a58f09d --- /dev/null +++ b/queue-3.1/usb-option-add-zte-product-0x0037-to-sendsetup-blacklist.patch @@ -0,0 +1,39 @@ +From eb05ce567a81c592c58f4bdb96eb91ce96661c30 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Tue, 13 Sep 2011 13:51:45 -0500 +Subject: USB: option: add ZTE product 0x0037 to sendsetup blacklist + +From: Dan Williams + +commit eb05ce567a81c592c58f4bdb96eb91ce96661c30 upstream. + +Signed-off-by: Dan Williams +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -491,6 +491,10 @@ static const struct option_blacklist_inf + .sendsetup = BIT(0) | BIT(1), + }; + ++static const struct option_blacklist_info zte_0037_blacklist = { ++ .sendsetup = BIT(0) | BIT(1), ++}; ++ + static const struct option_blacklist_info zte_k3765_z_blacklist = { + .sendsetup = BIT(0) | BIT(1) | BIT(2), + }; +@@ -743,7 +747,8 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0034, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0037, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0037, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&zte_0037_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0038, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0039, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0040, 0xff, 0xff, 0xff) }, diff --git a/queue-3.1/usb-option-convert-huawei-k3765-k4505-k4605-reservered.patch b/queue-3.1/usb-option-convert-huawei-k3765-k4505-k4605-reservered.patch new file mode 100644 index 00000000000..c4bd2a3401b --- /dev/null +++ b/queue-3.1/usb-option-convert-huawei-k3765-k4505-k4605-reservered.patch @@ -0,0 +1,149 @@ +From 0d905fd5ece4ab65e8407c450077744e1c8f661b Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Tue, 13 Sep 2011 13:51:13 -0500 +Subject: USB: option: convert Huawei K3765, K4505, K4605 reservered + interface to blacklist + +From: Dan Williams + +commit 0d905fd5ece4ab65e8407c450077744e1c8f661b upstream. + +That's what the blacklist is for... + +Signed-off-by: Dan Williams +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 79 +++++++++++++++++++++++--------------------- + 1 file changed, 43 insertions(+), 36 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -495,6 +495,10 @@ static const struct option_blacklist_inf + .sendsetup = BIT(0) | BIT(1) | BIT(2), + }; + ++static const struct option_blacklist_info huawei_cdc12_blacklist = { ++ .reserved = BIT(1) | BIT(2), ++}; ++ + static const struct usb_device_id option_ids[] = { + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, +@@ -592,12 +596,15 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143D, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143E, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143F, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, ++ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) }, +@@ -1207,10 +1214,35 @@ static void __exit option_exit(void) + module_init(option_init); + module_exit(option_exit); + ++static bool is_blacklisted(const u8 ifnum, enum option_blacklist_reason reason, ++ const struct option_blacklist_info *blacklist) ++{ ++ unsigned long num; ++ const unsigned long *intf_list; ++ ++ if (blacklist) { ++ if (reason == OPTION_BLACKLIST_SENDSETUP) ++ intf_list = &blacklist->sendsetup; ++ else if (reason == OPTION_BLACKLIST_RESERVED_IF) ++ intf_list = &blacklist->reserved; ++ else { ++ BUG_ON(reason); ++ return false; ++ } ++ ++ for_each_set_bit(num, intf_list, MAX_BL_NUM + 1) { ++ if (num == ifnum) ++ return true; ++ } ++ } ++ return false; ++} ++ + static int option_probe(struct usb_serial *serial, + const struct usb_device_id *id) + { + struct usb_wwan_intf_private *data; ++ + /* D-Link DWM 652 still exposes CD-Rom emulation interface in modem mode */ + if (serial->dev->descriptor.idVendor == DLINK_VENDOR_ID && + serial->dev->descriptor.idProduct == DLINK_PRODUCT_DWM_652 && +@@ -1223,14 +1255,14 @@ static int option_probe(struct usb_seria + serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff) + return -ENODEV; + +- /* Don't bind network interfaces on Huawei K3765, K4505 & K4605 */ +- if (serial->dev->descriptor.idVendor == HUAWEI_VENDOR_ID && +- (serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K3765 || +- serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4505 || +- serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4605) && +- (serial->interface->cur_altsetting->desc.bInterfaceNumber == 1 || +- serial->interface->cur_altsetting->desc.bInterfaceNumber == 2)) +- return -ENODEV; ++ /* Don't bind reserved interfaces (like network ones) which often have ++ * the same class/subclass/protocol as the serial interfaces. Look at ++ * the Windows driver .INF files for reserved interface numbers. ++ */ ++ if (is_blacklisted( ++ serial->interface->cur_altsetting->desc.bInterfaceNumber, ++ OPTION_BLACKLIST_RESERVED_IF, ++ (const struct option_blacklist_info *) id->driver_info)) + + /* Don't bind network interface on Samsung GT-B3730, it is handled by a separate module */ + if (serial->dev->descriptor.idVendor == SAMSUNG_VENDOR_ID && +@@ -1239,7 +1271,6 @@ static int option_probe(struct usb_seria + return -ENODEV; + + data = serial->private = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL); +- + if (!data) + return -ENOMEM; + data->send_setup = option_send_setup; +@@ -1248,30 +1279,6 @@ static int option_probe(struct usb_seria + return 0; + } + +-static bool is_blacklisted(const u8 ifnum, enum option_blacklist_reason reason, +- const struct option_blacklist_info *blacklist) +-{ +- unsigned long num; +- const unsigned long *intf_list; +- +- if (blacklist) { +- if (reason == OPTION_BLACKLIST_SENDSETUP) +- intf_list = &blacklist->sendsetup; +- else if (reason == OPTION_BLACKLIST_RESERVED_IF) +- intf_list = &blacklist->reserved; +- else { +- BUG_ON(reason); +- return false; +- } +- +- for_each_set_bit(num, intf_list, MAX_BL_NUM + 1) { +- if (num == ifnum) +- return true; +- } +- } +- return false; +-} +- + static void option_instat_callback(struct urb *urb) + { + int err; diff --git a/queue-3.1/usb-option-convert-interface-blacklisting-to-bitfields.patch b/queue-3.1/usb-option-convert-interface-blacklisting-to-bitfields.patch new file mode 100644 index 00000000000..c35357d608d --- /dev/null +++ b/queue-3.1/usb-option-convert-interface-blacklisting-to-bitfields.patch @@ -0,0 +1,113 @@ +From b4626c10928c13ee73b013dcbc23676333e79b59 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Tue, 13 Sep 2011 13:49:41 -0500 +Subject: USB: option: convert interface blacklisting to bitfields + +From: Dan Williams + +commit b4626c10928c13ee73b013dcbc23676333e79b59 upstream. + +It's cleaner than the array stuff, and we're about to add a bunch +more blacklist entries. Second, there are devices that need both +the sendsetup and the reserved interface blacklists, which the +current code can't accommodate. + +Signed-off-by: Dan Williams +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 53 +++++++++++++++++++++----------------------- + 1 file changed, 26 insertions(+), 27 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -475,31 +475,24 @@ enum option_blacklist_reason { + OPTION_BLACKLIST_RESERVED_IF = 2 + }; + ++#define MAX_BL_NUM 8 + struct option_blacklist_info { +- const u32 infolen; /* number of interface numbers on blacklist */ +- const u8 *ifaceinfo; /* pointer to the array holding the numbers */ +- enum option_blacklist_reason reason; ++ /* bitfield of interface numbers for OPTION_BLACKLIST_SENDSETUP */ ++ const unsigned long sendsetup; ++ /* bitfield of interface numbers for OPTION_BLACKLIST_RESERVED_IF */ ++ const unsigned long reserved; + }; + +-static const u8 four_g_w14_no_sendsetup[] = { 0, 1 }; + static const struct option_blacklist_info four_g_w14_blacklist = { +- .infolen = ARRAY_SIZE(four_g_w14_no_sendsetup), +- .ifaceinfo = four_g_w14_no_sendsetup, +- .reason = OPTION_BLACKLIST_SENDSETUP ++ .sendsetup = BIT(0) | BIT(1), + }; + +-static const u8 alcatel_x200_no_sendsetup[] = { 0, 1 }; + static const struct option_blacklist_info alcatel_x200_blacklist = { +- .infolen = ARRAY_SIZE(alcatel_x200_no_sendsetup), +- .ifaceinfo = alcatel_x200_no_sendsetup, +- .reason = OPTION_BLACKLIST_SENDSETUP ++ .sendsetup = BIT(0) | BIT(1), + }; + +-static const u8 zte_k3765_z_no_sendsetup[] = { 0, 1, 2 }; + static const struct option_blacklist_info zte_k3765_z_blacklist = { +- .infolen = ARRAY_SIZE(zte_k3765_z_no_sendsetup), +- .ifaceinfo = zte_k3765_z_no_sendsetup, +- .reason = OPTION_BLACKLIST_SENDSETUP ++ .sendsetup = BIT(0) | BIT(1) | BIT(2), + }; + + static const struct usb_device_id option_ids[] = { +@@ -1255,21 +1248,28 @@ static int option_probe(struct usb_seria + return 0; + } + +-static enum option_blacklist_reason is_blacklisted(const u8 ifnum, +- const struct option_blacklist_info *blacklist) ++static bool is_blacklisted(const u8 ifnum, enum option_blacklist_reason reason, ++ const struct option_blacklist_info *blacklist) + { +- const u8 *info; +- int i; ++ unsigned long num; ++ const unsigned long *intf_list; + + if (blacklist) { +- info = blacklist->ifaceinfo; ++ if (reason == OPTION_BLACKLIST_SENDSETUP) ++ intf_list = &blacklist->sendsetup; ++ else if (reason == OPTION_BLACKLIST_RESERVED_IF) ++ intf_list = &blacklist->reserved; ++ else { ++ BUG_ON(reason); ++ return false; ++ } + +- for (i = 0; i < blacklist->infolen; i++) { +- if (info[i] == ifnum) +- return blacklist->reason; ++ for_each_set_bit(num, intf_list, MAX_BL_NUM + 1) { ++ if (num == ifnum) ++ return true; + } + } +- return OPTION_BLACKLIST_NONE; ++ return false; + } + + static void option_instat_callback(struct urb *urb) +@@ -1343,9 +1343,8 @@ static int option_send_setup(struct usb_ + int val = 0; + dbg("%s", __func__); + +- if (is_blacklisted(ifNum, +- (struct option_blacklist_info *) intfdata->private) +- == OPTION_BLACKLIST_SENDSETUP) { ++ if (is_blacklisted(ifNum, OPTION_BLACKLIST_SENDSETUP, ++ (struct option_blacklist_info *) intfdata->private)) { + dbg("No send_setup on blacklisted interface #%d\n", ifNum); + return -EIO; + } diff --git a/queue-3.1/usb-pid_ns-ensure-pid-is-not-freed-during.patch b/queue-3.1/usb-pid_ns-ensure-pid-is-not-freed-during.patch new file mode 100644 index 00000000000..6adcd716053 --- /dev/null +++ b/queue-3.1/usb-pid_ns-ensure-pid-is-not-freed-during.patch @@ -0,0 +1,46 @@ +From aec01c5895051849ed842dc5b8794017a7751f28 Mon Sep 17 00:00:00 2001 +From: Serge Hallyn +Date: Mon, 26 Sep 2011 10:18:29 -0500 +Subject: USB: pid_ns: ensure pid is not freed during + kill_pid_info_as_uid + +From: Serge Hallyn + +commit aec01c5895051849ed842dc5b8794017a7751f28 upstream. + +Alan Stern points out that after spin_unlock(&ps->lock) there is no +guarantee that ps->pid won't be freed. Since kill_pid_info_as_uid() is +called after the spin_unlock(), the pid passed to it must be pinned. + +Reported-by: Alan Stern +Signed-off-by: Serge Hallyn +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/devio.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/usb/core/devio.c ++++ b/drivers/usb/core/devio.c +@@ -407,7 +407,7 @@ static void async_completed(struct urb * + sinfo.si_errno = as->status; + sinfo.si_code = SI_ASYNCIO; + sinfo.si_addr = as->userurb; +- pid = as->pid; ++ pid = get_pid(as->pid); + uid = as->uid; + euid = as->euid; + secid = as->secid; +@@ -422,9 +422,11 @@ static void async_completed(struct urb * + cancel_bulk_urbs(ps, as->bulk_addr); + spin_unlock(&ps->lock); + +- if (signr) ++ if (signr) { + kill_pid_info_as_uid(sinfo.si_signo, &sinfo, pid, uid, + euid, secid); ++ put_pid(pid); ++ } + + wake_up(&ps->wait); + } diff --git a/queue-3.1/usb-pl2303-add-id-for-smart-device.patch b/queue-3.1/usb-pl2303-add-id-for-smart-device.patch new file mode 100644 index 00000000000..9b9a2ff0dd6 --- /dev/null +++ b/queue-3.1/usb-pl2303-add-id-for-smart-device.patch @@ -0,0 +1,42 @@ +From 598f0b703506da841d3459dc0c48506be14d1778 Mon Sep 17 00:00:00 2001 +From: Eric Benoit +Date: Sat, 24 Sep 2011 02:04:50 -0400 +Subject: USB: pl2303: add id for SMART device + +From: Eric Benoit + +commit 598f0b703506da841d3459dc0c48506be14d1778 upstream. + +Add vendor and product ID for the SMART USB to serial adapter. These +were meant to be used with their SMART Board whiteboards, but can be +re-purposed for other tasks. Tested and working (at at least 9600 bps). + +Signed-off-by: Eric Benoit +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/pl2303.c | 1 + + drivers/usb/serial/pl2303.h | 5 +++++ + 2 files changed, 6 insertions(+) + +--- a/drivers/usb/serial/pl2303.c ++++ b/drivers/usb/serial/pl2303.c +@@ -92,6 +92,7 @@ static const struct usb_device_id id_tab + { USB_DEVICE(SANWA_VENDOR_ID, SANWA_PRODUCT_ID) }, + { USB_DEVICE(ADLINK_VENDOR_ID, ADLINK_ND6530_PRODUCT_ID) }, + { USB_DEVICE(WINCHIPHEAD_VENDOR_ID, WINCHIPHEAD_USBSER_PRODUCT_ID) }, ++ { USB_DEVICE(SMART_VENDOR_ID, SMART_PRODUCT_ID) }, + { } /* Terminating entry */ + }; + +--- a/drivers/usb/serial/pl2303.h ++++ b/drivers/usb/serial/pl2303.h +@@ -148,3 +148,8 @@ + /* WinChipHead USB->RS 232 adapter */ + #define WINCHIPHEAD_VENDOR_ID 0x4348 + #define WINCHIPHEAD_USBSER_PRODUCT_ID 0x5523 ++ ++/* SMART USB Serial Adapter */ ++#define SMART_VENDOR_ID 0x0b8c ++#define SMART_PRODUCT_ID 0x2303 ++ diff --git a/queue-3.1/usb-storage-fix-realtek-cr-configuration.patch b/queue-3.1/usb-storage-fix-realtek-cr-configuration.patch new file mode 100644 index 00000000000..011255f5fc0 --- /dev/null +++ b/queue-3.1/usb-storage-fix-realtek-cr-configuration.patch @@ -0,0 +1,30 @@ +From 839f245f8f1e7d7efd7ba12a7d735f13e8293a2b Mon Sep 17 00:00:00 2001 +From: Vincent Palatin +Date: Thu, 1 Sep 2011 14:05:15 -0700 +Subject: usb-storage: fix realtek cr configuration + +From: Vincent Palatin + +commit 839f245f8f1e7d7efd7ba12a7d735f13e8293a2b upstream. + +A typo in the configuration variable name prevents from activating the +USB autosuspend on the device. + +Signed-off-by: Vincent Palatin +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/storage/Kconfig ++++ b/drivers/usb/storage/Kconfig +@@ -42,7 +42,7 @@ config USB_STORAGE_REALTEK + + config REALTEK_AUTOPM + bool "Realtek Card Reader autosuspend support" +- depends on USB_STORAGE_REALTEK && CONFIG_PM_RUNTIME ++ depends on USB_STORAGE_REALTEK && PM_RUNTIME + default y + + config USB_STORAGE_DATAFAB diff --git a/queue-3.1/usb-storage-use-normalized-sense-when-emulating-autosense.patch b/queue-3.1/usb-storage-use-normalized-sense-when-emulating-autosense.patch new file mode 100644 index 00000000000..9c481cf9f2f --- /dev/null +++ b/queue-3.1/usb-storage-use-normalized-sense-when-emulating-autosense.patch @@ -0,0 +1,101 @@ +From e16da02fcdf1c5e824432f88abf42623dafdf191 Mon Sep 17 00:00:00 2001 +From: Luben Tuikov +Date: Thu, 11 Nov 2010 15:43:11 -0800 +Subject: USB: storage: Use normalized sense when emulating autosense + +From: Luben Tuikov + +commit e16da02fcdf1c5e824432f88abf42623dafdf191 upstream. + +This patch solves two things: +1) Enables autosense emulation code to correctly +interpret descriptor format sense data, and +2) Fixes a bug whereby the autosense emulation +code would overwrite descriptor format sense data +with SENSE KEY HARDWARE ERROR in fixed format, to +incorrectly look like this: + +Oct 21 14:11:07 localhost kernel: sd 7:0:0:0: [sdc] Sense Key : Recovered Error [current] [descriptor] +Oct 21 14:11:07 localhost kernel: Descriptor sense data with sense descriptors (in hex): +Oct 21 14:11:07 localhost kernel: 72 01 04 1d 00 00 00 0e 09 0c 00 00 00 00 00 00 +Oct 21 14:11:07 localhost kernel: 00 4f 00 c2 00 50 +Oct 21 14:11:07 localhost kernel: sd 7:0:0:0: [sdc] ASC=0x4 ASCQ=0x1d + +Signed-off-by: Luben Tuikov +Acked-by: Alan Stern +Acked-by: Matthew Dharm +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/transport.c | 34 +++++++++++++++++++--------------- + 1 file changed, 19 insertions(+), 15 deletions(-) + +--- a/drivers/usb/storage/transport.c ++++ b/drivers/usb/storage/transport.c +@@ -691,6 +691,9 @@ void usb_stor_invoke_transport(struct sc + int temp_result; + struct scsi_eh_save ses; + int sense_size = US_SENSE_SIZE; ++ struct scsi_sense_hdr sshdr; ++ const u8 *scdd; ++ u8 fm_ili; + + /* device supports and needs bigger sense buffer */ + if (us->fflags & US_FL_SANE_SENSE) +@@ -774,32 +777,30 @@ Retry_Sense: + srb->sense_buffer[7] = (US_SENSE_SIZE - 8); + } + ++ scsi_normalize_sense(srb->sense_buffer, SCSI_SENSE_BUFFERSIZE, ++ &sshdr); ++ + US_DEBUGP("-- Result from auto-sense is %d\n", temp_result); + US_DEBUGP("-- code: 0x%x, key: 0x%x, ASC: 0x%x, ASCQ: 0x%x\n", +- srb->sense_buffer[0], +- srb->sense_buffer[2] & 0xf, +- srb->sense_buffer[12], +- srb->sense_buffer[13]); ++ sshdr.response_code, sshdr.sense_key, ++ sshdr.asc, sshdr.ascq); + #ifdef CONFIG_USB_STORAGE_DEBUG +- usb_stor_show_sense( +- srb->sense_buffer[2] & 0xf, +- srb->sense_buffer[12], +- srb->sense_buffer[13]); ++ usb_stor_show_sense(sshdr.sense_key, sshdr.asc, sshdr.ascq); + #endif + + /* set the result so the higher layers expect this data */ + srb->result = SAM_STAT_CHECK_CONDITION; + ++ scdd = scsi_sense_desc_find(srb->sense_buffer, ++ SCSI_SENSE_BUFFERSIZE, 4); ++ fm_ili = (scdd ? scdd[3] : srb->sense_buffer[2]) & 0xA0; ++ + /* We often get empty sense data. This could indicate that + * everything worked or that there was an unspecified + * problem. We have to decide which. + */ +- if ( /* Filemark 0, ignore EOM, ILI 0, no sense */ +- (srb->sense_buffer[2] & 0xaf) == 0 && +- /* No ASC or ASCQ */ +- srb->sense_buffer[12] == 0 && +- srb->sense_buffer[13] == 0) { +- ++ if (sshdr.sense_key == 0 && sshdr.asc == 0 && sshdr.ascq == 0 && ++ fm_ili == 0) { + /* If things are really okay, then let's show that. + * Zero out the sense buffer so the higher layers + * won't realize we did an unsolicited auto-sense. +@@ -814,7 +815,10 @@ Retry_Sense: + */ + } else { + srb->result = DID_ERROR << 16; +- srb->sense_buffer[2] = HARDWARE_ERROR; ++ if ((sshdr.response_code & 0x72) == 0x72) ++ srb->sense_buffer[1] = HARDWARE_ERROR; ++ else ++ srb->sense_buffer[2] = HARDWARE_ERROR; + } + } + } diff --git a/queue-3.1/usbmon-vs.-tcpdump-fix-dropped-packet-count.patch b/queue-3.1/usbmon-vs.-tcpdump-fix-dropped-packet-count.patch new file mode 100644 index 00000000000..f7ed1a5c4f3 --- /dev/null +++ b/queue-3.1/usbmon-vs.-tcpdump-fix-dropped-packet-count.patch @@ -0,0 +1,36 @@ +From 236c448cb6e7f82096101e1ace4b77f8b38f82c8 Mon Sep 17 00:00:00 2001 +From: Johannes Stezenbach +Date: Thu, 8 Sep 2011 15:39:15 +0200 +Subject: usbmon vs. tcpdump: fix dropped packet count + +From: Johannes Stezenbach + +commit 236c448cb6e7f82096101e1ace4b77f8b38f82c8 upstream. + +Report the number of dropped packets instead of zero +when using the binary usbmon interface with tcpdump. + +# tcpdump -i usbmon1 -w dump +tcpdump: listening on usbmon1, link-type USB_LINUX_MMAPPED (USB with padded Linux header), capture size 65535 bytes +^C2155 packets captured +2155 packets received by filter +1019 packets dropped by kernel + +Signed-off-by: Johannes Stezenbach +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/mon/mon_bin.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/mon/mon_bin.c ++++ b/drivers/usb/mon/mon_bin.c +@@ -1101,7 +1101,7 @@ static long mon_bin_ioctl(struct file *f + nevents = mon_bin_queued(rp); + + sp = (struct mon_bin_stats __user *)arg; +- if (put_user(rp->cnt_lost, &sp->dropped)) ++ if (put_user(ndropped, &sp->dropped)) + return -EFAULT; + if (put_user(nevents, &sp->queued)) + return -EFAULT;