USB: ftdi_sio: Workaround for broken Matrix Orbital serial port
Workaround for the FT232RL-based, Matrix Orbital VK204-25-USB serial port added to the ftdi_sio driver. The device has an invalid endpoint descriptor, which must be modified before it can be used. Signed-off-by: Kevin Vance <kvance@kvance.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
85fb62a001
commit
546d7eec38
|
@ -92,6 +92,7 @@ struct ftdi_sio_quirk {
|
|||
};
|
||||
|
||||
static int ftdi_jtag_probe (struct usb_serial *serial);
|
||||
static int ftdi_mtxorb_hack_setup (struct usb_serial *serial);
|
||||
static void ftdi_USB_UIRT_setup (struct ftdi_private *priv);
|
||||
static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv);
|
||||
|
||||
|
@ -99,6 +100,10 @@ static struct ftdi_sio_quirk ftdi_jtag_quirk = {
|
|||
.probe = ftdi_jtag_probe,
|
||||
};
|
||||
|
||||
static struct ftdi_sio_quirk ftdi_mtxorb_hack_quirk = {
|
||||
.probe = ftdi_mtxorb_hack_setup,
|
||||
};
|
||||
|
||||
static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = {
|
||||
.port_probe = ftdi_USB_UIRT_setup,
|
||||
};
|
||||
|
@ -161,6 +166,8 @@ static struct usb_device_id id_table_combined [] = {
|
|||
{ USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) },
|
||||
{ USB_DEVICE(MTXORB_VK_VID, MTXORB_VK_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) },
|
||||
|
@ -1088,6 +1095,23 @@ static int ftdi_jtag_probe(struct usb_serial *serial)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* The Matrix Orbital VK204-25-USB has an invalid IN endpoint.
|
||||
* We have to correct it if we want to read from it.
|
||||
*/
|
||||
static int ftdi_mtxorb_hack_setup(struct usb_serial *serial)
|
||||
{
|
||||
struct usb_host_endpoint *ep = serial->dev->ep_in[1];
|
||||
struct usb_endpoint_descriptor *ep_desc = &ep->desc;
|
||||
|
||||
if (ep->enabled && ep_desc->wMaxPacketSize == 0) {
|
||||
ep_desc->wMaxPacketSize = 0x40;
|
||||
info("Fixing invalid wMaxPacketSize on read pipe");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ftdi_shutdown is called from usbserial:usb_serial_disconnect
|
||||
* it is called when the usb device is disconnected
|
||||
*
|
||||
|
|
|
@ -102,6 +102,13 @@
|
|||
* (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */
|
||||
#define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */
|
||||
|
||||
/*
|
||||
* The following are the values for the Matrix Orbital VK204-25-USB
|
||||
* display, which use the FT232RL.
|
||||
*/
|
||||
#define MTXORB_VK_VID 0x1b3d
|
||||
#define MTXORB_VK_PID 0x0158
|
||||
|
||||
/* Interbiometrics USB I/O Board */
|
||||
/* Developed for Interbiometrics by Rudolf Gugler */
|
||||
#define INTERBIOMETRICS_VID 0x1209
|
||||
|
|
Loading…
Reference in New Issue