Re: USB controller driver question

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

 



Hi Vishal, hi all,

On Fri, Oct 9, 2009 at 7:31 AM, Vishal Thanki <vishalthanki@xxxxxxxxx> wrote:
> Hi all,
>
> I am debugging an issue for a USB device (usb wifi dongle from TP-LINK which
> is using Ralink chipset). I am using it on an embedded board running Linux
> 2.6.30 on ARM architecture. The board has USB controller from synopsys, and
> they've provided the driver for the same. The controller has the feature to
> switch between USB speeds (i.e. 1.0 and 2.0). When I configure the USB
> controller in USB 1.0 speed, my USB device (i.e. usb wifi dongle) works
> perfectly fine. But when the USB controller is configured for USB 2.0, the
> device stops working after some time when doing large data transfer at high
> speed.

I think I am experiencing the same problem, on x86 architecture, with
cdc-acm driver, on a device I am developing, using an FPGA connected
to a UTMI from SMSC. In addition to what you describe, the data is
somewhat corrupted at high speeds starting around 5 MB/s. It seems the
device is re-sending a data packet when the host is expecting a new
one. I always assumed it was my fault. Do you observe the same?

> Its not crashing the Linux, but the system becomes non-responsive.

You mean, the device becomes unresponsive? The cdc-acm driver creates
/dev/ttyACM0, from which I can read the data. Re-opening the file
starts the process again, sending data until it arbitrarily stops,
re-open again... Does something like this work for you, too?

> I could capture the USB packets (using analyzer) between controller and device
> and found that there was continuous PING - NAK token exchanges were
> happening. I could re-confirm this scenario by putting some debug prints in
> controller driver. From this observation, I assumed that it may happen that
> device is not able to release the buffers and because of that its sending
> NAK to each incoming PING request. When I reduced the number of PINGs sent
> out by USB controller driver, the device was working fine. Currently I am
> skipping every alternate PING token from controller driver.

How do you limit the number of PINGs sent out? I would like to try that, too.

>
> I want to understand that what should be the ideal frequency to send PING
> tokens. Should it be very aggressive? I searched through the code of ehci
> driver in linux kernel, but could not figure out where the exactly PING
> protocol is implemented in that. Can you please point out the part of source
> code, so that I can look into it and see how it is implemented ?

I would be very much interested in that, too. All I could find in the
kernel source were these measely lines:
$ git grep USB_PID_PING
arch/x86/kernel/early_printk.c:#define USB_PID_PING             0xb4
drivers/usb/core/hcd.h:#define USB_PID_PING                     0xb4
 /* USB 2.0 */

Please let me know if you find a solution.

>
> Thanks,
> Vishal

Thanks,
Henry

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux