Skip to content

Commit 19de427

Browse files
committed
USB: ftdi_sio: remove redundant mtxorb quirk
Remove redundant mtxorb quirk used to fix up incorrect wMaxPacketSize, which was added before 895f28b ("USB: ftdi_sio: fix hi-speed device packet size calculation") which does the same thing for all devices. Signed-off-by: Johan Hovold <[email protected]>
1 parent 47e5759 commit 19de427

File tree

1 file changed

+8
-39
lines changed

1 file changed

+8
-39
lines changed

drivers/usb/serial/ftdi_sio.c

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ struct ftdi_sio_quirk {
8787
};
8888

8989
static int ftdi_jtag_probe(struct usb_serial *serial);
90-
static int ftdi_mtxorb_hack_setup(struct usb_serial *serial);
9190
static int ftdi_NDI_device_setup(struct usb_serial *serial);
9291
static int ftdi_stmclite_probe(struct usb_serial *serial);
9392
static int ftdi_8u2232c_probe(struct usb_serial *serial);
@@ -98,10 +97,6 @@ static struct ftdi_sio_quirk ftdi_jtag_quirk = {
9897
.probe = ftdi_jtag_probe,
9998
};
10099

101-
static struct ftdi_sio_quirk ftdi_mtxorb_hack_quirk = {
102-
.probe = ftdi_mtxorb_hack_setup,
103-
};
104-
105100
static struct ftdi_sio_quirk ftdi_NDI_device_quirk = {
106101
.probe = ftdi_NDI_device_setup,
107102
};
@@ -256,14 +251,12 @@ static const struct usb_device_id id_table_combined[] = {
256251
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0124_PID) },
257252
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0125_PID) },
258253
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0126_PID) },
259-
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0127_PID),
260-
.driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
254+
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0127_PID) },
261255
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0128_PID) },
262256
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0129_PID) },
263257
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_012A_PID) },
264258
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_012B_PID) },
265-
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_012C_PID),
266-
.driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
259+
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_012C_PID) },
267260
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_012D_PID) },
268261
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_012E_PID) },
269262
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_012F_PID) },
@@ -302,18 +295,12 @@ static const struct usb_device_id id_table_combined[] = {
302295
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0150_PID) },
303296
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0151_PID) },
304297
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0152_PID) },
305-
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0153_PID),
306-
.driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
307-
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0154_PID),
308-
.driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
309-
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0155_PID),
310-
.driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
311-
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0156_PID),
312-
.driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
313-
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0157_PID),
314-
.driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
315-
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0158_PID),
316-
.driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
298+
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0153_PID) },
299+
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0154_PID) },
300+
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0155_PID) },
301+
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0156_PID) },
302+
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0157_PID) },
303+
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0158_PID) },
317304
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0159_PID) },
318305
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_015A_PID) },
319306
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_015B_PID) },
@@ -1858,24 +1845,6 @@ static int ftdi_stmclite_probe(struct usb_serial *serial)
18581845
return 0;
18591846
}
18601847

1861-
/*
1862-
* The Matrix Orbital VK204-25-USB has an invalid IN endpoint.
1863-
* We have to correct it if we want to read from it.
1864-
*/
1865-
static int ftdi_mtxorb_hack_setup(struct usb_serial *serial)
1866-
{
1867-
struct usb_host_endpoint *ep = serial->dev->ep_in[1];
1868-
struct usb_endpoint_descriptor *ep_desc = &ep->desc;
1869-
1870-
if (ep->enabled && ep_desc->wMaxPacketSize == 0) {
1871-
ep_desc->wMaxPacketSize = cpu_to_le16(0x40);
1872-
dev_info(&serial->dev->dev,
1873-
"Fixing invalid wMaxPacketSize on read pipe\n");
1874-
}
1875-
1876-
return 0;
1877-
}
1878-
18791848
static int ftdi_sio_port_remove(struct usb_serial_port *port)
18801849
{
18811850
struct ftdi_private *priv = usb_get_serial_port_data(port);

0 commit comments

Comments
 (0)