On Sat, May 06, 2017 at 04:44:35PM +0300, [email protected] wrote:
> From: Andrey Korolyov <[email protected]>
>
> This patch adds support for recognition of ARM-USB-TINY(H) devices which
> are almost identical to ARM-USB-OCD(H) but are lacking separate power jack
> and serial console.
>
> Signed-off-by: Andrey Korolyov <[email protected]>
> Cc: stable <[email protected]>
> ---
> drivers/usb/serial/ftdi_sio.c | 4 ++++
> drivers/usb/serial/ftdi_sio_ids.h | 2 ++
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
> index d38780f..ddba8e0 100644
> --- a/drivers/usb/serial/ftdi_sio.c
> +++ b/drivers/usb/serial/ftdi_sio.c
> @@ -811,8 +811,12 @@ static const struct usb_device_id id_table_combined[] = {
> .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
> { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID),
> .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
> + { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_TINY_PID),
> + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
While this is how we have handled these devices so far, I think we
should be using USB_DEVICE_INTERFACE_NUMBER() to only bind to the second
of the two interfaces instead (avoids attempting to probe the first
interface).
> { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_H_PID),
> .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
> + { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_TINY_H_PID),
> + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
> { USB_DEVICE(FIC_VID, FIC_NEO1973_DEBUG_PID),
> .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
> { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID),
> diff --git a/drivers/usb/serial/ftdi_sio_ids.h
> b/drivers/usb/serial/ftdi_sio_ids.h
> index 71fb9e5..8157d17 100644
> --- a/drivers/usb/serial/ftdi_sio_ids.h
> +++ b/drivers/usb/serial/ftdi_sio_ids.h
> @@ -882,7 +882,9 @@
> /* Olimex */
> #define OLIMEX_VID 0x15BA
> #define OLIMEX_ARM_USB_OCD_PID 0x0003
> +#define OLIMEX_ARM_USB_TINY_PID 0x0004
> #define OLIMEX_ARM_USB_OCD_H_PID 0x002b
> +#define OLIMEX_ARM_USB_TINY_H_PID 0x002a
And please keep the entries sorted by PID here.
Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html