diff options
Diffstat (limited to 'drivers/usb/serial/option.c')
-rw-r--r-- | drivers/usb/serial/option.c | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 575816e6ba37..98262dd552bb 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -206,6 +206,7 @@ static int option_resume(struct usb_serial *serial); | |||
206 | #define NOVATELWIRELESS_PRODUCT_MC950D 0x4400 | 206 | #define NOVATELWIRELESS_PRODUCT_MC950D 0x4400 |
207 | #define NOVATELWIRELESS_PRODUCT_U727 0x5010 | 207 | #define NOVATELWIRELESS_PRODUCT_U727 0x5010 |
208 | #define NOVATELWIRELESS_PRODUCT_MC760 0x6000 | 208 | #define NOVATELWIRELESS_PRODUCT_MC760 0x6000 |
209 | #define NOVATELWIRELESS_PRODUCT_OVMC760 0x6002 | ||
209 | 210 | ||
210 | /* FUTURE NOVATEL PRODUCTS */ | 211 | /* FUTURE NOVATEL PRODUCTS */ |
211 | #define NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED 0X6001 | 212 | #define NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED 0X6001 |
@@ -307,11 +308,20 @@ static int option_resume(struct usb_serial *serial); | |||
307 | #define DLINK_VENDOR_ID 0x1186 | 308 | #define DLINK_VENDOR_ID 0x1186 |
308 | #define DLINK_PRODUCT_DWM_652 0x3e04 | 309 | #define DLINK_PRODUCT_DWM_652 0x3e04 |
309 | 310 | ||
311 | #define QISDA_VENDOR_ID 0x1da5 | ||
312 | #define QISDA_PRODUCT_H21_4512 0x4512 | ||
313 | #define QISDA_PRODUCT_H21_4523 0x4523 | ||
314 | #define QISDA_PRODUCT_H20_4515 0x4515 | ||
315 | #define QISDA_PRODUCT_H20_4519 0x4519 | ||
316 | |||
310 | 317 | ||
311 | /* TOSHIBA PRODUCTS */ | 318 | /* TOSHIBA PRODUCTS */ |
312 | #define TOSHIBA_VENDOR_ID 0x0930 | 319 | #define TOSHIBA_VENDOR_ID 0x0930 |
313 | #define TOSHIBA_PRODUCT_HSDPA_MINICARD 0x1302 | 320 | #define TOSHIBA_PRODUCT_HSDPA_MINICARD 0x1302 |
314 | 321 | ||
322 | #define ALINK_VENDOR_ID 0x1e0e | ||
323 | #define ALINK_PRODUCT_3GU 0x9200 | ||
324 | |||
315 | static struct usb_device_id option_ids[] = { | 325 | static struct usb_device_id option_ids[] = { |
316 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, | 326 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
317 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, | 327 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, |
@@ -430,6 +440,7 @@ static struct usb_device_id option_ids[] = { | |||
430 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */ | 440 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */ |
431 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U727) }, /* Novatel MC727/U727/USB727 */ | 441 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U727) }, /* Novatel MC727/U727/USB727 */ |
432 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC760) }, /* Novatel MC760/U760/USB760 */ | 442 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC760) }, /* Novatel MC760/U760/USB760 */ |
443 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_OVMC760) }, /* Novatel Ovation MC760 */ | ||
433 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED) }, /* Novatel HSPA product */ | 444 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED) }, /* Novatel HSPA product */ |
434 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) }, /* Novatel EVDO Embedded product */ | 445 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) }, /* Novatel EVDO Embedded product */ |
435 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED) }, /* Novatel HSPA Embedded product */ | 446 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED) }, /* Novatel HSPA Embedded product */ |
@@ -529,8 +540,13 @@ static struct usb_device_id option_ids[] = { | |||
529 | { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) }, | 540 | { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) }, |
530 | { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, | 541 | { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, |
531 | { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, | 542 | { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, |
532 | { USB_DEVICE(0x1da5, 0x4515) }, /* BenQ H20 */ | 543 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, |
544 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, | ||
545 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, | ||
546 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4519) }, | ||
533 | { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */ | 547 | { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */ |
548 | { USB_DEVICE(ALINK_VENDOR_ID, 0x9000) }, | ||
549 | { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) }, | ||
534 | { } /* Terminating entry */ | 550 | { } /* Terminating entry */ |
535 | }; | 551 | }; |
536 | MODULE_DEVICE_TABLE(usb, option_ids); | 552 | MODULE_DEVICE_TABLE(usb, option_ids); |
@@ -732,7 +748,6 @@ static int option_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
732 | memcpy(this_urb->transfer_buffer, buf, todo); | 748 | memcpy(this_urb->transfer_buffer, buf, todo); |
733 | this_urb->transfer_buffer_length = todo; | 749 | this_urb->transfer_buffer_length = todo; |
734 | 750 | ||
735 | this_urb->dev = port->serial->dev; | ||
736 | err = usb_submit_urb(this_urb, GFP_ATOMIC); | 751 | err = usb_submit_urb(this_urb, GFP_ATOMIC); |
737 | if (err) { | 752 | if (err) { |
738 | dbg("usb_submit_urb %p (write bulk) failed " | 753 | dbg("usb_submit_urb %p (write bulk) failed " |
@@ -860,7 +875,6 @@ static void option_instat_callback(struct urb *urb) | |||
860 | 875 | ||
861 | /* Resubmit urb so we continue receiving IRQ data */ | 876 | /* Resubmit urb so we continue receiving IRQ data */ |
862 | if (status != -ESHUTDOWN && status != -ENOENT) { | 877 | if (status != -ESHUTDOWN && status != -ENOENT) { |
863 | urb->dev = serial->dev; | ||
864 | err = usb_submit_urb(urb, GFP_ATOMIC); | 878 | err = usb_submit_urb(urb, GFP_ATOMIC); |
865 | if (err) | 879 | if (err) |
866 | dbg("%s: resubmit intr urb failed. (%d)", | 880 | dbg("%s: resubmit intr urb failed. (%d)", |
@@ -921,23 +935,11 @@ static int option_open(struct tty_struct *tty, | |||
921 | 935 | ||
922 | dbg("%s", __func__); | 936 | dbg("%s", __func__); |
923 | 937 | ||
924 | /* Reset low level data toggle and start reading from endpoints */ | 938 | /* Start reading from the IN endpoint */ |
925 | for (i = 0; i < N_IN_URB; i++) { | 939 | for (i = 0; i < N_IN_URB; i++) { |
926 | urb = portdata->in_urbs[i]; | 940 | urb = portdata->in_urbs[i]; |
927 | if (!urb) | 941 | if (!urb) |
928 | continue; | 942 | continue; |
929 | if (urb->dev != serial->dev) { | ||
930 | dbg("%s: dev %p != %p", __func__, | ||
931 | urb->dev, serial->dev); | ||
932 | continue; | ||
933 | } | ||
934 | |||
935 | /* | ||
936 | * make sure endpoint data toggle is synchronized with the | ||
937 | * device | ||
938 | */ | ||
939 | usb_clear_halt(urb->dev, urb->pipe); | ||
940 | |||
941 | err = usb_submit_urb(urb, GFP_KERNEL); | 943 | err = usb_submit_urb(urb, GFP_KERNEL); |
942 | if (err) { | 944 | if (err) { |
943 | dbg("%s: submit urb %d failed (%d) %d", | 945 | dbg("%s: submit urb %d failed (%d) %d", |
@@ -946,16 +948,6 @@ static int option_open(struct tty_struct *tty, | |||
946 | } | 948 | } |
947 | } | 949 | } |
948 | 950 | ||
949 | /* Reset low level data toggle on out endpoints */ | ||
950 | for (i = 0; i < N_OUT_URB; i++) { | ||
951 | urb = portdata->out_urbs[i]; | ||
952 | if (!urb) | ||
953 | continue; | ||
954 | urb->dev = serial->dev; | ||
955 | /* usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), | ||
956 | usb_pipeout(urb->pipe), 0); */ | ||
957 | } | ||
958 | |||
959 | option_send_setup(port); | 951 | option_send_setup(port); |
960 | 952 | ||
961 | return 0; | 953 | return 0; |
@@ -1218,7 +1210,6 @@ static int option_resume(struct usb_serial *serial) | |||
1218 | dbg("%s: No interrupt URB for port %d\n", __func__, i); | 1210 | dbg("%s: No interrupt URB for port %d\n", __func__, i); |
1219 | continue; | 1211 | continue; |
1220 | } | 1212 | } |
1221 | port->interrupt_in_urb->dev = serial->dev; | ||
1222 | err = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO); | 1213 | err = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO); |
1223 | dbg("Submitted interrupt URB for port %d (result %d)", i, err); | 1214 | dbg("Submitted interrupt URB for port %d (result %d)", i, err); |
1224 | if (err < 0) { | 1215 | if (err < 0) { |