diff options
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/Kconfig | 7 | ||||
-rw-r--r-- | drivers/usb/serial/Makefile | 1 | ||||
-rw-r--r-- | drivers/usb/serial/cp210x.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 31 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio_ids.h | 34 | ||||
-rw-r--r-- | drivers/usb/serial/mos7840.c | 175 | ||||
-rw-r--r-- | drivers/usb/serial/option.c | 23 | ||||
-rw-r--r-- | drivers/usb/serial/suunto.c | 41 | ||||
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 2 |
9 files changed, 228 insertions, 90 deletions
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig index 8c3a42ea910c..7eef9b33fde6 100644 --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig | |||
@@ -719,6 +719,13 @@ config USB_SERIAL_FLASHLOADER | |||
719 | To compile this driver as a module, choose M here: the | 719 | To compile this driver as a module, choose M here: the |
720 | module will be called flashloader. | 720 | module will be called flashloader. |
721 | 721 | ||
722 | config USB_SERIAL_SUUNTO | ||
723 | tristate "USB Suunto ANT+ driver" | ||
724 | help | ||
725 | Say Y here if you want to use the Suunto ANT+ USB device. | ||
726 | |||
727 | To compile this driver as a module, choose M here: the | ||
728 | module will be called suunto. | ||
722 | 729 | ||
723 | config USB_SERIAL_DEBUG | 730 | config USB_SERIAL_DEBUG |
724 | tristate "USB Debugging Device" | 731 | tristate "USB Debugging Device" |
diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile index f7130114488f..a14a870d993f 100644 --- a/drivers/usb/serial/Makefile +++ b/drivers/usb/serial/Makefile | |||
@@ -54,6 +54,7 @@ obj-$(CONFIG_USB_SERIAL_SIEMENS_MPI) += siemens_mpi.o | |||
54 | obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS) += sierra.o | 54 | obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS) += sierra.o |
55 | obj-$(CONFIG_USB_SERIAL_SPCP8X5) += spcp8x5.o | 55 | obj-$(CONFIG_USB_SERIAL_SPCP8X5) += spcp8x5.o |
56 | obj-$(CONFIG_USB_SERIAL_SSU100) += ssu100.o | 56 | obj-$(CONFIG_USB_SERIAL_SSU100) += ssu100.o |
57 | obj-$(CONFIG_USB_SERIAL_SUUNTO) += suunto.o | ||
57 | obj-$(CONFIG_USB_SERIAL_SYMBOL) += symbolserial.o | 58 | obj-$(CONFIG_USB_SERIAL_SYMBOL) += symbolserial.o |
58 | obj-$(CONFIG_USB_SERIAL_WWAN) += usb_wwan.o | 59 | obj-$(CONFIG_USB_SERIAL_WWAN) += usb_wwan.o |
59 | obj-$(CONFIG_USB_SERIAL_TI) += ti_usb_3410_5052.o | 60 | obj-$(CONFIG_USB_SERIAL_TI) += ti_usb_3410_5052.o |
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index d6ef2f8da37d..0eae4ba3760e 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -53,6 +53,7 @@ static const struct usb_device_id id_table[] = { | |||
53 | { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ | 53 | { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ |
54 | { USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ | 54 | { USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ |
55 | { USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */ | 55 | { USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */ |
56 | { USB_DEVICE(0x0846, 0x1100) }, /* NetGear Managed Switch M4100 series, M5300 series, M7100 series */ | ||
56 | { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */ | 57 | { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */ |
57 | { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */ | 58 | { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */ |
58 | { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */ | 59 | { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */ |
@@ -118,6 +119,8 @@ static const struct usb_device_id id_table[] = { | |||
118 | { USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */ | 119 | { USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */ |
119 | { USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */ | 120 | { USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */ |
120 | { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */ | 121 | { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */ |
122 | { USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */ | ||
123 | { USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */ | ||
121 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ | 124 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ |
122 | { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ | 125 | { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ |
123 | { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */ | 126 | { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */ |
@@ -148,6 +151,7 @@ static const struct usb_device_id id_table[] = { | |||
148 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ | 151 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ |
149 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ | 152 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ |
150 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ | 153 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ |
154 | { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ | ||
151 | { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ | 155 | { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ |
152 | { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ | 156 | { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ |
153 | { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */ | 157 | { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */ |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 7260ec660347..b65e657c641d 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -735,9 +735,34 @@ static struct usb_device_id id_table_combined [] = { | |||
735 | { USB_DEVICE(FTDI_VID, FTDI_NDI_AURORA_SCU_PID), | 735 | { USB_DEVICE(FTDI_VID, FTDI_NDI_AURORA_SCU_PID), |
736 | .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, | 736 | .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, |
737 | { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, | 737 | { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, |
738 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) }, | 738 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_S03_PID) }, |
739 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_CT29B_PID) }, | 739 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_59_PID) }, |
740 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_RTS01_PID) }, | 740 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_57A_PID) }, |
741 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_57B_PID) }, | ||
742 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_29A_PID) }, | ||
743 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_29B_PID) }, | ||
744 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_29F_PID) }, | ||
745 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_62B_PID) }, | ||
746 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_S01_PID) }, | ||
747 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_63_PID) }, | ||
748 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_29C_PID) }, | ||
749 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_81B_PID) }, | ||
750 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_82B_PID) }, | ||
751 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_K5D_PID) }, | ||
752 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_K4Y_PID) }, | ||
753 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_K5G_PID) }, | ||
754 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_S05_PID) }, | ||
755 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_60_PID) }, | ||
756 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_61_PID) }, | ||
757 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_62_PID) }, | ||
758 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_63B_PID) }, | ||
759 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_64_PID) }, | ||
760 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_65_PID) }, | ||
761 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_92_PID) }, | ||
762 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_92D_PID) }, | ||
763 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_W5R_PID) }, | ||
764 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_A5R_PID) }, | ||
765 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_PW1_PID) }, | ||
741 | { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, | 766 | { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, |
742 | { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, | 767 | { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, |
743 | { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, | 768 | { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, |
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index 6dd79253205d..1b8af461b522 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h | |||
@@ -815,11 +815,35 @@ | |||
815 | /* | 815 | /* |
816 | * RT Systems programming cables for various ham radios | 816 | * RT Systems programming cables for various ham radios |
817 | */ | 817 | */ |
818 | #define RTSYSTEMS_VID 0x2100 /* Vendor ID */ | 818 | #define RTSYSTEMS_VID 0x2100 /* Vendor ID */ |
819 | #define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */ | 819 | #define RTSYSTEMS_USB_S03_PID 0x9001 /* RTS-03 USB to Serial Adapter */ |
820 | #define RTSYSTEMS_CT29B_PID 0x9e54 /* CT29B Radio Cable */ | 820 | #define RTSYSTEMS_USB_59_PID 0x9e50 /* USB-59 USB to 8 pin plug */ |
821 | #define RTSYSTEMS_RTS01_PID 0x9e57 /* USB-RTS01 Radio Cable */ | 821 | #define RTSYSTEMS_USB_57A_PID 0x9e51 /* USB-57A USB to 4pin 3.5mm plug */ |
822 | 822 | #define RTSYSTEMS_USB_57B_PID 0x9e52 /* USB-57B USB to extended 4pin 3.5mm plug */ | |
823 | #define RTSYSTEMS_USB_29A_PID 0x9e53 /* USB-29A USB to 3.5mm stereo plug */ | ||
824 | #define RTSYSTEMS_USB_29B_PID 0x9e54 /* USB-29B USB to 6 pin mini din */ | ||
825 | #define RTSYSTEMS_USB_29F_PID 0x9e55 /* USB-29F USB to 6 pin modular plug */ | ||
826 | #define RTSYSTEMS_USB_62B_PID 0x9e56 /* USB-62B USB to 8 pin mini din plug*/ | ||
827 | #define RTSYSTEMS_USB_S01_PID 0x9e57 /* USB-RTS01 USB to 3.5 mm stereo plug*/ | ||
828 | #define RTSYSTEMS_USB_63_PID 0x9e58 /* USB-63 USB to 9 pin female*/ | ||
829 | #define RTSYSTEMS_USB_29C_PID 0x9e59 /* USB-29C USB to 4 pin modular plug*/ | ||
830 | #define RTSYSTEMS_USB_81B_PID 0x9e5A /* USB-81 USB to 8 pin mini din plug*/ | ||
831 | #define RTSYSTEMS_USB_82B_PID 0x9e5B /* USB-82 USB to 2.5 mm stereo plug*/ | ||
832 | #define RTSYSTEMS_USB_K5D_PID 0x9e5C /* USB-K5D USB to 8 pin modular plug*/ | ||
833 | #define RTSYSTEMS_USB_K4Y_PID 0x9e5D /* USB-K4Y USB to 2.5/3.5 mm plugs*/ | ||
834 | #define RTSYSTEMS_USB_K5G_PID 0x9e5E /* USB-K5G USB to 8 pin modular plug*/ | ||
835 | #define RTSYSTEMS_USB_S05_PID 0x9e5F /* USB-RTS05 USB to 2.5 mm stereo plug*/ | ||
836 | #define RTSYSTEMS_USB_60_PID 0x9e60 /* USB-60 USB to 6 pin din*/ | ||
837 | #define RTSYSTEMS_USB_61_PID 0x9e61 /* USB-61 USB to 6 pin mini din*/ | ||
838 | #define RTSYSTEMS_USB_62_PID 0x9e62 /* USB-62 USB to 8 pin mini din*/ | ||
839 | #define RTSYSTEMS_USB_63B_PID 0x9e63 /* USB-63 USB to 9 pin female*/ | ||
840 | #define RTSYSTEMS_USB_64_PID 0x9e64 /* USB-64 USB to 9 pin male*/ | ||
841 | #define RTSYSTEMS_USB_65_PID 0x9e65 /* USB-65 USB to 9 pin female null modem*/ | ||
842 | #define RTSYSTEMS_USB_92_PID 0x9e66 /* USB-92 USB to 12 pin plug*/ | ||
843 | #define RTSYSTEMS_USB_92D_PID 0x9e67 /* USB-92D USB to 12 pin plug data*/ | ||
844 | #define RTSYSTEMS_USB_W5R_PID 0x9e68 /* USB-W5R USB to 8 pin modular plug*/ | ||
845 | #define RTSYSTEMS_USB_A5R_PID 0x9e69 /* USB-A5R USB to 8 pin modular plug*/ | ||
846 | #define RTSYSTEMS_USB_PW1_PID 0x9e6A /* USB-PW1 USB to 8 pin modular plug*/ | ||
823 | 847 | ||
824 | /* | 848 | /* |
825 | * Physik Instrumente | 849 | * Physik Instrumente |
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 0a818b238508..d953d674f222 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
@@ -183,7 +183,10 @@ | |||
183 | #define LED_ON_MS 500 | 183 | #define LED_ON_MS 500 |
184 | #define LED_OFF_MS 500 | 184 | #define LED_OFF_MS 500 |
185 | 185 | ||
186 | static int device_type; | 186 | enum mos7840_flag { |
187 | MOS7840_FLAG_CTRL_BUSY, | ||
188 | MOS7840_FLAG_LED_BUSY, | ||
189 | }; | ||
187 | 190 | ||
188 | static const struct usb_device_id id_table[] = { | 191 | static const struct usb_device_id id_table[] = { |
189 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, | 192 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, |
@@ -238,9 +241,12 @@ struct moschip_port { | |||
238 | 241 | ||
239 | /* For device(s) with LED indicator */ | 242 | /* For device(s) with LED indicator */ |
240 | bool has_led; | 243 | bool has_led; |
241 | bool led_flag; | ||
242 | struct timer_list led_timer1; /* Timer for LED on */ | 244 | struct timer_list led_timer1; /* Timer for LED on */ |
243 | struct timer_list led_timer2; /* Timer for LED off */ | 245 | struct timer_list led_timer2; /* Timer for LED off */ |
246 | struct urb *led_urb; | ||
247 | struct usb_ctrlrequest *led_dr; | ||
248 | |||
249 | unsigned long flags; | ||
244 | }; | 250 | }; |
245 | 251 | ||
246 | /* | 252 | /* |
@@ -460,10 +466,10 @@ static void mos7840_control_callback(struct urb *urb) | |||
460 | case -ESHUTDOWN: | 466 | case -ESHUTDOWN: |
461 | /* this urb is terminated, clean up */ | 467 | /* this urb is terminated, clean up */ |
462 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", __func__, status); | 468 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", __func__, status); |
463 | return; | 469 | goto out; |
464 | default: | 470 | default: |
465 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", __func__, status); | 471 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", __func__, status); |
466 | return; | 472 | goto out; |
467 | } | 473 | } |
468 | 474 | ||
469 | dev_dbg(dev, "%s urb buffer size is %d\n", __func__, urb->actual_length); | 475 | dev_dbg(dev, "%s urb buffer size is %d\n", __func__, urb->actual_length); |
@@ -476,6 +482,8 @@ static void mos7840_control_callback(struct urb *urb) | |||
476 | mos7840_handle_new_msr(mos7840_port, regval); | 482 | mos7840_handle_new_msr(mos7840_port, regval); |
477 | else if (mos7840_port->MsrLsr == 1) | 483 | else if (mos7840_port->MsrLsr == 1) |
478 | mos7840_handle_new_lsr(mos7840_port, regval); | 484 | mos7840_handle_new_lsr(mos7840_port, regval); |
485 | out: | ||
486 | clear_bit_unlock(MOS7840_FLAG_CTRL_BUSY, &mos7840_port->flags); | ||
479 | } | 487 | } |
480 | 488 | ||
481 | static int mos7840_get_reg(struct moschip_port *mcs, __u16 Wval, __u16 reg, | 489 | static int mos7840_get_reg(struct moschip_port *mcs, __u16 Wval, __u16 reg, |
@@ -486,6 +494,9 @@ static int mos7840_get_reg(struct moschip_port *mcs, __u16 Wval, __u16 reg, | |||
486 | unsigned char *buffer = mcs->ctrl_buf; | 494 | unsigned char *buffer = mcs->ctrl_buf; |
487 | int ret; | 495 | int ret; |
488 | 496 | ||
497 | if (test_and_set_bit_lock(MOS7840_FLAG_CTRL_BUSY, &mcs->flags)) | ||
498 | return -EBUSY; | ||
499 | |||
489 | dr->bRequestType = MCS_RD_RTYPE; | 500 | dr->bRequestType = MCS_RD_RTYPE; |
490 | dr->bRequest = MCS_RDREQ; | 501 | dr->bRequest = MCS_RDREQ; |
491 | dr->wValue = cpu_to_le16(Wval); /* 0 */ | 502 | dr->wValue = cpu_to_le16(Wval); /* 0 */ |
@@ -497,6 +508,9 @@ static int mos7840_get_reg(struct moschip_port *mcs, __u16 Wval, __u16 reg, | |||
497 | mos7840_control_callback, mcs); | 508 | mos7840_control_callback, mcs); |
498 | mcs->control_urb->transfer_buffer_length = 2; | 509 | mcs->control_urb->transfer_buffer_length = 2; |
499 | ret = usb_submit_urb(mcs->control_urb, GFP_ATOMIC); | 510 | ret = usb_submit_urb(mcs->control_urb, GFP_ATOMIC); |
511 | if (ret) | ||
512 | clear_bit_unlock(MOS7840_FLAG_CTRL_BUSY, &mcs->flags); | ||
513 | |||
500 | return ret; | 514 | return ret; |
501 | } | 515 | } |
502 | 516 | ||
@@ -523,7 +537,7 @@ static void mos7840_set_led_async(struct moschip_port *mcs, __u16 wval, | |||
523 | __u16 reg) | 537 | __u16 reg) |
524 | { | 538 | { |
525 | struct usb_device *dev = mcs->port->serial->dev; | 539 | struct usb_device *dev = mcs->port->serial->dev; |
526 | struct usb_ctrlrequest *dr = mcs->dr; | 540 | struct usb_ctrlrequest *dr = mcs->led_dr; |
527 | 541 | ||
528 | dr->bRequestType = MCS_WR_RTYPE; | 542 | dr->bRequestType = MCS_WR_RTYPE; |
529 | dr->bRequest = MCS_WRREQ; | 543 | dr->bRequest = MCS_WRREQ; |
@@ -531,10 +545,10 @@ static void mos7840_set_led_async(struct moschip_port *mcs, __u16 wval, | |||
531 | dr->wIndex = cpu_to_le16(reg); | 545 | dr->wIndex = cpu_to_le16(reg); |
532 | dr->wLength = cpu_to_le16(0); | 546 | dr->wLength = cpu_to_le16(0); |
533 | 547 | ||
534 | usb_fill_control_urb(mcs->control_urb, dev, usb_sndctrlpipe(dev, 0), | 548 | usb_fill_control_urb(mcs->led_urb, dev, usb_sndctrlpipe(dev, 0), |
535 | (unsigned char *)dr, NULL, 0, mos7840_set_led_callback, NULL); | 549 | (unsigned char *)dr, NULL, 0, mos7840_set_led_callback, NULL); |
536 | 550 | ||
537 | usb_submit_urb(mcs->control_urb, GFP_ATOMIC); | 551 | usb_submit_urb(mcs->led_urb, GFP_ATOMIC); |
538 | } | 552 | } |
539 | 553 | ||
540 | static void mos7840_set_led_sync(struct usb_serial_port *port, __u16 reg, | 554 | static void mos7840_set_led_sync(struct usb_serial_port *port, __u16 reg, |
@@ -560,7 +574,19 @@ static void mos7840_led_flag_off(unsigned long arg) | |||
560 | { | 574 | { |
561 | struct moschip_port *mcs = (struct moschip_port *) arg; | 575 | struct moschip_port *mcs = (struct moschip_port *) arg; |
562 | 576 | ||
563 | mcs->led_flag = false; | 577 | clear_bit_unlock(MOS7840_FLAG_LED_BUSY, &mcs->flags); |
578 | } | ||
579 | |||
580 | static void mos7840_led_activity(struct usb_serial_port *port) | ||
581 | { | ||
582 | struct moschip_port *mos7840_port = usb_get_serial_port_data(port); | ||
583 | |||
584 | if (test_and_set_bit_lock(MOS7840_FLAG_LED_BUSY, &mos7840_port->flags)) | ||
585 | return; | ||
586 | |||
587 | mos7840_set_led_async(mos7840_port, 0x0301, MODEM_CONTROL_REGISTER); | ||
588 | mod_timer(&mos7840_port->led_timer1, | ||
589 | jiffies + msecs_to_jiffies(LED_ON_MS)); | ||
564 | } | 590 | } |
565 | 591 | ||
566 | /***************************************************************************** | 592 | /***************************************************************************** |
@@ -758,14 +784,8 @@ static void mos7840_bulk_in_callback(struct urb *urb) | |||
758 | return; | 784 | return; |
759 | } | 785 | } |
760 | 786 | ||
761 | /* Turn on LED */ | 787 | if (mos7840_port->has_led) |
762 | if (mos7840_port->has_led && !mos7840_port->led_flag) { | 788 | mos7840_led_activity(port); |
763 | mos7840_port->led_flag = true; | ||
764 | mos7840_set_led_async(mos7840_port, 0x0301, | ||
765 | MODEM_CONTROL_REGISTER); | ||
766 | mod_timer(&mos7840_port->led_timer1, | ||
767 | jiffies + msecs_to_jiffies(LED_ON_MS)); | ||
768 | } | ||
769 | 789 | ||
770 | mos7840_port->read_urb_busy = true; | 790 | mos7840_port->read_urb_busy = true; |
771 | retval = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC); | 791 | retval = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC); |
@@ -816,18 +836,6 @@ static void mos7840_bulk_out_data_callback(struct urb *urb) | |||
816 | /************************************************************************/ | 836 | /************************************************************************/ |
817 | /* D R I V E R T T Y I N T E R F A C E F U N C T I O N S */ | 837 | /* D R I V E R T T Y I N T E R F A C E F U N C T I O N S */ |
818 | /************************************************************************/ | 838 | /************************************************************************/ |
819 | #ifdef MCSSerialProbe | ||
820 | static int mos7840_serial_probe(struct usb_serial *serial, | ||
821 | const struct usb_device_id *id) | ||
822 | { | ||
823 | |||
824 | /*need to implement the mode_reg reading and updating\ | ||
825 | structures usb_serial_ device_type\ | ||
826 | (i.e num_ports, num_bulkin,bulkout etc) */ | ||
827 | /* Also we can update the changes attach */ | ||
828 | return 1; | ||
829 | } | ||
830 | #endif | ||
831 | 839 | ||
832 | /***************************************************************************** | 840 | /***************************************************************************** |
833 | * mos7840_open | 841 | * mos7840_open |
@@ -905,20 +913,20 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
905 | status = mos7840_get_reg_sync(port, mos7840_port->SpRegOffset, &Data); | 913 | status = mos7840_get_reg_sync(port, mos7840_port->SpRegOffset, &Data); |
906 | if (status < 0) { | 914 | if (status < 0) { |
907 | dev_dbg(&port->dev, "Reading Spreg failed\n"); | 915 | dev_dbg(&port->dev, "Reading Spreg failed\n"); |
908 | return -1; | 916 | goto err; |
909 | } | 917 | } |
910 | Data |= 0x80; | 918 | Data |= 0x80; |
911 | status = mos7840_set_reg_sync(port, mos7840_port->SpRegOffset, Data); | 919 | status = mos7840_set_reg_sync(port, mos7840_port->SpRegOffset, Data); |
912 | if (status < 0) { | 920 | if (status < 0) { |
913 | dev_dbg(&port->dev, "writing Spreg failed\n"); | 921 | dev_dbg(&port->dev, "writing Spreg failed\n"); |
914 | return -1; | 922 | goto err; |
915 | } | 923 | } |
916 | 924 | ||
917 | Data &= ~0x80; | 925 | Data &= ~0x80; |
918 | status = mos7840_set_reg_sync(port, mos7840_port->SpRegOffset, Data); | 926 | status = mos7840_set_reg_sync(port, mos7840_port->SpRegOffset, Data); |
919 | if (status < 0) { | 927 | if (status < 0) { |
920 | dev_dbg(&port->dev, "writing Spreg failed\n"); | 928 | dev_dbg(&port->dev, "writing Spreg failed\n"); |
921 | return -1; | 929 | goto err; |
922 | } | 930 | } |
923 | /* End of block to be checked */ | 931 | /* End of block to be checked */ |
924 | 932 | ||
@@ -927,7 +935,7 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
927 | &Data); | 935 | &Data); |
928 | if (status < 0) { | 936 | if (status < 0) { |
929 | dev_dbg(&port->dev, "Reading Controlreg failed\n"); | 937 | dev_dbg(&port->dev, "Reading Controlreg failed\n"); |
930 | return -1; | 938 | goto err; |
931 | } | 939 | } |
932 | Data |= 0x08; /* Driver done bit */ | 940 | Data |= 0x08; /* Driver done bit */ |
933 | Data |= 0x20; /* rx_disable */ | 941 | Data |= 0x20; /* rx_disable */ |
@@ -935,7 +943,7 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
935 | mos7840_port->ControlRegOffset, Data); | 943 | mos7840_port->ControlRegOffset, Data); |
936 | if (status < 0) { | 944 | if (status < 0) { |
937 | dev_dbg(&port->dev, "writing Controlreg failed\n"); | 945 | dev_dbg(&port->dev, "writing Controlreg failed\n"); |
938 | return -1; | 946 | goto err; |
939 | } | 947 | } |
940 | /* do register settings here */ | 948 | /* do register settings here */ |
941 | /* Set all regs to the device default values. */ | 949 | /* Set all regs to the device default values. */ |
@@ -946,21 +954,21 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
946 | status = mos7840_set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data); | 954 | status = mos7840_set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data); |
947 | if (status < 0) { | 955 | if (status < 0) { |
948 | dev_dbg(&port->dev, "disabling interrupts failed\n"); | 956 | dev_dbg(&port->dev, "disabling interrupts failed\n"); |
949 | return -1; | 957 | goto err; |
950 | } | 958 | } |
951 | /* Set FIFO_CONTROL_REGISTER to the default value */ | 959 | /* Set FIFO_CONTROL_REGISTER to the default value */ |
952 | Data = 0x00; | 960 | Data = 0x00; |
953 | status = mos7840_set_uart_reg(port, FIFO_CONTROL_REGISTER, Data); | 961 | status = mos7840_set_uart_reg(port, FIFO_CONTROL_REGISTER, Data); |
954 | if (status < 0) { | 962 | if (status < 0) { |
955 | dev_dbg(&port->dev, "Writing FIFO_CONTROL_REGISTER failed\n"); | 963 | dev_dbg(&port->dev, "Writing FIFO_CONTROL_REGISTER failed\n"); |
956 | return -1; | 964 | goto err; |
957 | } | 965 | } |
958 | 966 | ||
959 | Data = 0xcf; | 967 | Data = 0xcf; |
960 | status = mos7840_set_uart_reg(port, FIFO_CONTROL_REGISTER, Data); | 968 | status = mos7840_set_uart_reg(port, FIFO_CONTROL_REGISTER, Data); |
961 | if (status < 0) { | 969 | if (status < 0) { |
962 | dev_dbg(&port->dev, "Writing FIFO_CONTROL_REGISTER failed\n"); | 970 | dev_dbg(&port->dev, "Writing FIFO_CONTROL_REGISTER failed\n"); |
963 | return -1; | 971 | goto err; |
964 | } | 972 | } |
965 | 973 | ||
966 | Data = 0x03; | 974 | Data = 0x03; |
@@ -1103,6 +1111,15 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
1103 | /* mos7840_change_port_settings(mos7840_port,old_termios); */ | 1111 | /* mos7840_change_port_settings(mos7840_port,old_termios); */ |
1104 | 1112 | ||
1105 | return 0; | 1113 | return 0; |
1114 | err: | ||
1115 | for (j = 0; j < NUM_URBS; ++j) { | ||
1116 | urb = mos7840_port->write_urb_pool[j]; | ||
1117 | if (!urb) | ||
1118 | continue; | ||
1119 | kfree(urb->transfer_buffer); | ||
1120 | usb_free_urb(urb); | ||
1121 | } | ||
1122 | return status; | ||
1106 | } | 1123 | } |
1107 | 1124 | ||
1108 | /***************************************************************************** | 1125 | /***************************************************************************** |
@@ -1445,13 +1462,8 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
1445 | data1 = urb->transfer_buffer; | 1462 | data1 = urb->transfer_buffer; |
1446 | dev_dbg(&port->dev, "bulkout endpoint is %d\n", port->bulk_out_endpointAddress); | 1463 | dev_dbg(&port->dev, "bulkout endpoint is %d\n", port->bulk_out_endpointAddress); |
1447 | 1464 | ||
1448 | /* Turn on LED */ | 1465 | if (mos7840_port->has_led) |
1449 | if (mos7840_port->has_led && !mos7840_port->led_flag) { | 1466 | mos7840_led_activity(port); |
1450 | mos7840_port->led_flag = true; | ||
1451 | mos7840_set_led_sync(port, MODEM_CONTROL_REGISTER, 0x0301); | ||
1452 | mod_timer(&mos7840_port->led_timer1, | ||
1453 | jiffies + msecs_to_jiffies(LED_ON_MS)); | ||
1454 | } | ||
1455 | 1467 | ||
1456 | /* send it down the pipe */ | 1468 | /* send it down the pipe */ |
1457 | status = usb_submit_urb(urb, GFP_ATOMIC); | 1469 | status = usb_submit_urb(urb, GFP_ATOMIC); |
@@ -2178,38 +2190,48 @@ static int mos7810_check(struct usb_serial *serial) | |||
2178 | return 0; | 2190 | return 0; |
2179 | } | 2191 | } |
2180 | 2192 | ||
2181 | static int mos7840_calc_num_ports(struct usb_serial *serial) | 2193 | static int mos7840_probe(struct usb_serial *serial, |
2194 | const struct usb_device_id *id) | ||
2182 | { | 2195 | { |
2183 | __u16 data = 0x00; | 2196 | u16 product = serial->dev->descriptor.idProduct; |
2184 | u8 *buf; | 2197 | u8 *buf; |
2185 | int mos7840_num_ports; | 2198 | int device_type; |
2199 | |||
2200 | if (product == MOSCHIP_DEVICE_ID_7810 || | ||
2201 | product == MOSCHIP_DEVICE_ID_7820) { | ||
2202 | device_type = product; | ||
2203 | goto out; | ||
2204 | } | ||
2186 | 2205 | ||
2187 | buf = kzalloc(VENDOR_READ_LENGTH, GFP_KERNEL); | 2206 | buf = kzalloc(VENDOR_READ_LENGTH, GFP_KERNEL); |
2188 | if (buf) { | 2207 | if (!buf) |
2189 | usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), | 2208 | return -ENOMEM; |
2209 | |||
2210 | usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), | ||
2190 | MCS_RDREQ, MCS_RD_RTYPE, 0, GPIO_REGISTER, buf, | 2211 | MCS_RDREQ, MCS_RD_RTYPE, 0, GPIO_REGISTER, buf, |
2191 | VENDOR_READ_LENGTH, MOS_WDR_TIMEOUT); | 2212 | VENDOR_READ_LENGTH, MOS_WDR_TIMEOUT); |
2192 | data = *buf; | ||
2193 | kfree(buf); | ||
2194 | } | ||
2195 | 2213 | ||
2196 | if (serial->dev->descriptor.idProduct == MOSCHIP_DEVICE_ID_7810 || | 2214 | /* For a MCS7840 device GPIO0 must be set to 1 */ |
2197 | serial->dev->descriptor.idProduct == MOSCHIP_DEVICE_ID_7820) { | 2215 | if (buf[0] & 0x01) |
2198 | device_type = serial->dev->descriptor.idProduct; | 2216 | device_type = MOSCHIP_DEVICE_ID_7840; |
2199 | } else { | 2217 | else if (mos7810_check(serial)) |
2200 | /* For a MCS7840 device GPIO0 must be set to 1 */ | 2218 | device_type = MOSCHIP_DEVICE_ID_7810; |
2201 | if ((data & 0x01) == 1) | 2219 | else |
2202 | device_type = MOSCHIP_DEVICE_ID_7840; | 2220 | device_type = MOSCHIP_DEVICE_ID_7820; |
2203 | else if (mos7810_check(serial)) | 2221 | |
2204 | device_type = MOSCHIP_DEVICE_ID_7810; | 2222 | kfree(buf); |
2205 | else | 2223 | out: |
2206 | device_type = MOSCHIP_DEVICE_ID_7820; | 2224 | usb_set_serial_data(serial, (void *)(unsigned long)device_type); |
2207 | } | 2225 | |
2226 | return 0; | ||
2227 | } | ||
2228 | |||
2229 | static int mos7840_calc_num_ports(struct usb_serial *serial) | ||
2230 | { | ||
2231 | int device_type = (unsigned long)usb_get_serial_data(serial); | ||
2232 | int mos7840_num_ports; | ||
2208 | 2233 | ||
2209 | mos7840_num_ports = (device_type >> 4) & 0x000F; | 2234 | mos7840_num_ports = (device_type >> 4) & 0x000F; |
2210 | serial->num_bulk_in = mos7840_num_ports; | ||
2211 | serial->num_bulk_out = mos7840_num_ports; | ||
2212 | serial->num_ports = mos7840_num_ports; | ||
2213 | 2235 | ||
2214 | return mos7840_num_ports; | 2236 | return mos7840_num_ports; |
2215 | } | 2237 | } |
@@ -2217,6 +2239,7 @@ static int mos7840_calc_num_ports(struct usb_serial *serial) | |||
2217 | static int mos7840_port_probe(struct usb_serial_port *port) | 2239 | static int mos7840_port_probe(struct usb_serial_port *port) |
2218 | { | 2240 | { |
2219 | struct usb_serial *serial = port->serial; | 2241 | struct usb_serial *serial = port->serial; |
2242 | int device_type = (unsigned long)usb_get_serial_data(serial); | ||
2220 | struct moschip_port *mos7840_port; | 2243 | struct moschip_port *mos7840_port; |
2221 | int status; | 2244 | int status; |
2222 | int pnum; | 2245 | int pnum; |
@@ -2392,6 +2415,14 @@ static int mos7840_port_probe(struct usb_serial_port *port) | |||
2392 | if (device_type == MOSCHIP_DEVICE_ID_7810) { | 2415 | if (device_type == MOSCHIP_DEVICE_ID_7810) { |
2393 | mos7840_port->has_led = true; | 2416 | mos7840_port->has_led = true; |
2394 | 2417 | ||
2418 | mos7840_port->led_urb = usb_alloc_urb(0, GFP_KERNEL); | ||
2419 | mos7840_port->led_dr = kmalloc(sizeof(*mos7840_port->led_dr), | ||
2420 | GFP_KERNEL); | ||
2421 | if (!mos7840_port->led_urb || !mos7840_port->led_dr) { | ||
2422 | status = -ENOMEM; | ||
2423 | goto error; | ||
2424 | } | ||
2425 | |||
2395 | init_timer(&mos7840_port->led_timer1); | 2426 | init_timer(&mos7840_port->led_timer1); |
2396 | mos7840_port->led_timer1.function = mos7840_led_off; | 2427 | mos7840_port->led_timer1.function = mos7840_led_off; |
2397 | mos7840_port->led_timer1.expires = | 2428 | mos7840_port->led_timer1.expires = |
@@ -2404,8 +2435,6 @@ static int mos7840_port_probe(struct usb_serial_port *port) | |||
2404 | jiffies + msecs_to_jiffies(LED_OFF_MS); | 2435 | jiffies + msecs_to_jiffies(LED_OFF_MS); |
2405 | mos7840_port->led_timer2.data = (unsigned long)mos7840_port; | 2436 | mos7840_port->led_timer2.data = (unsigned long)mos7840_port; |
2406 | 2437 | ||
2407 | mos7840_port->led_flag = false; | ||
2408 | |||
2409 | /* Turn off LED */ | 2438 | /* Turn off LED */ |
2410 | mos7840_set_led_sync(port, MODEM_CONTROL_REGISTER, 0x0300); | 2439 | mos7840_set_led_sync(port, MODEM_CONTROL_REGISTER, 0x0300); |
2411 | } | 2440 | } |
@@ -2427,6 +2456,8 @@ out: | |||
2427 | } | 2456 | } |
2428 | return 0; | 2457 | return 0; |
2429 | error: | 2458 | error: |
2459 | kfree(mos7840_port->led_dr); | ||
2460 | usb_free_urb(mos7840_port->led_urb); | ||
2430 | kfree(mos7840_port->dr); | 2461 | kfree(mos7840_port->dr); |
2431 | kfree(mos7840_port->ctrl_buf); | 2462 | kfree(mos7840_port->ctrl_buf); |
2432 | usb_free_urb(mos7840_port->control_urb); | 2463 | usb_free_urb(mos7840_port->control_urb); |
@@ -2447,6 +2478,10 @@ static int mos7840_port_remove(struct usb_serial_port *port) | |||
2447 | 2478 | ||
2448 | del_timer_sync(&mos7840_port->led_timer1); | 2479 | del_timer_sync(&mos7840_port->led_timer1); |
2449 | del_timer_sync(&mos7840_port->led_timer2); | 2480 | del_timer_sync(&mos7840_port->led_timer2); |
2481 | |||
2482 | usb_kill_urb(mos7840_port->led_urb); | ||
2483 | usb_free_urb(mos7840_port->led_urb); | ||
2484 | kfree(mos7840_port->led_dr); | ||
2450 | } | 2485 | } |
2451 | usb_kill_urb(mos7840_port->control_urb); | 2486 | usb_kill_urb(mos7840_port->control_urb); |
2452 | usb_free_urb(mos7840_port->control_urb); | 2487 | usb_free_urb(mos7840_port->control_urb); |
@@ -2473,9 +2508,7 @@ static struct usb_serial_driver moschip7840_4port_device = { | |||
2473 | .throttle = mos7840_throttle, | 2508 | .throttle = mos7840_throttle, |
2474 | .unthrottle = mos7840_unthrottle, | 2509 | .unthrottle = mos7840_unthrottle, |
2475 | .calc_num_ports = mos7840_calc_num_ports, | 2510 | .calc_num_ports = mos7840_calc_num_ports, |
2476 | #ifdef MCSSerialProbe | 2511 | .probe = mos7840_probe, |
2477 | .probe = mos7840_serial_probe, | ||
2478 | #endif | ||
2479 | .ioctl = mos7840_ioctl, | 2512 | .ioctl = mos7840_ioctl, |
2480 | .set_termios = mos7840_set_termios, | 2513 | .set_termios = mos7840_set_termios, |
2481 | .break_ctl = mos7840_break, | 2514 | .break_ctl = mos7840_break, |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 5dd857de05b0..1cf6f125f5f0 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -341,17 +341,12 @@ static void option_instat_callback(struct urb *urb); | |||
341 | #define OLIVETTI_VENDOR_ID 0x0b3c | 341 | #define OLIVETTI_VENDOR_ID 0x0b3c |
342 | #define OLIVETTI_PRODUCT_OLICARD100 0xc000 | 342 | #define OLIVETTI_PRODUCT_OLICARD100 0xc000 |
343 | #define OLIVETTI_PRODUCT_OLICARD145 0xc003 | 343 | #define OLIVETTI_PRODUCT_OLICARD145 0xc003 |
344 | #define OLIVETTI_PRODUCT_OLICARD200 0xc005 | ||
344 | 345 | ||
345 | /* Celot products */ | 346 | /* Celot products */ |
346 | #define CELOT_VENDOR_ID 0x211f | 347 | #define CELOT_VENDOR_ID 0x211f |
347 | #define CELOT_PRODUCT_CT680M 0x6801 | 348 | #define CELOT_PRODUCT_CT680M 0x6801 |
348 | 349 | ||
349 | /* ONDA Communication vendor id */ | ||
350 | #define ONDA_VENDOR_ID 0x1ee8 | ||
351 | |||
352 | /* ONDA MT825UP HSDPA 14.2 modem */ | ||
353 | #define ONDA_MT825UP 0x000b | ||
354 | |||
355 | /* Samsung products */ | 350 | /* Samsung products */ |
356 | #define SAMSUNG_VENDOR_ID 0x04e8 | 351 | #define SAMSUNG_VENDOR_ID 0x04e8 |
357 | #define SAMSUNG_PRODUCT_GT_B3730 0x6889 | 352 | #define SAMSUNG_PRODUCT_GT_B3730 0x6889 |
@@ -444,7 +439,8 @@ static void option_instat_callback(struct urb *urb); | |||
444 | 439 | ||
445 | /* Hyundai Petatel Inc. products */ | 440 | /* Hyundai Petatel Inc. products */ |
446 | #define PETATEL_VENDOR_ID 0x1ff4 | 441 | #define PETATEL_VENDOR_ID 0x1ff4 |
447 | #define PETATEL_PRODUCT_NP10T 0x600e | 442 | #define PETATEL_PRODUCT_NP10T_600A 0x600a |
443 | #define PETATEL_PRODUCT_NP10T_600E 0x600e | ||
448 | 444 | ||
449 | /* TP-LINK Incorporated products */ | 445 | /* TP-LINK Incorporated products */ |
450 | #define TPLINK_VENDOR_ID 0x2357 | 446 | #define TPLINK_VENDOR_ID 0x2357 |
@@ -782,6 +778,7 @@ static const struct usb_device_id option_ids[] = { | |||
782 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) }, | 778 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) }, |
783 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, | 779 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, |
784 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ | 780 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ |
781 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ | ||
785 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ | 782 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ |
786 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */ | 783 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */ |
787 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) }, | 784 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) }, |
@@ -817,7 +814,8 @@ static const struct usb_device_id option_ids[] = { | |||
817 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), | 814 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), |
818 | .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, | 815 | .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, |
819 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0018, 0xff, 0xff, 0xff) }, | 816 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0018, 0xff, 0xff, 0xff) }, |
820 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff) }, | 817 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff), |
818 | .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, | ||
821 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0020, 0xff, 0xff, 0xff) }, | 819 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0020, 0xff, 0xff, 0xff) }, |
822 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff), | 820 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff), |
823 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 821 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
@@ -1256,8 +1254,8 @@ static const struct usb_device_id option_ids[] = { | |||
1256 | 1254 | ||
1257 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, | 1255 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, |
1258 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) }, | 1256 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) }, |
1257 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200) }, | ||
1259 | { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ | 1258 | { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ |
1260 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */ | ||
1261 | { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/ | 1259 | { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/ |
1262 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) }, | 1260 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) }, |
1263 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM610) }, | 1261 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM610) }, |
@@ -1329,9 +1327,12 @@ static const struct usb_device_id option_ids[] = { | |||
1329 | { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) }, | 1327 | { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) }, |
1330 | { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) }, | 1328 | { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) }, |
1331 | { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, | 1329 | { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, |
1332 | { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) }, | 1330 | { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) }, |
1331 | { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) }, | ||
1333 | { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180), | 1332 | { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180), |
1334 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 1333 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
1334 | { USB_DEVICE(TPLINK_VENDOR_ID, 0x9000), /* TP-Link MA260 */ | ||
1335 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | ||
1335 | { USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) }, | 1336 | { USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) }, |
1336 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x02, 0x01) }, /* D-Link DWM-156 (variant) */ | 1337 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x02, 0x01) }, /* D-Link DWM-156 (variant) */ |
1337 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x00, 0x00) }, /* D-Link DWM-156 (variant) */ | 1338 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x00, 0x00) }, /* D-Link DWM-156 (variant) */ |
@@ -1339,6 +1340,8 @@ static const struct usb_device_id option_ids[] = { | |||
1339 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) }, | 1340 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) }, |
1340 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) }, | 1341 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) }, |
1341 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, | 1342 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, |
1343 | { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ | ||
1344 | { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ | ||
1342 | { } /* Terminating entry */ | 1345 | { } /* Terminating entry */ |
1343 | }; | 1346 | }; |
1344 | MODULE_DEVICE_TABLE(usb, option_ids); | 1347 | MODULE_DEVICE_TABLE(usb, option_ids); |
diff --git a/drivers/usb/serial/suunto.c b/drivers/usb/serial/suunto.c new file mode 100644 index 000000000000..2248e7a7d5ad --- /dev/null +++ b/drivers/usb/serial/suunto.c | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * Suunto ANT+ USB Driver | ||
3 | * | ||
4 | * Copyright (C) 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
5 | * Copyright (C) 2013 Linux Foundation | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation only. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/tty.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/usb.h> | ||
17 | #include <linux/usb/serial.h> | ||
18 | #include <linux/uaccess.h> | ||
19 | |||
20 | static const struct usb_device_id id_table[] = { | ||
21 | { USB_DEVICE(0x0fcf, 0x1008) }, | ||
22 | { }, | ||
23 | }; | ||
24 | MODULE_DEVICE_TABLE(usb, id_table); | ||
25 | |||
26 | static struct usb_serial_driver suunto_device = { | ||
27 | .driver = { | ||
28 | .owner = THIS_MODULE, | ||
29 | .name = KBUILD_MODNAME, | ||
30 | }, | ||
31 | .id_table = id_table, | ||
32 | .num_ports = 1, | ||
33 | }; | ||
34 | |||
35 | static struct usb_serial_driver * const serial_drivers[] = { | ||
36 | &suunto_device, | ||
37 | NULL, | ||
38 | }; | ||
39 | |||
40 | module_usb_serial_driver(serial_drivers, id_table); | ||
41 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 7182bb774b79..375b5a400b6f 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -371,7 +371,7 @@ static int ti_startup(struct usb_serial *serial) | |||
371 | usb_set_serial_data(serial, tdev); | 371 | usb_set_serial_data(serial, tdev); |
372 | 372 | ||
373 | /* determine device type */ | 373 | /* determine device type */ |
374 | if (usb_match_id(serial->interface, ti_id_table_3410)) | 374 | if (serial->type == &ti_1port_device) |
375 | tdev->td_is_3410 = 1; | 375 | tdev->td_is_3410 = 1; |
376 | dev_dbg(&dev->dev, "%s - device type is %s\n", __func__, | 376 | dev_dbg(&dev->dev, "%s - device type is %s\n", __func__, |
377 | tdev->td_is_3410 ? "3410" : "5052"); | 377 | tdev->td_is_3410 ? "3410" : "5052"); |