diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-09 15:37:12 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-09 15:37:12 -0700 |
commit | 0168f76f1d812a6aee5a636d36d35014c645bec5 (patch) | |
tree | 3cf7c58b811da9715be4f88dfccb5bfea2bebe50 | |
parent | 4d072f28aab7b24e06858ab20b8f36e1a0dc9127 (diff) | |
download | stable-queue-0168f76f1d812a6aee5a636d36d35014c645bec5.tar.gz |
.39 patches
11 files changed, 659 insertions, 0 deletions
diff --git a/queue-2.6.39/exec-delay-address-limit-change-until-point-of-no-return.patch b/queue-2.6.39/exec-delay-address-limit-change-until-point-of-no-return.patch new file mode 100644 index 0000000000..300f695a2b --- /dev/null +++ b/queue-2.6.39/exec-delay-address-limit-change-until-point-of-no-return.patch @@ -0,0 +1,75 @@ +From dac853ae89043f1b7752875300faf614de43c74b Mon Sep 17 00:00:00 2001 +From: Mathias Krause <minipli@googlemail.com> +Date: Thu, 9 Jun 2011 20:05:18 +0200 +Subject: exec: delay address limit change until point of no return + +From: Mathias Krause <minipli@googlemail.com> + +commit dac853ae89043f1b7752875300faf614de43c74b upstream. + +Unconditionally changing the address limit to USER_DS and not restoring +it to its old value in the error path is wrong because it prevents us +using kernel memory on repeated calls to this function. This, in fact, +breaks the fallback of hard coded paths to the init program from being +ever successful if the first candidate fails to load. + +With this patch applied switching to USER_DS is delayed until the point +of no return is reached which makes it possible to have a multi-arch +rootfs with one arch specific init binary for each of the (hard coded) +probed paths. + +Since the address limit is already set to USER_DS when start_thread() +will be invoked, this redundancy can be safely removed. + +Signed-off-by: Mathias Krause <minipli@googlemail.com> +Cc: Al Viro <viro@zeniv.linux.org.uk> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/x86/kernel/process_32.c | 1 - + arch/x86/kernel/process_64.c | 1 - + fs/exec.c | 5 +---- + 3 files changed, 1 insertion(+), 6 deletions(-) + +--- a/arch/x86/kernel/process_32.c ++++ b/arch/x86/kernel/process_32.c +@@ -245,7 +245,6 @@ start_thread(struct pt_regs *regs, unsig + { + set_user_gs(regs, 0); + regs->fs = 0; +- set_fs(USER_DS); + regs->ds = __USER_DS; + regs->es = __USER_DS; + regs->ss = __USER_DS; +--- a/arch/x86/kernel/process_64.c ++++ b/arch/x86/kernel/process_64.c +@@ -338,7 +338,6 @@ start_thread_common(struct pt_regs *regs + regs->cs = _cs; + regs->ss = _ss; + regs->flags = X86_EFLAGS_IF; +- set_fs(USER_DS); + /* + * Free the old FP and other extended state + */ +--- a/fs/exec.c ++++ b/fs/exec.c +@@ -1046,6 +1046,7 @@ int flush_old_exec(struct linux_binprm * + + bprm->mm = NULL; /* We're using it now */ + ++ set_fs(USER_DS); + current->flags &= ~(PF_RANDOMIZE | PF_KTHREAD); + flush_thread(); + current->personality &= ~bprm->per_clear; +@@ -1310,10 +1311,6 @@ int search_binary_handler(struct linux_b + if (retval) + return retval; + +- /* kernel module loader fixup */ +- /* so we don't try to load run modprobe in kernel space. */ +- set_fs(USER_DS); +- + retval = audit_bprm(bprm); + if (retval) + return retval; diff --git a/queue-2.6.39/option-add-alcatel-x200-to-sendsetup-blacklist.patch b/queue-2.6.39/option-add-alcatel-x200-to-sendsetup-blacklist.patch new file mode 100644 index 0000000000..d5439bee3b --- /dev/null +++ b/queue-2.6.39/option-add-alcatel-x200-to-sendsetup-blacklist.patch @@ -0,0 +1,62 @@ +From 15badbcc8eede58b0d7e53a3acde1c90a7b6e40e Mon Sep 17 00:00:00 2001 +From: Dan Williams <dcbw@redhat.com> +Date: Mon, 6 Jun 2011 16:22:44 -0500 +Subject: option: add Alcatel X200 to sendsetup blacklist + +From: Dan Williams <dcbw@redhat.com> + +commit 15badbcc8eede58b0d7e53a3acde1c90a7b6e40e upstream. + +This modem really wants sendsetup blacklisted for interfaces 0 and 1, +otherwise the kernel hardlocks for about 10 seconds while waiting for +the modem's firmware to respond, which it of course doesn't do. + +A slight complication here is that TCT (who owns the Alcatel brand) used +the same USB IDs for the X200 as the X060s despite the devices having +completely different firmware and AT command sets, so we end up adding +the X060s to the blacklist at the same time. PSA to OEMs: don't use the +same USB IDs for different devices. Really. It makes your kittens cry. + +Signed-off-by: Dan Williams <dcbw@redhat.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -344,7 +344,7 @@ static void option_instat_callback(struc + + /* ALCATEL PRODUCTS */ + #define ALCATEL_VENDOR_ID 0x1bbb +-#define ALCATEL_PRODUCT_X060S 0x0000 ++#define ALCATEL_PRODUCT_X060S_X200 0x0000 + + #define PIRELLI_VENDOR_ID 0x1266 + #define PIRELLI_PRODUCT_C100_1 0x1002 +@@ -435,6 +435,13 @@ static const struct option_blacklist_inf + .reason = OPTION_BLACKLIST_SENDSETUP + }; + ++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 ++}; ++ + static const struct usb_device_id option_ids[] = { + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, +@@ -939,7 +946,9 @@ static const struct usb_device_id option + { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */ + { USB_DEVICE(ALINK_VENDOR_ID, 0x9000) }, + { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) }, +- { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) }, ++ { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200), ++ .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist ++ }, + { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, + { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, + { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), diff --git a/queue-2.6.39/option-add-prolink-ph300-modem-ids.patch b/queue-2.6.39/option-add-prolink-ph300-modem-ids.patch new file mode 100644 index 0000000000..e5d3d36765 --- /dev/null +++ b/queue-2.6.39/option-add-prolink-ph300-modem-ids.patch @@ -0,0 +1,36 @@ +From 5c3e4076ee8253c1e3688d10653ddee47a03b0db Mon Sep 17 00:00:00 2001 +From: Dan Williams <dcbw@redhat.com> +Date: Mon, 6 Jun 2011 16:55:41 -0500 +Subject: option: add Prolink PH300 modem IDs + +From: Dan Williams <dcbw@redhat.com> + +commit 5c3e4076ee8253c1e3688d10653ddee47a03b0db upstream. + +Simple ID addition. + +Signed-off-by: Dan Williams <dcbw@redhat.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -340,6 +340,7 @@ static void option_instat_callback(struc + #define TOSHIBA_PRODUCT_G450 0x0d45 + + #define ALINK_VENDOR_ID 0x1e0e ++#define ALINK_PRODUCT_PH300 0x9100 + #define ALINK_PRODUCT_3GU 0x9200 + + /* ALCATEL PRODUCTS */ +@@ -945,6 +946,7 @@ static const struct usb_device_id option + { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_G450) }, + { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */ + { USB_DEVICE(ALINK_VENDOR_ID, 0x9000) }, ++ { USB_DEVICE(ALINK_VENDOR_ID, ALINK_PRODUCT_PH300) }, + { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) }, + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200), + .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist diff --git a/queue-2.6.39/option-add-zoom-4597-modem-usb-ids.patch b/queue-2.6.39/option-add-zoom-4597-modem-usb-ids.patch new file mode 100644 index 0000000000..56167c609f --- /dev/null +++ b/queue-2.6.39/option-add-zoom-4597-modem-usb-ids.patch @@ -0,0 +1,38 @@ +From cdacb598fe7ab85de80908c818dd7d66a2971117 Mon Sep 17 00:00:00 2001 +From: Dan Williams <dcbw@redhat.com> +Date: Mon, 6 Jun 2011 16:08:39 -0500 +Subject: option: add Zoom 4597 modem USB IDs + +From: Dan Williams <dcbw@redhat.com> + +commit cdacb598fe7ab85de80908c818dd7d66a2971117 upstream. + +Uses Longcheer-based firmware and AT command set. + +Signed-off-by: Dan Williams <dcbw@redhat.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -379,6 +379,9 @@ static void option_instat_callback(struc + * It seems to contain a Qualcomm QSC6240/6290 chipset */ + #define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603 + ++/* Zoom */ ++#define ZOOM_PRODUCT_4597 0x9607 ++ + /* Haier products */ + #define HAIER_VENDOR_ID 0x201e + #define HAIER_PRODUCT_CE100 0x2009 +@@ -942,6 +945,7 @@ static const struct usb_device_id option + { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), + .driver_info = (kernel_ulong_t)&four_g_w14_blacklist + }, ++ { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) }, + { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) }, + /* Pirelli */ + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1)}, diff --git a/queue-2.6.39/revert-usb-option-add-id-for-zte-mf-330.patch b/queue-2.6.39/revert-usb-option-add-id-for-zte-mf-330.patch new file mode 100644 index 0000000000..81d663953c --- /dev/null +++ b/queue-2.6.39/revert-usb-option-add-id-for-zte-mf-330.patch @@ -0,0 +1,52 @@ +From 3095ec895fd5ec19a7cb60b5cbfa766d68a74a24 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman <gregkh@suse.de> +Date: Tue, 7 Jun 2011 15:03:37 -0700 +Subject: Revert "USB: option: add ID for ZTE MF 330" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Greg Kroah-Hartman <gregkh@suse.de> + +commit 3095ec895fd5ec19a7cb60b5cbfa766d68a74a24 upstream. + +This reverts commit a559d2c8c1bf652ea2d0ecd6ab4a250fcdb37db8. + +Turns out that device id 0x1d6b:0x0002 is a USB hub, which causes havoc +when the option driver tries to bind to it. + +So revert this as it doesn't seem to be needed at all. + +Thanks to Michael Tokarev and PaweÅ‚ Drobek for working on resolving this +issue. + +Cc: PaweÅ‚ Drobek <pawel.drobek@gmail.com> +Cc: Michael Tokarev <mjt@tls.msk.ru> +Cc: Dominik Brodowski <linux@dominikbrodowski.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 5 ----- + 1 file changed, 5 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -311,10 +311,6 @@ static void option_instat_callback(struc + #define ZTE_PRODUCT_AC2726 0xfff5 + #define ZTE_PRODUCT_AC8710T 0xffff + +-/* ZTE PRODUCTS -- alternate vendor ID */ +-#define ZTE_VENDOR_ID2 0x1d6b +-#define ZTE_PRODUCT_MF_330 0x0002 +- + #define BENQ_VENDOR_ID 0x04a5 + #define BENQ_PRODUCT_H10 0x4068 + +@@ -941,7 +937,6 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) }, +- { USB_DEVICE(ZTE_VENDOR_ID2, ZTE_PRODUCT_MF_330) }, + { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, + { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, + { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ diff --git a/queue-2.6.39/series b/queue-2.6.39/series index 0270a3ff14..7f6cad8507 100644 --- a/queue-2.6.39/series +++ b/queue-2.6.39/series @@ -46,3 +46,13 @@ x86-amd-iommu-use-only-per-device-dma_ops.patch x86-amd-iommu-fix-3-possible-endless-loops.patch x86-amd-iommu-fix-boot-crash-with-hidden-pci-devices.patch usb-cdc-acm-adding-second-acm-channel-support-for-nokia-e7.patch +staging-gma500-get-control-from-firmware-framebuffer-if.patch +exec-delay-address-limit-change-until-point-of-no-return.patch +option-add-zoom-4597-modem-usb-ids.patch +option-add-alcatel-x200-to-sendsetup-blacklist.patch +option-add-prolink-ph300-modem-ids.patch +usb-option-add-blacklist-for-zte-k3765-z-19d2-2002.patch +revert-usb-option-add-id-for-zte-mf-330.patch +usb-core-tolerate-protocol-stall-during-hub-and-port.patch +usb-serial-add-another-4n-galaxy.de-pid-to-ftdi_sio-driver.patch +usb-storage-redo-incorrect-reads.patch diff --git a/queue-2.6.39/staging-gma500-get-control-from-firmware-framebuffer-if.patch b/queue-2.6.39/staging-gma500-get-control-from-firmware-framebuffer-if.patch new file mode 100644 index 0000000000..b69b74b659 --- /dev/null +++ b/queue-2.6.39/staging-gma500-get-control-from-firmware-framebuffer-if.patch @@ -0,0 +1,52 @@ +From aaa5c677910d313ca1318c905c799c459c6f0078 Mon Sep 17 00:00:00 2001 +From: Michael Chang <mchang@novell.com> +Date: Mon, 30 May 2011 14:28:25 +0800 +Subject: staging: gma500: get control from firmware framebuffer if + conflicts + +From: Michael Chang <mchang@novell.com> + +commit aaa5c677910d313ca1318c905c799c459c6f0078 upstream. + +Many Linux distributions would enable vesafb in order to display +early stage boot splash. In this case, we will get garbled X +Window screen if running X fbdev on psbfb. + +This is because fb0 is occupied by vesafb while psbfb is on fb1. +They tried to drive the same pieces of hardware at the same +time. With unmodified X start-up, it would try to use default +fb0 framebuffer device and unfortunately it is now broken +becaues fb1 supersedes it. + +We should let psbfb takeover framebuffer control from vesafb +to get around this problem. + +See also commit : 4410f3910947dcea8672280b3adecd53cec4e85e + +Signed-off-by: Michael Chang <mchang@novell.com> +Cc: Alan Cox <alan@linux.intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/gma500/psb_fb.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/staging/gma500/psb_fb.c ++++ b/drivers/staging/gma500/psb_fb.c +@@ -489,6 +489,16 @@ static int psbfb_create(struct psb_fbdev + info->screen_size = size; + memset(info->screen_base, 0, size); + ++ if (dev_priv->pg->stolen_size) { ++ info->apertures = alloc_apertures(1); ++ if (!info->apertures) { ++ ret = -ENOMEM; ++ goto out_err0; ++ } ++ info->apertures->ranges[0].base = dev->mode_config.fb_base; ++ info->apertures->ranges[0].size = dev_priv->pg->stolen_size; ++ } ++ + drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); + drm_fb_helper_fill_var(info, &fbdev->psb_fb_helper, + sizes->fb_width, sizes->fb_height); diff --git a/queue-2.6.39/usb-core-tolerate-protocol-stall-during-hub-and-port.patch b/queue-2.6.39/usb-core-tolerate-protocol-stall-during-hub-and-port.patch new file mode 100644 index 0000000000..3db14d1b4f --- /dev/null +++ b/queue-2.6.39/usb-core-tolerate-protocol-stall-during-hub-and-port.patch @@ -0,0 +1,45 @@ +From 3824c1ddaf744be44b170a335332b9d6afe79254 Mon Sep 17 00:00:00 2001 +From: Libor Pechacek <lpechacek@suse.cz> +Date: Fri, 20 May 2011 14:53:25 +0200 +Subject: USB: core: Tolerate protocol stall during hub and port + status read + +From: Libor Pechacek <lpechacek@suse.cz> + +commit 3824c1ddaf744be44b170a335332b9d6afe79254 upstream. + +Protocol stall should not be fatal while reading port or hub status as it is +transient state. Currently hub EP0 STALL during port status read results in +failed device enumeration. This has been observed with ST-Ericsson (formerly +Philips) USB 2.0 Hub (04cc:1521) after connecting keyboard. + +Signed-off-by: Libor Pechacek <lpechacek@suse.cz> +Acked-by: Alan Stern <stern@rowland.harvard.edu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/core/hub.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/usb/core/hub.c ++++ b/drivers/usb/core/hub.c +@@ -339,7 +339,8 @@ static int get_hub_status(struct usb_dev + { + int i, status = -ETIMEDOUT; + +- for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) { ++ for (i = 0; i < USB_STS_RETRIES && ++ (status == -ETIMEDOUT || status == -EPIPE); i++) { + status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), + USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0, + data, sizeof(*data), USB_STS_TIMEOUT); +@@ -355,7 +356,8 @@ static int get_port_status(struct usb_de + { + int i, status = -ETIMEDOUT; + +- for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) { ++ for (i = 0; i < USB_STS_RETRIES && ++ (status == -ETIMEDOUT || status == -EPIPE); i++) { + status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), + USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port1, + data, sizeof(*data), USB_STS_TIMEOUT); diff --git a/queue-2.6.39/usb-option-add-blacklist-for-zte-k3765-z-19d2-2002.patch b/queue-2.6.39/usb-option-add-blacklist-for-zte-k3765-z-19d2-2002.patch new file mode 100644 index 0000000000..4f89b43544 --- /dev/null +++ b/queue-2.6.39/usb-option-add-blacklist-for-zte-k3765-z-19d2-2002.patch @@ -0,0 +1,60 @@ +From 7e8e62e4a5d26e4cb45f25dddd093837d75616c2 Mon Sep 17 00:00:00 2001 +From: Torsten Hilbrich <torsten.hilbrich@secunet.com> +Date: Mon, 6 Jun 2011 15:39:55 +0200 +Subject: USB: option Add blacklist for ZTE K3765-Z (19d2:2002) + +From: Torsten Hilbrich <torsten.hilbrich@secunet.com> + +commit 7e8e62e4a5d26e4cb45f25dddd093837d75616c2 upstream. + +The funtion option_send_status times out when sending USB messages +to the interfaces 0, 1, and 2 of this UMTS stick. This results in a +5s timeout in the function causing other tty operations to feel very +sluggish. + +This patch adds a blacklist entry for these 3 interfaces on the ZTE +K3765-Z device. + +I was also able to reproduce the problem with v2.6.38 and v2.6.39. + +This is very similar to a problem fixed in + +commit 7a89e4cb9cdaba92f5fbc509945cf4e3c48db4e2 +Author: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com> +Date: Wed Mar 9 09:19:48 2011 +0000 + + USB: serial: option: Apply OPTION_BLACKLIST_SENDSETUP also for ZTE MF626 + +Signed-off-by: Torsten Hilbrich <torsten.hilbrich@secunet.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -443,6 +443,13 @@ static const struct option_blacklist_inf + .reason = OPTION_BLACKLIST_SENDSETUP + }; + ++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 ++}; ++ + static const struct usb_device_id option_ids[] = { + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, +@@ -927,7 +934,8 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, ++ 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, diff --git a/queue-2.6.39/usb-serial-add-another-4n-galaxy.de-pid-to-ftdi_sio-driver.patch b/queue-2.6.39/usb-serial-add-another-4n-galaxy.de-pid-to-ftdi_sio-driver.patch new file mode 100644 index 0000000000..c6a953647a --- /dev/null +++ b/queue-2.6.39/usb-serial-add-another-4n-galaxy.de-pid-to-ftdi_sio-driver.patch @@ -0,0 +1,39 @@ +From a26d31cef06f43a76327c21235e75450869df2b8 Mon Sep 17 00:00:00 2001 +From: Steffen Sledz <sledz@dresearch-fe.de> +Date: Tue, 7 Jun 2011 14:01:56 +0200 +Subject: USB: serial: add another 4N-GALAXY.DE PID to ftdi_sio driver + +From: Steffen Sledz <sledz@dresearch-fe.de> + +commit a26d31cef06f43a76327c21235e75450869df2b8 upstream. + +E.g. newer CAN 2.0 A/B <=> USB 2.0 converters report idProduct=f3c2. + +Signed-off-by: Steffen Sledz <sledz@dresearch-fe.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/ftdi_sio.c | 1 + + drivers/usb/serial/ftdi_sio_ids.h | 1 + + 2 files changed, 2 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -647,6 +647,7 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) }, + { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_3_PID) }, + { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_0_PID) }, + { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_1_PID) }, + { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_2_PID) }, +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -351,6 +351,7 @@ + */ + #define FTDI_4N_GALAXY_DE_1_PID 0xF3C0 + #define FTDI_4N_GALAXY_DE_2_PID 0xF3C1 ++#define FTDI_4N_GALAXY_DE_3_PID 0xF3C2 + + /* + * Linx Technologies product ids diff --git a/queue-2.6.39/usb-storage-redo-incorrect-reads.patch b/queue-2.6.39/usb-storage-redo-incorrect-reads.patch new file mode 100644 index 0000000000..d631d1772e --- /dev/null +++ b/queue-2.6.39/usb-storage-redo-incorrect-reads.patch @@ -0,0 +1,190 @@ +From 21c13a4f7bc185552c4b402b792c3bbb9aa69df0 Mon Sep 17 00:00:00 2001 +From: Alan Stern <stern@rowland.harvard.edu> +Date: Tue, 7 Jun 2011 11:35:52 -0400 +Subject: usb-storage: redo incorrect reads + +From: Alan Stern <stern@rowland.harvard.edu> + +commit 21c13a4f7bc185552c4b402b792c3bbb9aa69df0 upstream. + +Some USB mass-storage devices have bugs that cause them not to handle +the first READ(10) command they receive correctly. The Corsair +Padlock v2 returns completely bogus data for its first read (possibly +it returns the data in encrypted form even though the device is +supposed to be unlocked). The Feiya SD/SDHC card reader fails to +complete the first READ(10) command after it is plugged in or after a +new card is inserted, returning a status code that indicates it thinks +the command was invalid, which prevents the kernel from retrying the +read. + +Since the first read of a new device or a new medium is for the +partition sector, the kernel is unable to retrieve the device's +partition table. Users have to manually issue an "hdparm -z" or +"blockdev --rereadpt" command before they can access the device. + +This patch (as1470) works around the problem. It adds a new quirk +flag, US_FL_INVALID_READ10, indicating that the first READ(10) should +always be retried immediately, as should any failing READ(10) commands +(provided the preceding READ(10) command succeeded, to avoid getting +stuck in a loop). The patch also adds appropriate unusual_devs +entries containing the new flag. + +Signed-off-by: Alan Stern <stern@rowland.harvard.edu> +Tested-by: Sven Geggus <sven-usbst@geggus.net> +Tested-by: Paul Hartman <paul.hartman+linux@gmail.com> +CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + Documentation/kernel-parameters.txt | 2 ++ + drivers/usb/storage/transport.c | 29 +++++++++++++++++++++++++++++ + drivers/usb/storage/unusual_devs.h | 19 +++++++++++++++++++ + drivers/usb/storage/usb.c | 13 ++++++++++++- + drivers/usb/storage/usb.h | 2 ++ + include/linux/usb_usual.h | 4 +++- + 6 files changed, 67 insertions(+), 2 deletions(-) + +--- a/Documentation/kernel-parameters.txt ++++ b/Documentation/kernel-parameters.txt +@@ -2590,6 +2590,8 @@ bytes respectively. Such letter suffixes + unlock ejectable media); + m = MAX_SECTORS_64 (don't transfer more + than 64 sectors = 32 KB at a time); ++ n = INITIAL_READ10 (force a retry of the ++ initial READ(10) command); + o = CAPACITY_OK (accept the capacity + reported by the device); + r = IGNORE_RESIDUE (the device reports +--- a/drivers/usb/storage/transport.c ++++ b/drivers/usb/storage/transport.c +@@ -819,6 +819,35 @@ Retry_Sense: + } + } + ++ /* ++ * Some devices don't work or return incorrect data the first ++ * time they get a READ(10) command, or for the first READ(10) ++ * after a media change. If the INITIAL_READ10 flag is set, ++ * keep track of whether READ(10) commands succeed. If the ++ * previous one succeeded and this one failed, set the REDO_READ10 ++ * flag to force a retry. ++ */ ++ if (unlikely((us->fflags & US_FL_INITIAL_READ10) && ++ srb->cmnd[0] == READ_10)) { ++ if (srb->result == SAM_STAT_GOOD) { ++ set_bit(US_FLIDX_READ10_WORKED, &us->dflags); ++ } else if (test_bit(US_FLIDX_READ10_WORKED, &us->dflags)) { ++ clear_bit(US_FLIDX_READ10_WORKED, &us->dflags); ++ set_bit(US_FLIDX_REDO_READ10, &us->dflags); ++ } ++ ++ /* ++ * Next, if the REDO_READ10 flag is set, return a result ++ * code that will cause the SCSI core to retry the READ(10) ++ * command immediately. ++ */ ++ if (test_bit(US_FLIDX_REDO_READ10, &us->dflags)) { ++ clear_bit(US_FLIDX_REDO_READ10, &us->dflags); ++ srb->result = DID_IMM_RETRY << 16; ++ srb->sense_buffer[0] = 0; ++ } ++ } ++ + /* Did we transfer less than the minimum amount required? */ + if ((srb->result == SAM_STAT_GOOD || srb->sense_buffer[2] == 0) && + scsi_bufflen(srb) - scsi_get_resid(srb) < srb->underflow) +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -1114,6 +1114,16 @@ UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xf + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY ), + ++/* Reported by Paul Hartman <paul.hartman+linux@gmail.com> ++ * This card reader returns "Illegal Request, Logical Block Address ++ * Out of Range" for the first READ(10) after a new card is inserted. ++ */ ++UNUSUAL_DEV( 0x090c, 0x6000, 0x0100, 0x0100, ++ "Feiya", ++ "SD/SDHC Card Reader", ++ USB_SC_DEVICE, USB_PR_DEVICE, NULL, ++ US_FL_INITIAL_READ10 ), ++ + /* This Pentax still camera is not conformant + * to the USB storage specification: - + * - It does not like the INQUIRY command. So we must handle this command +@@ -1888,6 +1898,15 @@ UNUSUAL_DEV( 0x1908, 0x3335, 0x0200, 0x0 + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_NO_READ_DISC_INFO ), + ++/* Reported by Sven Geggus <sven-usbst@geggus.net> ++ * This encrypted pen drive returns bogus data for the initial READ(10). ++ */ ++UNUSUAL_DEV( 0x1b1c, 0x1ab5, 0x0200, 0x0200, ++ "Corsair", ++ "Padlock v2", ++ USB_SC_DEVICE, USB_PR_DEVICE, NULL, ++ US_FL_INITIAL_READ10 ), ++ + /* Patch by Richard Schütz <r.schtz@t-online.de> + * This external hard drive enclosure uses a JMicron chip which + * needs the US_FL_IGNORE_RESIDUE flag to work properly. */ +--- a/drivers/usb/storage/usb.c ++++ b/drivers/usb/storage/usb.c +@@ -439,7 +439,8 @@ static void adjust_quirks(struct us_data + US_FL_CAPACITY_HEURISTICS | US_FL_IGNORE_DEVICE | + US_FL_NOT_LOCKABLE | US_FL_MAX_SECTORS_64 | + US_FL_CAPACITY_OK | US_FL_IGNORE_RESIDUE | +- US_FL_SINGLE_LUN | US_FL_NO_WP_DETECT); ++ US_FL_SINGLE_LUN | US_FL_NO_WP_DETECT | ++ US_FL_INITIAL_READ10); + + p = quirks; + while (*p) { +@@ -483,6 +484,9 @@ static void adjust_quirks(struct us_data + case 'm': + f |= US_FL_MAX_SECTORS_64; + break; ++ case 'n': ++ f |= US_FL_INITIAL_READ10; ++ break; + case 'o': + f |= US_FL_CAPACITY_OK; + break; +@@ -946,6 +950,13 @@ int usb_stor_probe2(struct us_data *us) + if (result) + goto BadDevice; + ++ /* ++ * If the device returns invalid data for the first READ(10) ++ * command, indicate the command should be retried. ++ */ ++ if (us->fflags & US_FL_INITIAL_READ10) ++ set_bit(US_FLIDX_REDO_READ10, &us->dflags); ++ + /* Acquire all the other resources and add the host */ + result = usb_stor_acquire_resources(us); + if (result) +--- a/drivers/usb/storage/usb.h ++++ b/drivers/usb/storage/usb.h +@@ -73,6 +73,8 @@ struct us_unusual_dev { + #define US_FLIDX_RESETTING 4 /* device reset in progress */ + #define US_FLIDX_TIMED_OUT 5 /* SCSI midlayer timed out */ + #define US_FLIDX_DONT_SCAN 6 /* don't scan (disconnect) */ ++#define US_FLIDX_REDO_READ10 7 /* redo READ(10) command */ ++#define US_FLIDX_READ10_WORKED 8 /* previous READ(10) succeeded */ + + #define USB_STOR_STRING_LEN 32 + +--- a/include/linux/usb_usual.h ++++ b/include/linux/usb_usual.h +@@ -62,7 +62,9 @@ + US_FLAG(NO_READ_DISC_INFO, 0x00040000) \ + /* cannot handle READ_DISC_INFO */ \ + US_FLAG(NO_READ_CAPACITY_16, 0x00080000) \ +- /* cannot handle READ_CAPACITY_16 */ ++ /* cannot handle READ_CAPACITY_16 */ \ ++ US_FLAG(INITIAL_READ10, 0x00100000) \ ++ /* Initial READ(10) (and others) must be retried */ + + #define US_FLAG(name, value) US_FL_##name = value , + enum { US_DO_ALL_FLAGS }; |