From 3afb00d3f86d3d924f88b56fa8285d4e9db85852 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 7 Aug 2024 15:17:52 +0200 Subject: Merging upstream version 6.10.3. Signed-off-by: Daniel Baumann --- drivers/usb/misc/uss720.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'drivers/usb/misc/uss720.c') diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index eb5a8e0d9e..b26c1d382d 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c @@ -693,7 +693,7 @@ static int uss720_probe(struct usb_interface *intf, interface = intf->cur_altsetting; - if (interface->desc.bNumEndpoints < 3) { + if (interface->desc.bNumEndpoints < 2) { usb_put_dev(usbdev); return -ENODEV; } @@ -719,7 +719,10 @@ static int uss720_probe(struct usb_interface *intf, priv->pp = pp; pp->private_data = priv; - pp->modes = PARPORT_MODE_PCSPP | PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP | PARPORT_MODE_ECP | PARPORT_MODE_COMPAT; + pp->modes = PARPORT_MODE_PCSPP | PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP | PARPORT_MODE_COMPAT; + if (interface->desc.bNumEndpoints >= 3) + pp->modes |= PARPORT_MODE_ECP; + pp->dev = &usbdev->dev; /* set the USS720 control register to manual mode, no ECP compression, enable all ints */ set_1284_register(pp, 7, 0x00, GFP_KERNEL); @@ -772,14 +775,15 @@ static void uss720_disconnect(struct usb_interface *intf) /* table of cables that work through this driver */ static const struct usb_device_id uss720_table[] = { - { USB_DEVICE(0x047e, 0x1001) }, - { USB_DEVICE(0x04b8, 0x0002) }, - { USB_DEVICE(0x04b8, 0x0003) }, + { USB_DEVICE(0x047e, 0x1001) }, /* Infowave 901-0030 */ + { USB_DEVICE(0x04b8, 0x0002) }, /* Epson CAEUL0002 ISD-103 */ + { USB_DEVICE(0x04b8, 0x0003) }, /* Epson ISD-101 */ { USB_DEVICE(0x050d, 0x0002) }, - { USB_DEVICE(0x050d, 0x1202) }, + { USB_DEVICE(0x050d, 0x1202) }, /* Belkin F5U120-PC */ { USB_DEVICE(0x0557, 0x2001) }, - { USB_DEVICE(0x05ab, 0x0002) }, - { USB_DEVICE(0x06c6, 0x0100) }, + { USB_DEVICE(0x05ab, 0x0002) }, /* Belkin F5U002 ISD-101 */ + { USB_DEVICE(0x05ab, 0x1001) }, /* Belkin F5U002 P80453-A */ + { USB_DEVICE(0x06c6, 0x0100) }, /* Infowave ISD-103 */ { USB_DEVICE(0x0729, 0x1284) }, { USB_DEVICE(0x1293, 0x0002) }, { } /* Terminating entry */ -- cgit v1.2.3