aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/serial/ftdi_sio.c24
-rw-r--r--drivers/usb/serial/ftdi_sio.h7
2 files changed, 31 insertions, 0 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 76db2fef4657..17b2cc071ed8 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -92,6 +92,7 @@ struct ftdi_sio_quirk {
92}; 92};
93 93
94static int ftdi_jtag_probe (struct usb_serial *serial); 94static int ftdi_jtag_probe (struct usb_serial *serial);
95static int ftdi_mtxorb_hack_setup (struct usb_serial *serial);
95static void ftdi_USB_UIRT_setup (struct ftdi_private *priv); 96static void ftdi_USB_UIRT_setup (struct ftdi_private *priv);
96static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv); 97static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv);
97 98
@@ -99,6 +100,10 @@ static struct ftdi_sio_quirk ftdi_jtag_quirk = {
99 .probe = ftdi_jtag_probe, 100 .probe = ftdi_jtag_probe,
100}; 101};
101 102
103static struct ftdi_sio_quirk ftdi_mtxorb_hack_quirk = {
104 .probe = ftdi_mtxorb_hack_setup,
105};
106
102static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = { 107static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = {
103 .port_probe = ftdi_USB_UIRT_setup, 108 .port_probe = ftdi_USB_UIRT_setup,
104}; 109};
@@ -161,6 +166,8 @@ static struct usb_device_id id_table_combined [] = {
161 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) }, 166 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) },
162 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, 167 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) },
163 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, 168 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) },
169 { USB_DEVICE(MTXORB_VK_VID, MTXORB_VK_PID),
170 .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
164 { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, 171 { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) },
165 { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, 172 { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) },
166 { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, 173 { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) },
@@ -1088,6 +1095,23 @@ static int ftdi_jtag_probe(struct usb_serial *serial)
1088 return 0; 1095 return 0;
1089} 1096}
1090 1097
1098/*
1099 * The Matrix Orbital VK204-25-USB has an invalid IN endpoint.
1100 * We have to correct it if we want to read from it.
1101 */
1102static int ftdi_mtxorb_hack_setup(struct usb_serial *serial)
1103{
1104 struct usb_host_endpoint *ep = serial->dev->ep_in[1];
1105 struct usb_endpoint_descriptor *ep_desc = &ep->desc;
1106
1107 if (ep->enabled && ep_desc->wMaxPacketSize == 0) {
1108 ep_desc->wMaxPacketSize = 0x40;
1109 info("Fixing invalid wMaxPacketSize on read pipe");
1110 }
1111
1112 return 0;
1113}
1114
1091/* ftdi_shutdown is called from usbserial:usb_serial_disconnect 1115/* ftdi_shutdown is called from usbserial:usb_serial_disconnect
1092 * it is called when the usb device is disconnected 1116 * it is called when the usb device is disconnected
1093 * 1117 *
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index 6eee2ab914ec..e1eb742abcd5 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -102,6 +102,13 @@
102 * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */ 102 * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */
103#define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ 103#define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */
104 104
105/*
106 * The following are the values for the Matrix Orbital VK204-25-USB
107 * display, which use the FT232RL.
108 */
109#define MTXORB_VK_VID 0x1b3d
110#define MTXORB_VK_PID 0x0158
111
105/* Interbiometrics USB I/O Board */ 112/* Interbiometrics USB I/O Board */
106/* Developed for Interbiometrics by Rudolf Gugler */ 113/* Developed for Interbiometrics by Rudolf Gugler */
107#define INTERBIOMETRICS_VID 0x1209 114#define INTERBIOMETRICS_VID 0x1209