diff options
Diffstat (limited to 'drivers/usb/serial')
| -rw-r--r-- | drivers/usb/serial/cp210x.c | 21 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 3 | ||||
| -rw-r--r-- | drivers/usb/serial/option.c | 7 |
3 files changed, 29 insertions, 2 deletions
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 698252a4dc5d..bd254ec97d14 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
| @@ -50,6 +50,8 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *, | |||
| 50 | static void cp210x_break_ctl(struct tty_struct *, int); | 50 | static void cp210x_break_ctl(struct tty_struct *, int); |
| 51 | static int cp210x_startup(struct usb_serial *); | 51 | static int cp210x_startup(struct usb_serial *); |
| 52 | static void cp210x_disconnect(struct usb_serial *); | 52 | static void cp210x_disconnect(struct usb_serial *); |
| 53 | static void cp210x_dtr_rts(struct usb_serial_port *p, int on); | ||
| 54 | static int cp210x_carrier_raised(struct usb_serial_port *p); | ||
| 53 | 55 | ||
| 54 | static int debug; | 56 | static int debug; |
| 55 | 57 | ||
| @@ -143,6 +145,8 @@ static struct usb_serial_driver cp210x_device = { | |||
| 143 | .tiocmset = cp210x_tiocmset, | 145 | .tiocmset = cp210x_tiocmset, |
| 144 | .attach = cp210x_startup, | 146 | .attach = cp210x_startup, |
| 145 | .disconnect = cp210x_disconnect, | 147 | .disconnect = cp210x_disconnect, |
| 148 | .dtr_rts = cp210x_dtr_rts, | ||
| 149 | .carrier_raised = cp210x_carrier_raised | ||
| 146 | }; | 150 | }; |
| 147 | 151 | ||
| 148 | /* Config request types */ | 152 | /* Config request types */ |
| @@ -746,6 +750,14 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *file, | |||
| 746 | return cp210x_set_config(port, CP210X_SET_MHS, &control, 2); | 750 | return cp210x_set_config(port, CP210X_SET_MHS, &control, 2); |
| 747 | } | 751 | } |
| 748 | 752 | ||
| 753 | static void cp210x_dtr_rts(struct usb_serial_port *p, int on) | ||
| 754 | { | ||
| 755 | if (on) | ||
| 756 | cp210x_tiocmset_port(p, NULL, TIOCM_DTR|TIOCM_RTS, 0); | ||
| 757 | else | ||
| 758 | cp210x_tiocmset_port(p, NULL, 0, TIOCM_DTR|TIOCM_RTS); | ||
| 759 | } | ||
| 760 | |||
| 749 | static int cp210x_tiocmget (struct tty_struct *tty, struct file *file) | 761 | static int cp210x_tiocmget (struct tty_struct *tty, struct file *file) |
| 750 | { | 762 | { |
| 751 | struct usb_serial_port *port = tty->driver_data; | 763 | struct usb_serial_port *port = tty->driver_data; |
| @@ -768,6 +780,15 @@ static int cp210x_tiocmget (struct tty_struct *tty, struct file *file) | |||
| 768 | return result; | 780 | return result; |
| 769 | } | 781 | } |
| 770 | 782 | ||
| 783 | static int cp210x_carrier_raised(struct usb_serial_port *p) | ||
| 784 | { | ||
| 785 | unsigned int control; | ||
| 786 | cp210x_get_config(p, CP210X_GET_MDMSTS, &control, 1); | ||
| 787 | if (control & CONTROL_DCD) | ||
| 788 | return 1; | ||
| 789 | return 0; | ||
| 790 | } | ||
| 791 | |||
| 771 | static void cp210x_break_ctl (struct tty_struct *tty, int break_state) | 792 | static void cp210x_break_ctl (struct tty_struct *tty, int break_state) |
| 772 | { | 793 | { |
| 773 | struct usb_serial_port *port = tty->driver_data; | 794 | struct usb_serial_port *port = tty->driver_data; |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 9c60d6d4908a..ebcc6d0e2e91 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
| @@ -1937,7 +1937,7 @@ static void ftdi_write_bulk_callback(struct urb *urb) | |||
| 1937 | return; | 1937 | return; |
| 1938 | } | 1938 | } |
| 1939 | /* account for transferred data */ | 1939 | /* account for transferred data */ |
| 1940 | countback = urb->actual_length; | 1940 | countback = urb->transfer_buffer_length; |
| 1941 | data_offset = priv->write_offset; | 1941 | data_offset = priv->write_offset; |
| 1942 | if (data_offset > 0) { | 1942 | if (data_offset > 0) { |
| 1943 | /* Subtract the control bytes */ | 1943 | /* Subtract the control bytes */ |
| @@ -1950,7 +1950,6 @@ static void ftdi_write_bulk_callback(struct urb *urb) | |||
| 1950 | 1950 | ||
| 1951 | if (status) { | 1951 | if (status) { |
| 1952 | dbg("nonzero write bulk status received: %d", status); | 1952 | dbg("nonzero write bulk status received: %d", status); |
| 1953 | return; | ||
| 1954 | } | 1953 | } |
| 1955 | 1954 | ||
| 1956 | usb_serial_port_softint(port); | 1955 | usb_serial_port_softint(port); |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index cd44c68954df..0577e4b61114 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
| @@ -308,6 +308,7 @@ static int option_resume(struct usb_serial *serial); | |||
| 308 | 308 | ||
| 309 | #define DLINK_VENDOR_ID 0x1186 | 309 | #define DLINK_VENDOR_ID 0x1186 |
| 310 | #define DLINK_PRODUCT_DWM_652 0x3e04 | 310 | #define DLINK_PRODUCT_DWM_652 0x3e04 |
| 311 | #define DLINK_PRODUCT_DWM_652_U5 0xce16 | ||
| 311 | 312 | ||
| 312 | #define QISDA_VENDOR_ID 0x1da5 | 313 | #define QISDA_VENDOR_ID 0x1da5 |
| 313 | #define QISDA_PRODUCT_H21_4512 0x4512 | 314 | #define QISDA_PRODUCT_H21_4512 0x4512 |
| @@ -335,6 +336,10 @@ static int option_resume(struct usb_serial *serial); | |||
| 335 | #define AIRPLUS_VENDOR_ID 0x1011 | 336 | #define AIRPLUS_VENDOR_ID 0x1011 |
| 336 | #define AIRPLUS_PRODUCT_MCD650 0x3198 | 337 | #define AIRPLUS_PRODUCT_MCD650 0x3198 |
| 337 | 338 | ||
| 339 | /* 4G Systems products */ | ||
| 340 | #define FOUR_G_SYSTEMS_VENDOR_ID 0x1c9e | ||
| 341 | #define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603 | ||
| 342 | |||
| 338 | static struct usb_device_id option_ids[] = { | 343 | static struct usb_device_id option_ids[] = { |
| 339 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, | 344 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
| 340 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, | 345 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, |
| @@ -586,6 +591,7 @@ static struct usb_device_id option_ids[] = { | |||
| 586 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, | 591 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, |
| 587 | { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, | 592 | { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, |
| 588 | { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, | 593 | { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, |
| 594 | { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ | ||
| 589 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, | 595 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, |
| 590 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, | 596 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, |
| 591 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, | 597 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, |
| @@ -597,6 +603,7 @@ static struct usb_device_id option_ids[] = { | |||
| 597 | { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) }, | 603 | { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) }, |
| 598 | { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, | 604 | { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, |
| 599 | { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, | 605 | { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, |
| 606 | { USB_DEVICE(FOUR_G_SYSTEMS_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14) }, | ||
| 600 | { } /* Terminating entry */ | 607 | { } /* Terminating entry */ |
| 601 | }; | 608 | }; |
| 602 | MODULE_DEVICE_TABLE(usb, option_ids); | 609 | MODULE_DEVICE_TABLE(usb, option_ids); |
