Re: Problem when USB hub is inserted

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

 



On Wed, 26 May 2010, Alessio Sangalli wrote:

> Hi; I have noticed the following problem today, and I hope I can get 
> some hints on how to proceed.
> 
> Environment: I am running on an ARM926EJ@333MHz board. Right now I am 
> stuck with Linux 2.6.27, porting to the latest kernel is going on, but 
> it is not operational at the moment.
> 
> I have a device (an I2S interface) that generates something like 5000+ 
> interrupts per second. All is good - until I plug a USB 2.0 hub in a USB 
> port with a mouse and/or a keyboard attached. At that point, my I2S 
> interface suffers massive buffer underruns. Note that when I actually 
> move the mouse or use the keyboard there are *less* underruns, the 
> situation gets better!
> 
> With kernel 2.6.19 I did *not* have any of these problems.

Can you do a bisection search between those two kernels to find out
where the problems start to appear?

> After some trial and error, I found out that commenting out the 
> following code, the underruns are virtually gone AND USB is functional, 
> even if performance (ie copying data from a memory stick) are 4 times 
> worse. The piece of code is:
> 
> v2.6.27 drivers/usb/host/ehci-q.c qh_completions() lines 403-410
> 
> if (last_status == -EINPROGRESS) {
> 	last_status = qtd_copy_status(ehci, urb,
> 			qtd->length, token);
> 		if (last_status == -EREMOTEIO
> 			&& (qtd->hw_alt_next
> 				& EHCI_LIST_END(ehci)))
> 			last_status = -EINPROGRESS;
> }

I'm surprised you were able to get anything to work at all with that 
code removed.  The qtd_copy_status() routine is where the driver 
determines how many bytes were transferred between the computer and the 
device.  Without it, the computer would think no data was getting 
transferred.  That routine is also where communication errors are 
detected and reported.

> Any idea what can it be?

Does your I2S interface share the same IRQ line as the EHCI controller?  
That could explain a lot.  (But not why 2.6.19 behaved differently from 
2.6.27.)

Alan Stern

--
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