diff options
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index f92f4d773374..dcc87aaa8628 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -663,6 +663,11 @@ static struct usb_device_id id_table_combined [] = { | |||
663 | { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, | 663 | { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, |
664 | { USB_DEVICE(FTDI_VID, DIEBOLD_BCS_SE923_PID) }, | 664 | { USB_DEVICE(FTDI_VID, DIEBOLD_BCS_SE923_PID) }, |
665 | { USB_DEVICE(FTDI_VID, FTDI_NDI_HUC_PID) }, | 665 | { USB_DEVICE(FTDI_VID, FTDI_NDI_HUC_PID) }, |
666 | { USB_DEVICE(ATMEL_VID, STK541_PID) }, | ||
667 | { USB_DEVICE(DE_VID, STB_PID) }, | ||
668 | { USB_DEVICE(DE_VID, WHT_PID) }, | ||
669 | { USB_DEVICE(ADI_VID, ADI_GNICE_PID), | ||
670 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | ||
666 | { }, /* Optional parameter entry */ | 671 | { }, /* Optional parameter entry */ |
667 | { } /* Terminating entry */ | 672 | { } /* Terminating entry */ |
668 | }; | 673 | }; |
@@ -1933,18 +1938,16 @@ static void ftdi_process_read(struct work_struct *work) | |||
1933 | /* Compare new line status to the old one, signal if different/ | 1938 | /* Compare new line status to the old one, signal if different/ |
1934 | N.B. packet may be processed more than once, but differences | 1939 | N.B. packet may be processed more than once, but differences |
1935 | are only processed once. */ | 1940 | are only processed once. */ |
1936 | if (priv != NULL) { | 1941 | char new_status = data[packet_offset + 0] & |
1937 | char new_status = data[packet_offset + 0] & | 1942 | FTDI_STATUS_B0_MASK; |
1938 | FTDI_STATUS_B0_MASK; | 1943 | if (new_status != priv->prev_status) { |
1939 | if (new_status != priv->prev_status) { | 1944 | priv->diff_status |= |
1940 | priv->diff_status |= | 1945 | new_status ^ priv->prev_status; |
1941 | new_status ^ priv->prev_status; | 1946 | wake_up_interruptible(&priv->delta_msr_wait); |
1942 | wake_up_interruptible(&priv->delta_msr_wait); | 1947 | priv->prev_status = new_status; |
1943 | priv->prev_status = new_status; | ||
1944 | } | ||
1945 | } | 1948 | } |
1946 | 1949 | ||
1947 | length = min(PKTSZ, urb->actual_length-packet_offset)-2; | 1950 | length = min_t(u32, PKTSZ, urb->actual_length-packet_offset)-2; |
1948 | if (length < 0) { | 1951 | if (length < 0) { |
1949 | dev_err(&port->dev, "%s - bad packet length: %d\n", | 1952 | dev_err(&port->dev, "%s - bad packet length: %d\n", |
1950 | __func__, length+2); | 1953 | __func__, length+2); |
@@ -2289,11 +2292,8 @@ static int ftdi_tiocmget(struct tty_struct *tty, struct file *file) | |||
2289 | FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE, | 2292 | FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE, |
2290 | 0, 0, | 2293 | 0, 0, |
2291 | buf, 1, WDR_TIMEOUT); | 2294 | buf, 1, WDR_TIMEOUT); |
2292 | if (ret < 0) { | 2295 | if (ret < 0) |
2293 | dbg("%s Could not get modem status of device - err: %d", __func__, | ||
2294 | ret); | ||
2295 | return ret; | 2296 | return ret; |
2296 | } | ||
2297 | break; | 2297 | break; |
2298 | case FT8U232AM: | 2298 | case FT8U232AM: |
2299 | case FT232BM: | 2299 | case FT232BM: |
@@ -2308,15 +2308,11 @@ static int ftdi_tiocmget(struct tty_struct *tty, struct file *file) | |||
2308 | FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE, | 2308 | FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE, |
2309 | 0, priv->interface, | 2309 | 0, priv->interface, |
2310 | buf, 2, WDR_TIMEOUT); | 2310 | buf, 2, WDR_TIMEOUT); |
2311 | if (ret < 0) { | 2311 | if (ret < 0) |
2312 | dbg("%s Could not get modem status of device - err: %d", __func__, | ||
2313 | ret); | ||
2314 | return ret; | 2312 | return ret; |
2315 | } | ||
2316 | break; | 2313 | break; |
2317 | default: | 2314 | default: |
2318 | return -EFAULT; | 2315 | return -EFAULT; |
2319 | break; | ||
2320 | } | 2316 | } |
2321 | 2317 | ||
2322 | return (buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) | | 2318 | return (buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) | |