aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-06-05 16:26:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-06 12:06:25 -0400
commit73228a0538a70ebc4547bd09dee8971360dc1d87 (patch)
tree475c7fd7a3158aa9b37f066ebc1c1bb6807c707a /drivers/usb/serial
parentb8a24e6281d37243c06b9497dcbfaa98c1e2ad35 (diff)
USB: option,zte_ev: move most ZTE CDMA devices to zte_ev
Per some ZTE Linux drivers I found for the AC2716, the following patch moves most ZTE CDMA devices from option to zte_ev. The blacklist stuff that option does is not required with zte_ev, because it doesn't implement any of the send_setup hooks which the blacklist suppressed. I did not move the 2718 over because I could not find any ZTE Linux drivers for that device, nor even any Windows drivers. Signed-off-by: Dan Williams <dcbw@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/option.c24
-rw-r--r--drivers/usb/serial/zte_ev.c24
2 files changed, 22 insertions, 26 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 66314c3b6d1a..bd4323ddae1a 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -250,13 +250,7 @@ static void option_instat_callback(struct urb *urb);
250#define ZTE_PRODUCT_MF622 0x0001 250#define ZTE_PRODUCT_MF622 0x0001
251#define ZTE_PRODUCT_MF628 0x0015 251#define ZTE_PRODUCT_MF628 0x0015
252#define ZTE_PRODUCT_MF626 0x0031 252#define ZTE_PRODUCT_MF626 0x0031
253#define ZTE_PRODUCT_CDMA_TECH 0xfffe
254#define ZTE_PRODUCT_AC8710 0xfff1
255#define ZTE_PRODUCT_AC2726 0xfff5
256#define ZTE_PRODUCT_AC8710T 0xffff
257#define ZTE_PRODUCT_MC2718 0xffe8 253#define ZTE_PRODUCT_MC2718 0xffe8
258#define ZTE_PRODUCT_AD3812 0xffeb
259#define ZTE_PRODUCT_MC2716 0xffed
260 254
261#define BENQ_VENDOR_ID 0x04a5 255#define BENQ_VENDOR_ID 0x04a5
262#define BENQ_PRODUCT_H10 0x4068 256#define BENQ_PRODUCT_H10 0x4068
@@ -495,18 +489,10 @@ static const struct option_blacklist_info zte_k3765_z_blacklist = {
495 .reserved = BIT(4), 489 .reserved = BIT(4),
496}; 490};
497 491
498static const struct option_blacklist_info zte_ad3812_z_blacklist = {
499 .sendsetup = BIT(0) | BIT(1) | BIT(2),
500};
501
502static const struct option_blacklist_info zte_mc2718_z_blacklist = { 492static const struct option_blacklist_info zte_mc2718_z_blacklist = {
503 .sendsetup = BIT(1) | BIT(2) | BIT(3) | BIT(4), 493 .sendsetup = BIT(1) | BIT(2) | BIT(3) | BIT(4),
504}; 494};
505 495
506static const struct option_blacklist_info zte_mc2716_z_blacklist = {
507 .sendsetup = BIT(1) | BIT(2) | BIT(3),
508};
509
510static const struct option_blacklist_info huawei_cdc12_blacklist = { 496static const struct option_blacklist_info huawei_cdc12_blacklist = {
511 .reserved = BIT(1) | BIT(2), 497 .reserved = BIT(1) | BIT(2),
512}; 498};
@@ -799,7 +785,6 @@ static const struct usb_device_id option_ids[] = {
799 { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1012, 0xff) }, 785 { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1012, 0xff) },
800 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) }, 786 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) },
801 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, 787 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
802 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
803 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ 788 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
804 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ 789 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
805 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */ 790 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */
@@ -1201,16 +1186,9 @@ static const struct usb_device_id option_ids[] = {
1201 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff), 1186 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff),
1202 .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, 1187 .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1203 1188
1204 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, 1189 /* NOTE: most ZTE CDMA devices should be driven by zte_ev, not option */
1205 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) },
1206 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },
1207 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) },
1208 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff), 1190 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff),
1209 .driver_info = (kernel_ulong_t)&zte_mc2718_z_blacklist }, 1191 .driver_info = (kernel_ulong_t)&zte_mc2718_z_blacklist },
1210 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AD3812, 0xff, 0xff, 0xff),
1211 .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist },
1212 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff),
1213 .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist },
1214 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) }, 1192 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) },
1215 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) }, 1193 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) },
1216 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) }, 1194 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },
diff --git a/drivers/usb/serial/zte_ev.c b/drivers/usb/serial/zte_ev.c
index 870e01e24481..fca4c752a4ed 100644
--- a/drivers/usb/serial/zte_ev.c
+++ b/drivers/usb/serial/zte_ev.c
@@ -273,11 +273,29 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port)
273} 273}
274 274
275static const struct usb_device_id id_table[] = { 275static const struct usb_device_id id_table[] = {
276 { USB_DEVICE(0x19d2, 0xffff) }, /* AC8700 */ 276 /* AC8710, AC8710T */
277 { USB_DEVICE(0x19d2, 0xfffe) }, 277 { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffff, 0xff, 0xff, 0xff) },
278 { USB_DEVICE(0x19d2, 0xfffd) }, /* MG880 */ 278 /* AC8700 */
279 { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xfffe, 0xff, 0xff, 0xff) },
280 /* MG880 */
281 { USB_DEVICE(0x19d2, 0xfffd) },
282 { USB_DEVICE(0x19d2, 0xfffc) },
283 { USB_DEVICE(0x19d2, 0xfffb) },
284 /* AC2726, AC8710_V3 */
285 { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xfff1, 0xff, 0xff, 0xff) },
286 { USB_DEVICE(0x19d2, 0xfff6) },
287 { USB_DEVICE(0x19d2, 0xfff7) },
288 { USB_DEVICE(0x19d2, 0xfff8) },
289 { USB_DEVICE(0x19d2, 0xfff9) },
290 { USB_DEVICE(0x19d2, 0xffee) },
291 /* AC2716, MC2716 */
292 { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffed, 0xff, 0xff, 0xff) },
293 /* AD3812 */
294 { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xffeb, 0xff, 0xff, 0xff) },
295 { USB_DEVICE(0x19d2, 0xffec) },
279 { USB_DEVICE(0x05C6, 0x3197) }, 296 { USB_DEVICE(0x05C6, 0x3197) },
280 { USB_DEVICE(0x05C6, 0x6000) }, 297 { USB_DEVICE(0x05C6, 0x6000) },
298 { USB_DEVICE(0x05C6, 0x9008) },
281 { }, 299 { },
282}; 300};
283MODULE_DEVICE_TABLE(usb, id_table); 301MODULE_DEVICE_TABLE(usb, id_table);