From: Greg Kroah-Hartman Date: Thu, 22 Mar 2012 18:39:28 +0000 (-0700) Subject: 3.2-stable patches X-Git-Tag: v3.0.26~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f35ccd9c6ea39221d705feee5e8cc62938b911b6;p=thirdparty%2Fkernel%2Fstable-queue.git 3.2-stable patches added patches: powerpc-usb-fix-bug-of-kernel-hang-when-initializing-usb.patch staging-r8712u-add-missing-initialization-and-remove-configuration-parameter-config_r8712_ap.patch staging-r8712u-fix-regression-in-signal-level-after-commit-c6dc001.patch staging-r8712u-fix-regression-introduced-by-commit-a5ee652.patch usb-ftdi_sio-add-support-for-beaglebone-rev-a5.patch usb-ftdi_sio-add-support-for-ft-x-series-devices.patch usb-ftdi_sio-fix-problem-when-the-manufacture-is-a-null-string.patch usb-ftdi_sio-new-pid-distortec-jtag-lock-pick.patch usb-ftdi_sio-new-pid-lumel-pd12.patch usb-microchip-vid-mislabeled-as-hornby-vid-in-ftdi_sio.patch --- diff --git a/queue-3.2/powerpc-usb-fix-bug-of-kernel-hang-when-initializing-usb.patch b/queue-3.2/powerpc-usb-fix-bug-of-kernel-hang-when-initializing-usb.patch new file mode 100644 index 00000000000..7bac4510cb8 --- /dev/null +++ b/queue-3.2/powerpc-usb-fix-bug-of-kernel-hang-when-initializing-usb.patch @@ -0,0 +1,50 @@ +From 28c56ea1431421dec51b7b229369e991481453df Mon Sep 17 00:00:00 2001 +From: Shengzhou Liu +Date: Thu, 16 Feb 2012 18:02:20 +0800 +Subject: powerpc/usb: fix bug of kernel hang when initializing usb + +From: Shengzhou Liu + +commit 28c56ea1431421dec51b7b229369e991481453df upstream. + +If USB UTMI PHY is not enable, writing to portsc register will lead to +kernel hang during boot up. + +Signed-off-by: Shengzhou Liu +Reported-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ehci-fsl.c | 4 ++++ + drivers/usb/host/ehci-fsl.h | 1 + + 2 files changed, 5 insertions(+) + +--- a/drivers/usb/host/ehci-fsl.c ++++ b/drivers/usb/host/ehci-fsl.c +@@ -216,6 +216,8 @@ static void ehci_fsl_setup_phy(struct eh + unsigned int port_offset) + { + u32 portsc; ++ struct usb_hcd *hcd = ehci_to_hcd(ehci); ++ void __iomem *non_ehci = hcd->regs; + + portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]); + portsc &= ~(PORT_PTS_MSK | PORT_PTS_PTW); +@@ -231,6 +233,8 @@ static void ehci_fsl_setup_phy(struct eh + portsc |= PORT_PTS_PTW; + /* fall through */ + case FSL_USB2_PHY_UTMI: ++ /* enable UTMI PHY */ ++ setbits32(non_ehci + FSL_SOC_USB_CTRL, CTRL_UTMI_PHY_EN); + portsc |= PORT_PTS_UTMI; + break; + case FSL_USB2_PHY_NONE: +--- a/drivers/usb/host/ehci-fsl.h ++++ b/drivers/usb/host/ehci-fsl.h +@@ -45,5 +45,6 @@ + #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */ + #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */ + #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */ ++#define CTRL_UTMI_PHY_EN (1<<9) + #define SNOOP_SIZE_2GB 0x1e + #endif /* _EHCI_FSL_H */ diff --git a/queue-3.2/series b/queue-3.2/series index 08ba9e8c8a5..9b172d8c2d7 100644 --- a/queue-3.2/series +++ b/queue-3.2/series @@ -3,3 +3,13 @@ usb-option-driver-adding-support-for-telit-cc864-single-cc864-dual-and-de910-dua usb-option-make-interface-blacklist-work-again.patch usb-option-add-zte-mf820d.patch staging-zcache-avoid-ab-ba-deadlock-condition.patch +usb-ftdi_sio-fix-problem-when-the-manufacture-is-a-null-string.patch +usb-ftdi_sio-add-support-for-beaglebone-rev-a5.patch +usb-microchip-vid-mislabeled-as-hornby-vid-in-ftdi_sio.patch +usb-ftdi_sio-new-pid-distortec-jtag-lock-pick.patch +usb-ftdi_sio-add-support-for-ft-x-series-devices.patch +usb-ftdi_sio-new-pid-lumel-pd12.patch +powerpc-usb-fix-bug-of-kernel-hang-when-initializing-usb.patch +staging-r8712u-add-missing-initialization-and-remove-configuration-parameter-config_r8712_ap.patch +staging-r8712u-fix-regression-introduced-by-commit-a5ee652.patch +staging-r8712u-fix-regression-in-signal-level-after-commit-c6dc001.patch diff --git a/queue-3.2/staging-r8712u-add-missing-initialization-and-remove-configuration-parameter-config_r8712_ap.patch b/queue-3.2/staging-r8712u-add-missing-initialization-and-remove-configuration-parameter-config_r8712_ap.patch new file mode 100644 index 00000000000..5cafe513964 --- /dev/null +++ b/queue-3.2/staging-r8712u-add-missing-initialization-and-remove-configuration-parameter-config_r8712_ap.patch @@ -0,0 +1,100 @@ +From 073863432f7eaa23c7c09733414d4be2eabf5eef Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Thu, 9 Feb 2012 16:37:17 -0600 +Subject: staging: r8712u: Add missing initialization and remove configuration parameter CONFIG_R8712_AP + +From: Larry Finger + +commit 073863432f7eaa23c7c09733414d4be2eabf5eef upstream. + +When this driver was upgraded to the vendor 20100831 version in +commit 93c55dda092c7 et al,, one listhead initialization was missed. +This broke complete operation of the driver whenever AP mode was +enabled. This fixes https://bugs.archlinux.org/task/27996. + +The configuration parameter R8712_AP is misleading as the driver cannot +function as an AP without a heavily hacked version of hostapd. Thus, it +makes sense to remove the parameter; however the code and data configured +for the option is left in. + +Signed-off-by: Larry Finger +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/rtl8712/Kconfig | 7 ------- + drivers/staging/rtl8712/rtl871x_sta_mgt.c | 5 +---- + drivers/staging/rtl8712/sta_info.h | 4 ---- + 3 files changed, 1 insertion(+), 15 deletions(-) + +--- a/drivers/staging/rtl8712/Kconfig ++++ b/drivers/staging/rtl8712/Kconfig +@@ -9,13 +9,6 @@ config R8712U + This option adds the Realtek RTL8712 USB device such as the D-Link DWA-130. + If built as a module, it will be called r8712u. + +-config R8712_AP +- bool "Realtek RTL8712U AP code" +- depends on R8712U +- default N +- ---help--- +- This option allows the Realtek RTL8712 USB device to be an Access Point. +- + config R8712_TX_AGGR + bool "Realtek RTL8712U Transmit Aggregation code" + depends on R8712U && BROKEN +--- a/drivers/staging/rtl8712/rtl871x_sta_mgt.c ++++ b/drivers/staging/rtl8712/rtl871x_sta_mgt.c +@@ -42,9 +42,8 @@ static void _init_stainfo(struct sta_inf + _init_listhead(&psta->hash_list); + _r8712_init_sta_xmit_priv(&psta->sta_xmitpriv); + _r8712_init_sta_recv_priv(&psta->sta_recvpriv); +-#ifdef CONFIG_R8712_AP ++ _init_listhead(&psta->asoc_list); + _init_listhead(&psta->auth_list); +-#endif + } + + u32 _r8712_init_sta_priv(struct sta_priv *pstapriv) +@@ -71,10 +70,8 @@ u32 _r8712_init_sta_priv(struct sta_priv + get_list_head(&pstapriv->free_sta_queue)); + psta++; + } +-#ifdef CONFIG_R8712_AP + _init_listhead(&pstapriv->asoc_list); + _init_listhead(&pstapriv->auth_list); +-#endif + return _SUCCESS; + } + +--- a/drivers/staging/rtl8712/sta_info.h ++++ b/drivers/staging/rtl8712/sta_info.h +@@ -90,7 +90,6 @@ struct sta_info { + * curr_network(mlme_priv/security_priv/qos/ht) : AP CAP/INFO + * sta_info: (AP & STA) CAP/INFO + */ +-#ifdef CONFIG_R8712_AP + struct list_head asoc_list; + struct list_head auth_list; + unsigned int expire_to; +@@ -98,7 +97,6 @@ struct sta_info { + unsigned int authalg; + unsigned char chg_txt[128]; + unsigned int tx_ra_bitmap; +-#endif + }; + + struct sta_priv { +@@ -111,13 +109,11 @@ struct sta_priv { + struct __queue sleep_q; + struct __queue wakeup_q; + struct _adapter *padapter; +-#ifdef CONFIG_R8712_AP + struct list_head asoc_list; + struct list_head auth_list; + unsigned int auth_to; /* sec, time to expire in authenticating. */ + unsigned int assoc_to; /* sec, time to expire before associating. */ + unsigned int expire_to; /* sec , time to expire after associated. */ +-#endif + }; + + static inline u32 wifi_mac_hash(u8 *mac) diff --git a/queue-3.2/staging-r8712u-fix-regression-in-signal-level-after-commit-c6dc001.patch b/queue-3.2/staging-r8712u-fix-regression-in-signal-level-after-commit-c6dc001.patch new file mode 100644 index 00000000000..4a43619bd9c --- /dev/null +++ b/queue-3.2/staging-r8712u-fix-regression-in-signal-level-after-commit-c6dc001.patch @@ -0,0 +1,44 @@ +From da3e6ec2f443ac00aa623c5921e3521f5f38efe4 Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Sun, 26 Feb 2012 22:08:36 -0600 +Subject: staging: r8712u: Fix regression in signal level after commit c6dc001 + +From: Larry Finger + +commit da3e6ec2f443ac00aa623c5921e3521f5f38efe4 upstream. + +In commit c6dc001 "staging: r8712u: Merging Realtek's latest (v2.6.6). +Various fixes", the returned qual.qual member of the iw_statistics +struct was changed. For strong signals, this change made no difference; +however for medium and weak signals it results in a low signal that +shows considerable fluctuation, When using wicd for a medium-strength +AP, the value reported in the status line is reduced from 100% to 60% by +this bug. + +This problem is reported in https://bugzilla.kernel.org/show_bug.cgi?id=42826. + +Reported-and-tested-by: Robert Crawford +Signed-off-by: Larry Finger +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c ++++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +@@ -2380,13 +2380,7 @@ static struct iw_statistics *r871x_get_w + tmp_qual = padapter->recvpriv.signal; + tmp_noise = padapter->recvpriv.noise; + piwstats->qual.level = tmp_level; +- /*piwstats->qual.qual = tmp_qual; +- * The NetworkManager of Fedora 10, 13 will use the link +- * quality for its display. +- * So, use the fw_rssi on link quality variable because +- * fw_rssi will be updated per 2 seconds. +- */ +- piwstats->qual.qual = tmp_level; ++ piwstats->qual.qual = tmp_qual; + piwstats->qual.noise = tmp_noise; + } + piwstats->qual.updated = IW_QUAL_ALL_UPDATED; diff --git a/queue-3.2/staging-r8712u-fix-regression-introduced-by-commit-a5ee652.patch b/queue-3.2/staging-r8712u-fix-regression-introduced-by-commit-a5ee652.patch new file mode 100644 index 00000000000..e701c9f7d91 --- /dev/null +++ b/queue-3.2/staging-r8712u-fix-regression-introduced-by-commit-a5ee652.patch @@ -0,0 +1,50 @@ +From 9f4bc8cf3fe750ed093856a5f5d41c11cc12ad22 Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Sat, 25 Feb 2012 18:10:20 -0600 +Subject: staging: r8712u: Fix regression introduced by commit a5ee652 + +From: Larry Finger + +commit 9f4bc8cf3fe750ed093856a5f5d41c11cc12ad22 upstream. + +In commit a5ee652 "staging: r8712u: Interface-state not fully tracked", +the private boolean "bup" was set false when the interface was brought down, +as that seemed appropriate. This change has not caused any problems when +using NetworkManager or manual control of the device; however, when wicd +control is used, there is a locking problem in wpa_supplicant, as shown in +https://bugzilla.kernel.org/show_bug.cgi?id=42818. + +This fix reverts the only code change in commit a5ee652. My +analysis is that "bup" is badly named. In its present form, it +seems to indicate the up/down state of the device, but its usage +is more consistent with an initialized/uninitialized state. That +problem will be addressed in a later patch. + +Note: Commit 8c213fa, which introdued asynchronous firmware loading +for this driver, exposed this bug to a greater extent. That bug +is addressed in the next patch in this series. + +This bug is also responsible for the bug in +https://bugzilla.kernel.org/show_bug.cgi?id=42815. and this bug is +also part of the problems discussed at https://bugs.archlinux.org/task/27996#comment89950. + +Tested-by: Alberto Lago Ballesteros +Tested-by: Adrian +Signed-off-by: Larry Finger +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/rtl8712/os_intfs.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/staging/rtl8712/os_intfs.c ++++ b/drivers/staging/rtl8712/os_intfs.c +@@ -476,8 +476,6 @@ static int netdev_close(struct net_devic + r8712_free_assoc_resources(padapter); + /*s2-4.*/ + r8712_free_network_queue(padapter); +- /* The interface is no longer Up: */ +- padapter->bup = false; + release_firmware(padapter->fw); + /* never exit with a firmware callback pending */ + wait_for_completion(&padapter->rtl8712_fw_ready); diff --git a/queue-3.2/usb-ftdi_sio-add-support-for-beaglebone-rev-a5.patch b/queue-3.2/usb-ftdi_sio-add-support-for-beaglebone-rev-a5.patch new file mode 100644 index 00000000000..2dbd6cbf6d0 --- /dev/null +++ b/queue-3.2/usb-ftdi_sio-add-support-for-beaglebone-rev-a5.patch @@ -0,0 +1,33 @@ +From 444aa7fa9bd752d19ce472d3e02558b987c3cc67 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Wed, 29 Feb 2012 10:05:37 +0100 +Subject: USB: ftdi_sio: add support for BeagleBone rev A5+ + +From: Peter Korsgaard + +commit 444aa7fa9bd752d19ce472d3e02558b987c3cc67 upstream. + +BeagleBone changed to the default FTDI 0403:6010 id in rev A5 to make life +easier for Windows users, so we need a similar workaround as the Calao +board to support it. + +Signed-off-by: Peter Korsgaard +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -1763,8 +1763,8 @@ static int ftdi_8u2232c_probe(struct usb + + dbg("%s", __func__); + +- if ((udev->manufacturer) && +- (strcmp(udev->manufacturer, "CALAO Systems") == 0)) ++ if ((udev->manufacturer && !strcmp(udev->manufacturer, "CALAO Systems")) || ++ (udev->product && !strcmp(udev->product, "BeagleBone/XDS100"))) + return ftdi_jtag_probe(serial); + + return 0; diff --git a/queue-3.2/usb-ftdi_sio-add-support-for-ft-x-series-devices.patch b/queue-3.2/usb-ftdi_sio-add-support-for-ft-x-series-devices.patch new file mode 100644 index 00000000000..c2b949833f3 --- /dev/null +++ b/queue-3.2/usb-ftdi_sio-add-support-for-ft-x-series-devices.patch @@ -0,0 +1,144 @@ +From dc0827c128c0ee5a58b822b99d662b59f4b8e970 Mon Sep 17 00:00:00 2001 +From: Jim Paris +Date: Wed, 14 Mar 2012 17:54:25 -0400 +Subject: USB: ftdi_sio: add support for FT-X series devices + +From: Jim Paris + +commit dc0827c128c0ee5a58b822b99d662b59f4b8e970 upstream. + +Add PID 0x6015, corresponding to the new series of FT-X chips +(FT220XD, FT201X, FT220X, FT221X, FT230X, FT231X, FT240X). They all +appear as serial devices, and seem indistinguishable except for the +default product string stored in their EEPROM. The baudrate +generation matches FT232RL devices. + +Tested with a FT201X and FT230X at various baudrates (100 - 3000000). + +Sample dmesg: + ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver + usb 2-1: new full-speed USB device number 6 using ohci_hcd + usb 2-1: New USB device found, idVendor=0403, idProduct=6015 + usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 + usb 2-1: Product: FT230X USB Half UART + usb 2-1: Manufacturer: FTDI + usb 2-1: SerialNumber: DC001WI6 + ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected + drivers/usb/serial/ftdi_sio.c: ftdi_sio_port_probe + drivers/usb/serial/ftdi_sio.c: ftdi_determine_type: bcdDevice = 0x1000, bNumInterfaces = 1 + usb 2-1: Detected FT-X + usb 2-1: Number of endpoints 2 + usb 2-1: Endpoint 1 MaxPacketSize 64 + usb 2-1: Endpoint 2 MaxPacketSize 64 + usb 2-1: Setting MaxPacketSize 64 + drivers/usb/serial/ftdi_sio.c: read_latency_timer + drivers/usb/serial/ftdi_sio.c: write_latency_timer: setting latency timer = 1 + drivers/usb/serial/ftdi_sio.c: create_sysfs_attrs + drivers/usb/serial/ftdi_sio.c: sysfs attributes for FT-X + usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0 + +Signed-off-by: Jim Paris +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 20 +++++++++++++++----- + drivers/usb/serial/ftdi_sio.h | 3 ++- + drivers/usb/serial/ftdi_sio_ids.h | 1 + + 3 files changed, 18 insertions(+), 6 deletions(-) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -188,6 +188,7 @@ static struct usb_device_id id_table_com + .driver_info = (kernel_ulong_t)&ftdi_8u2232c_quirk }, + { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_232H_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_FTX_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) }, +@@ -870,7 +871,8 @@ static const char *ftdi_chip_name[] = { + [FT232RL] = "FT232RL", + [FT2232H] = "FT2232H", + [FT4232H] = "FT4232H", +- [FT232H] = "FT232H" ++ [FT232H] = "FT232H", ++ [FTX] = "FT-X" + }; + + +@@ -1171,7 +1173,8 @@ static __u32 get_ftdi_divisor(struct tty + break; + case FT232BM: /* FT232BM chip */ + case FT2232C: /* FT2232C chip */ +- case FT232RL: ++ case FT232RL: /* FT232RL chip */ ++ case FTX: /* FT-X series */ + if (baud <= 3000000) { + __u16 product_id = le16_to_cpu( + port->serial->dev->descriptor.idProduct); +@@ -1460,10 +1463,14 @@ static void ftdi_determine_type(struct u + } else if (version < 0x900) { + /* Assume it's an FT232RL */ + priv->chip_type = FT232RL; +- } else { ++ } else if (version < 0x1000) { + /* Assume it's an FT232H */ + priv->chip_type = FT232H; ++ } else { ++ /* Assume it's an FT-X series device */ ++ priv->chip_type = FTX; + } ++ + dev_info(&udev->dev, "Detected %s\n", ftdi_chip_name[priv->chip_type]); + } + +@@ -1591,7 +1598,8 @@ static int create_sysfs_attrs(struct usb + priv->chip_type == FT232RL || + priv->chip_type == FT2232H || + priv->chip_type == FT4232H || +- priv->chip_type == FT232H)) { ++ priv->chip_type == FT232H || ++ priv->chip_type == FTX)) { + retval = device_create_file(&port->dev, + &dev_attr_latency_timer); + } +@@ -1613,7 +1621,8 @@ static void remove_sysfs_attrs(struct us + priv->chip_type == FT232RL || + priv->chip_type == FT2232H || + priv->chip_type == FT4232H || +- priv->chip_type == FT232H) { ++ priv->chip_type == FT232H || ++ priv->chip_type == FTX) { + device_remove_file(&port->dev, &dev_attr_latency_timer); + } + } +@@ -2287,6 +2296,7 @@ static int ftdi_tiocmget(struct tty_stru + case FT2232H: + case FT4232H: + case FT232H: ++ case FTX: + len = 2; + break; + default: +--- a/drivers/usb/serial/ftdi_sio.h ++++ b/drivers/usb/serial/ftdi_sio.h +@@ -157,7 +157,8 @@ enum ftdi_chip_type { + FT232RL = 5, + FT2232H = 6, + FT4232H = 7, +- FT232H = 8 ++ FT232H = 8, ++ FTX = 9, + }; + + enum ftdi_sio_baudrate { +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -23,6 +23,7 @@ + #define FTDI_8U2232C_PID 0x6010 /* Dual channel device */ + #define FTDI_4232H_PID 0x6011 /* Quad channel hi-speed device */ + #define FTDI_232H_PID 0x6014 /* Single channel hi-speed device */ ++#define FTDI_FTX_PID 0x6015 /* FT-X series (FT201X, FT230X, FT231X, etc) */ + #define FTDI_SIO_PID 0x8372 /* Product Id SIO application of 8U100AX */ + #define FTDI_232RL_PID 0xFBFA /* Product ID for FT232RL */ + diff --git a/queue-3.2/usb-ftdi_sio-fix-problem-when-the-manufacture-is-a-null-string.patch b/queue-3.2/usb-ftdi_sio-fix-problem-when-the-manufacture-is-a-null-string.patch new file mode 100644 index 00000000000..a8011b983d2 --- /dev/null +++ b/queue-3.2/usb-ftdi_sio-fix-problem-when-the-manufacture-is-a-null-string.patch @@ -0,0 +1,33 @@ +From 656d2b3964a9d0f9864d472f8dfa2dd7dd42e6c0 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Tue, 28 Feb 2012 09:20:09 -0800 +Subject: USB: ftdi_sio: fix problem when the manufacture is a NULL string + +From: Greg Kroah-Hartman + +commit 656d2b3964a9d0f9864d472f8dfa2dd7dd42e6c0 upstream. + +On some misconfigured ftdi_sio devices, if the manufacturer string is +NULL, the kernel will oops when the device is plugged in. This patch +fixes the problem. + +Reported-by: Wojciech M Zabolotny +Tested-by: Wojciech M Zabolotny +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -1763,7 +1763,8 @@ static int ftdi_8u2232c_probe(struct usb + + dbg("%s", __func__); + +- if (strcmp(udev->manufacturer, "CALAO Systems") == 0) ++ if ((udev->manufacturer) && ++ (strcmp(udev->manufacturer, "CALAO Systems") == 0)) + return ftdi_jtag_probe(serial); + + return 0; diff --git a/queue-3.2/usb-ftdi_sio-new-pid-distortec-jtag-lock-pick.patch b/queue-3.2/usb-ftdi_sio-new-pid-distortec-jtag-lock-pick.patch new file mode 100644 index 00000000000..5c11d0b09a4 --- /dev/null +++ b/queue-3.2/usb-ftdi_sio-new-pid-distortec-jtag-lock-pick.patch @@ -0,0 +1,42 @@ +From 47594d5528f28a4c025c2955c68104c75815637c Mon Sep 17 00:00:00 2001 +From: Michał Wróbel +Date: Fri, 9 Mar 2012 14:40:18 +0100 +Subject: USB: ftdi_sio: new PID: Distortec JTAG-lock-pick +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Michał Wróbel + +commit 47594d5528f28a4c025c2955c68104c75815637c upstream. + +Signed-off-by: Michał Wróbel +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 2 ++ + drivers/usb/serial/ftdi_sio_ids.h | 2 ++ + 2 files changed, 4 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -846,6 +846,8 @@ static struct usb_device_id id_table_com + { USB_DEVICE(ST_VID, ST_STMCLT1030_PID), + .driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk }, + { USB_DEVICE(FTDI_VID, FTDI_RF_R106) }, ++ { USB_DEVICE(FTDI_VID, FTDI_DISTORTEC_JTAG_LOCK_PICK_PID), ++ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { }, /* Optional parameter entry */ + { } /* Terminating entry */ + }; +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -97,6 +97,8 @@ + #define FTDI_TACTRIX_OPENPORT_13S_PID 0xCC49 /* OpenPort 1.3 Subaru */ + #define FTDI_TACTRIX_OPENPORT_13U_PID 0xCC4A /* OpenPort 1.3 Universal */ + ++#define FTDI_DISTORTEC_JTAG_LOCK_PICK_PID 0xCFF8 ++ + /* SCS HF Radio Modems PID's (http://www.scs-ptc.com) */ + /* the VID is the standard ftdi vid (FTDI_VID) */ + #define FTDI_SCS_DEVICE_0_PID 0xD010 /* SCS PTC-IIusb */ diff --git a/queue-3.2/usb-ftdi_sio-new-pid-lumel-pd12.patch b/queue-3.2/usb-ftdi_sio-new-pid-lumel-pd12.patch new file mode 100644 index 00000000000..bd44b47574c --- /dev/null +++ b/queue-3.2/usb-ftdi_sio-new-pid-lumel-pd12.patch @@ -0,0 +1,41 @@ +From 57e596f3af88ef52dea9640ed5e34ecd38893a02 Mon Sep 17 00:00:00 2001 +From: Michał Wróbel +Date: Thu, 15 Mar 2012 17:24:04 +0100 +Subject: USB: ftdi_sio: new PID: LUMEL PD12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Michał Wróbel + +commit 57e596f3af88ef52dea9640ed5e34ecd38893a02 upstream. + +Signed-off-by: Michał Wróbel +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 1 + + drivers/usb/serial/ftdi_sio_ids.h | 2 ++ + 2 files changed, 3 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -849,6 +849,7 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, FTDI_RF_R106) }, + { USB_DEVICE(FTDI_VID, FTDI_DISTORTEC_JTAG_LOCK_PICK_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, ++ { USB_DEVICE(FTDI_VID, FTDI_LUMEL_PD12_PID) }, + { }, /* Optional parameter entry */ + { } /* Terminating entry */ + }; +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -30,6 +30,8 @@ + + /*** third-party PIDs (using FTDI_VID) ***/ + ++#define FTDI_LUMEL_PD12_PID 0x6002 ++ + /* + * Marvell OpenRD Base, Client + * http://www.open-rd.org diff --git a/queue-3.2/usb-microchip-vid-mislabeled-as-hornby-vid-in-ftdi_sio.patch b/queue-3.2/usb-microchip-vid-mislabeled-as-hornby-vid-in-ftdi_sio.patch new file mode 100644 index 00000000000..e94c7e56fc8 --- /dev/null +++ b/queue-3.2/usb-microchip-vid-mislabeled-as-hornby-vid-in-ftdi_sio.patch @@ -0,0 +1,56 @@ +From c1cee1d84001815a1b4321c49b995254c0df3100 Mon Sep 17 00:00:00 2001 +From: Bruno Thomsen +Date: Sun, 4 Mar 2012 15:19:14 +0100 +Subject: USB: Microchip VID mislabeled as Hornby VID in ftdi_sio. + +From: Bruno Thomsen + +commit c1cee1d84001815a1b4321c49b995254c0df3100 upstream. + +Microchip VID (0x04d8) was mislabeled as Hornby VID according to USB-IDs. + +A Full Speed USB Demo Board PID (0x000a) was mislabeled as +Hornby Elite (an Digital Command Controller Console for model railways). + +Most likely the Hornby based their design on +PIC18F87J50 Full Speed USB Demo Board. + +Signed-off-by: Bruno Thomsen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 2 +- + drivers/usb/serial/ftdi_sio_ids.h | 10 +++++++--- + 2 files changed, 8 insertions(+), 4 deletions(-) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -797,7 +797,7 @@ static struct usb_device_id id_table_com + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(ADI_VID, ADI_GNICEPLUS_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, +- { USB_DEVICE(HORNBY_VID, HORNBY_ELITE_PID) }, ++ { USB_DEVICE(MICROCHIP_VID, MICROCHIP_USB_BOARD_PID) }, + { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) }, + { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -532,10 +532,14 @@ + #define ADI_GNICEPLUS_PID 0xF001 + + /* +- * Hornby Elite ++ * Microchip Technology, Inc. ++ * ++ * MICROCHIP_VID (0x04D8) and MICROCHIP_USB_BOARD_PID (0x000A) are also used by: ++ * Hornby Elite - Digital Command Control Console ++ * http://www.hornby.com/hornby-dcc/controllers/ + */ +-#define HORNBY_VID 0x04D8 +-#define HORNBY_ELITE_PID 0x000A ++#define MICROCHIP_VID 0x04D8 ++#define MICROCHIP_USB_BOARD_PID 0x000A /* CDC RS-232 Emulation Demo */ + + /* + * RATOC REX-USB60F