Skip to content

Commit 73de1dd

Browse files
committed
USB: serial: ftdi_sio: rewrite 8u2232c quirk
Rewrite the 8u2232c quirk to avoid the manufacturer and product string comparisons for the second port which will always be bound. Signed-off-by: Johan Hovold <johan@kernel.org>
1 parent 448016e commit 73de1dd

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

drivers/usb/serial/ftdi_sio.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2302,16 +2302,21 @@ static int ftdi_jtag_probe(struct usb_serial *serial)
23022302

23032303
static int ftdi_8u2232c_probe(struct usb_serial *serial)
23042304
{
2305+
struct usb_interface *intf = serial->interface;
23052306
struct usb_device *udev = serial->dev;
2307+
int ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
23062308

2307-
if (udev->manufacturer && !strcmp(udev->manufacturer, "CALAO Systems"))
2308-
return ftdi_jtag_probe(serial);
2309+
if (ifnum == 0) {
2310+
if (udev->manufacturer &&
2311+
!strcmp(udev->manufacturer, "CALAO Systems"))
2312+
return -ENODEV;
23092313

2310-
if (udev->product &&
2311-
(!strcmp(udev->product, "Arrow USB Blaster") ||
2312-
!strcmp(udev->product, "BeagleBone/XDS100V2") ||
2313-
!strcmp(udev->product, "SNAP Connect E10")))
2314-
return ftdi_jtag_probe(serial);
2314+
if (udev->product &&
2315+
(!strcmp(udev->product, "Arrow USB Blaster") ||
2316+
!strcmp(udev->product, "BeagleBone/XDS100V2") ||
2317+
!strcmp(udev->product, "SNAP Connect E10")))
2318+
return -ENODEV;
2319+
}
23152320

23162321
return 0;
23172322
}

0 commit comments

Comments
 (0)