aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2014-08-07 10:00:13 -0400
committerJohan Hovold <johan@kernel.org>2014-08-18 07:09:25 -0400
commit63a901c06e3c2c45bd601916fe04e870e9ccae1e (patch)
tree2fe871e357421bb61e3c0bebd9c599d0cc9780b1
parentd77302739d900bbca5e901a3b7ac48c907ee6c93 (diff)
Revert "USB: option,zte_ev: move most ZTE CDMA devices to zte_ev"
This reverts commit 73228a0538a7 ("USB: option,zte_ev: move most ZTE CDMA devices to zte_ev"). Move the IDs of the devices that were previously driven by the option driver back to that driver. As several users have reported, the zte_ev driver is causing random disconnects as well as reconnect failures. A closer analysis of the zte_ev setup code reveals that it consists of standard CDC requests (SET/GET_LINE_CODING and SET_CONTROL_LINE_STATE) but unfortunately fails to get some of those right. In particular, as reported by Liu Lei, it fails to lower DTR/RTS on close. It also appears that the control requests lack the interface argument. Note that the zte_ev driver is based on code (once) distributed by ZTE that still appears to originally have been reverse-engineered and bolted onto the generic driver. Since line control is already handled properly by the option driver, and the SET/GET_LINE_CODING requests appears to be redundant (amounts to a SET 9600 8N1), this is a first step in ultimately removing the redundant zte_ev driver. Note that AC2726 had already been moved back to option, and that some IDs were in the device table of both drivers prior to the commit being reverted. Reported-by: Lei Liu <liu.lei78@zte.com.cn> Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org>
-rw-r--r--drivers/usb/serial/option.c24
-rw-r--r--drivers/usb/serial/zte_ev.c18
2 files changed, 21 insertions, 21 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 408aad1b1c98..54a8120897a6 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -275,8 +275,12 @@ static void option_instat_callback(struct urb *urb);
275#define ZTE_PRODUCT_MF622 0x0001 275#define ZTE_PRODUCT_MF622 0x0001
276#define ZTE_PRODUCT_MF628 0x0015 276#define ZTE_PRODUCT_MF628 0x0015
277#define ZTE_PRODUCT_MF626 0x0031 277#define ZTE_PRODUCT_MF626 0x0031
278#define ZTE_PRODUCT_MC2718 0xffe8
279#define ZTE_PRODUCT_AC2726 0xfff1 278#define ZTE_PRODUCT_AC2726 0xfff1
279#define ZTE_PRODUCT_CDMA_TECH 0xfffe
280#define ZTE_PRODUCT_AC8710T 0xffff
281#define ZTE_PRODUCT_MC2718 0xffe8
282#define ZTE_PRODUCT_AD3812 0xffeb
283#define ZTE_PRODUCT_MC2716 0xffed
280 284
281#define BENQ_VENDOR_ID 0x04a5 285#define BENQ_VENDOR_ID 0x04a5
282#define BENQ_PRODUCT_H10 0x4068 286#define BENQ_PRODUCT_H10 0x4068
@@ -531,10 +535,18 @@ static const struct option_blacklist_info zte_k3765_z_blacklist = {
531 .reserved = BIT(4), 535 .reserved = BIT(4),
532}; 536};
533 537
538static const struct option_blacklist_info zte_ad3812_z_blacklist = {
539 .sendsetup = BIT(0) | BIT(1) | BIT(2),
540};
541
534static const struct option_blacklist_info zte_mc2718_z_blacklist = { 542static const struct option_blacklist_info zte_mc2718_z_blacklist = {
535 .sendsetup = BIT(1) | BIT(2) | BIT(3) | BIT(4), 543 .sendsetup = BIT(1) | BIT(2) | BIT(3) | BIT(4),
536}; 544};
537 545
546static const struct option_blacklist_info zte_mc2716_z_blacklist = {
547 .sendsetup = BIT(1) | BIT(2) | BIT(3),
548};
549
538static const struct option_blacklist_info huawei_cdc12_blacklist = { 550static const struct option_blacklist_info huawei_cdc12_blacklist = {
539 .reserved = BIT(1) | BIT(2), 551 .reserved = BIT(1) | BIT(2),
540}; 552};
@@ -1074,6 +1086,7 @@ static const struct usb_device_id option_ids[] = {
1074 { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1012, 0xff) }, 1086 { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1012, 0xff) },
1075 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) }, 1087 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) },
1076 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, 1088 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
1089 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
1077 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ 1090 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
1078 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ 1091 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
1079 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ 1092 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
@@ -1548,13 +1561,18 @@ static const struct usb_device_id option_ids[] = {
1548 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff93, 0xff, 0xff, 0xff) }, 1561 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff93, 0xff, 0xff, 0xff) },
1549 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff94, 0xff, 0xff, 0xff) }, 1562 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff94, 0xff, 0xff, 0xff) },
1550 1563
1551 /* NOTE: most ZTE CDMA devices should be driven by zte_ev, not option */ 1564 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
1565 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },
1566 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) },
1552 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff), 1567 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff),
1553 .driver_info = (kernel_ulong_t)&zte_mc2718_z_blacklist }, 1568 .driver_info = (kernel_ulong_t)&zte_mc2718_z_blacklist },
1569 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AD3812, 0xff, 0xff, 0xff),
1570 .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist },
1571 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff),
1572 .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist },
1554 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) }, 1573 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) },
1555 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) }, 1574 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) },
1556 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) }, 1575 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },
1557 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },
1558 1576
1559 { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, 1577 { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) },
1560 { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, 1578 { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },
diff --git a/drivers/usb/serial/zte_ev.c b/drivers/usb/serial/zte_ev.c
index e40ab739c4a6..4ecff9cba286 100644
--- a/drivers/usb/serial/zte_ev.c
+++ b/drivers/usb/serial/zte_ev.c
@@ -272,27 +272,9 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port)
272} 272}
273 273
274static const struct usb_device_id id_table[] = { 274static const struct usb_device_id id_table[] = {
275 /* AC8710, AC8710T */
276 { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffff, 0xff, 0xff, 0xff) },
277 /* AC8700 */
278 { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xfffe, 0xff, 0xff, 0xff) },
279 /* MG880 */ 275 /* MG880 */
280 { USB_DEVICE(0x19d2, 0xfffd) }, 276 { USB_DEVICE(0x19d2, 0xfffd) },
281 { USB_DEVICE(0x19d2, 0xfffc) },
282 { USB_DEVICE(0x19d2, 0xfffb) },
283 /* AC8710_V3 */
284 { USB_DEVICE(0x19d2, 0xfff6) },
285 { USB_DEVICE(0x19d2, 0xfff7) },
286 { USB_DEVICE(0x19d2, 0xfff8) },
287 { USB_DEVICE(0x19d2, 0xfff9) },
288 { USB_DEVICE(0x19d2, 0xffee) },
289 /* AC2716, MC2716 */
290 { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffed, 0xff, 0xff, 0xff) },
291 /* AD3812 */
292 { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffeb, 0xff, 0xff, 0xff) },
293 { USB_DEVICE(0x19d2, 0xffec) },
294 { USB_DEVICE(0x05C6, 0x3197) }, 277 { USB_DEVICE(0x05C6, 0x3197) },
295 { USB_DEVICE(0x05C6, 0x6000) },
296 { USB_DEVICE(0x05C6, 0x9008) }, 278 { USB_DEVICE(0x05C6, 0x9008) },
297 { }, 279 { },
298}; 280};