Re: [CDC-ACM] Linux USB "Reduced" CDC-ACM driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Donnerstag 23 April 2009 14:49:38 schrieb Vincent:

> This firmware has been mostly written for beeing used under Windows XP, and
> for compatibility reasons it only exports 1 interface ( kind of merged DATA
> and COMM interface ).
>
> The actual Linux CDC-ACM driver is waiting for 2 interfaces ( 1 for DATA
> and 1 for COMM ), so, the eZ430u tool does'nt work with Linux.

The spec says that a device has to have at least two interfaces.
But we live in the real world and want to support as much hardware
as cleanly possible.

> More-over, with this patch, even if now the tool "is working", I loose some
> bytes from time to time (only for the Reception, Transmition is ok), which
> is actually a real problem. This seem to be a driver issue, since I don't
> loose any data when using the tool on Windows.

Get a usbmon trace showing a loss of data.

> Could you please tell me if you're interested in patching the Linux CDC-ACM
> driver for backward compatibility ? Could you please have a glance at my
> patch and give me some feedbacks ?
>
>
> Thanks.
>
> *** linux-orig/drivers/usb/class/
> cdc-acm.c    2009-01-22 06:00:07.000000000 -0500
> --- linux-new/drivers/usb/class/cdc-acm.c    2009-04-17 05:00:22.000000000
> -0400 ***************
> *** 445,450 ****
> --- 445,452 ----
>           list_del(&buf->list);
>
>           rcv->buffer = buf;
> +             if (acm->dev->quirks == TI_EZ430U)
> +                     rcv->urb->interval = 0xFF;

This is a separate issue. Please define a separate quirk for it. What happens
if you don't do this?

>           usb_fill_bulk_urb(rcv->urb, acm->dev,
>                     acm->rx_endpoint,
> ***************
> *** 916,922 ****
>       num_rx_buf = (quirks == SINGLE_RX_URB) ? 1 : ACM_NR;
>
>       /* handle quirks deadly to normal probing*/
> -     if (quirks == NO_UNION_NORMAL) {
>           data_interface = usb_ifnum_to_if(usb_dev, 1);
>           control_interface = usb_ifnum_to_if(usb_dev, 0);
>           goto skip_normal_probe;
> --- 918,924 ----
>       num_rx_buf = (quirks == SINGLE_RX_URB) ? 1 : ACM_NR;
>
>       /* handle quirks deadly to normal probing*/
> +     if (quirks == NO_UNION_NORMAL || quirks == TI_EZ430U) {
>           data_interface = usb_ifnum_to_if(usb_dev, 1);
>           control_interface = usb_ifnum_to_if(usb_dev, 0);

Maybe I am dense, but this supposes that you have two interfaces.
It seems to me we have some kind of misunderstanding. Could you please
1. post "lsusb -v" for your device?
2. Repost the patch made with "diff -up"?

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux