mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
USB: misc: iowarrior: add support for the 28 and 28L devices
commit 5f6f8da2d7
upstream.
Add new device ids for the 28 and 28L devices. These have 4 interfaces
instead of 2, but the driver binds the same, so the driver changes are
minimal.
Cc: Christoph Jung <jung@codemercs.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200212040422.2991-2-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ae38841b00
commit
1513520b60
1 changed files with 13 additions and 2 deletions
|
@ -33,6 +33,9 @@
|
|||
#define USB_DEVICE_ID_CODEMERCS_IOWPV2 0x1512
|
||||
/* full speed iowarrior */
|
||||
#define USB_DEVICE_ID_CODEMERCS_IOW56 0x1503
|
||||
/* fuller speed iowarrior */
|
||||
#define USB_DEVICE_ID_CODEMERCS_IOW28 0x1504
|
||||
#define USB_DEVICE_ID_CODEMERCS_IOW28L 0x1505
|
||||
|
||||
/* OEMed devices */
|
||||
#define USB_DEVICE_ID_CODEMERCS_IOW24SAG 0x158a
|
||||
|
@ -143,6 +146,8 @@ static const struct usb_device_id iowarrior_ids[] = {
|
|||
{USB_DEVICE(USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW56)},
|
||||
{USB_DEVICE(USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24SAG)},
|
||||
{USB_DEVICE(USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW56AM)},
|
||||
{USB_DEVICE(USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW28)},
|
||||
{USB_DEVICE(USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW28L)},
|
||||
{} /* Terminating entry */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, iowarrior_ids);
|
||||
|
@ -383,6 +388,8 @@ static ssize_t iowarrior_write(struct file *file,
|
|||
break;
|
||||
case USB_DEVICE_ID_CODEMERCS_IOW56:
|
||||
case USB_DEVICE_ID_CODEMERCS_IOW56AM:
|
||||
case USB_DEVICE_ID_CODEMERCS_IOW28:
|
||||
case USB_DEVICE_ID_CODEMERCS_IOW28L:
|
||||
/* The IOW56 uses asynchronous IO and more urbs */
|
||||
if (atomic_read(&dev->write_busy) == MAX_WRITES_IN_FLIGHT) {
|
||||
/* Wait until we are below the limit for submitted urbs */
|
||||
|
@ -792,7 +799,9 @@ static int iowarrior_probe(struct usb_interface *interface,
|
|||
}
|
||||
|
||||
if ((dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56) ||
|
||||
(dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56AM)) {
|
||||
(dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56AM) ||
|
||||
(dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW28) ||
|
||||
(dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW28L)) {
|
||||
res = usb_find_last_int_out_endpoint(iface_desc,
|
||||
&dev->int_out_endpoint);
|
||||
if (res) {
|
||||
|
@ -806,7 +815,9 @@ static int iowarrior_probe(struct usb_interface *interface,
|
|||
dev->report_size = usb_endpoint_maxp(dev->int_in_endpoint);
|
||||
if ((dev->interface->cur_altsetting->desc.bInterfaceNumber == 0) &&
|
||||
((dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56) ||
|
||||
(dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56AM)))
|
||||
(dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW56AM) ||
|
||||
(dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW28) ||
|
||||
(dev->product_id == USB_DEVICE_ID_CODEMERCS_IOW28L)))
|
||||
/* IOWarrior56 has wMaxPacketSize different from report size */
|
||||
dev->report_size = 7;
|
||||
|
||||
|
|
Loading…
Reference in a new issue