Ok, I'm completely stumped on a problem and thought I'd see if anyone
has seen this or might have an idea why it's happening.

I (unfortunately) have to use an older kernel (2.4.2-2, i.e. Redhat
7.1) and on both UHCI drivers (uhci.o and usb-uhci.o) I'm seeing what
looks like the HCD is "losing" data at certain points.  It happens
for both uhci.o and usb-uhci.o; I see this happen on the kernel.org
kernels up to 2.4.9 (usb-uhci) and 2.4.12 (uhci) - after that things
work.

I have a device (Retail receipt printer) which sends back status on an
interrupt-in pipe.  I have a bus tracer hooked up.  I run a certain
test case which at one point waits for the printer to send status (on
the interrupt pipe).  The test case hangs, so I bus traced it, and the
tracer shows the data successfully coming over the wire - but the HCD
never gets it.  I put debugging into the interrupt handler of uhci.o,
and the TD never gets any of its data (urbp->transfer_buffer) or
control bits (td->status) changed.  There is one hardware interrupt
where I expect the interrupt data (i.e. after the control data
completes) but none of the interrupt TDs are changed - all have
0x00 data and the same control bits.  And, an interesting addition is,
this only happens when there are URBs queued (this is using BULK URB
on interrupt pipes) - if there is only 1 URB it doesn't happen (but of
course there is a sizable gap where no polling is done between the
completion of one URB and the submission of the next - usually about
30ms).

Has anyone seen anything like this or have any ideas why this would
happen?  I looked at USB diffs from 2.4.9->2.4.10 (and 2.4.12->2.4.13)
but couldn't see anything that looked like it would be causing this.

It seems to be hardware independent, it happens on USB controllers
from VIA and Intel (systems are ThinkPad T21 and SurePOS 730 and
750 which are custom Retail systems).

Below is a short section of the debugging log that may help show the
problem.  The last hardware interrupt section should (according to bus
trace) show the TD as containing data and with different status bits.
No more hardware interrupts are generated (since no more data flows)
in this case but I can create more bus traffic which does show up,
meaning the single interrupt-in packet is completely lost.

Thanks!

The UHCI INTERRUPT is in uhci_interrupt() at the beginning
Each RESULT-interrupt MARKER is in the while loop of uhci_result_interrupt and shows 
each TD's contents (only if !urbp->queued).
I did try showing all TDs, including urbp->queued ones, but the queued ones never 
changed (as expected) so I filter them out.
Note in this case that the pipe in question is c0010a80, and the TD which should get 
data is c1f55000.

Jun 20 13:42:41 install kernel: uhci.c: UHCI INTERRUPT end of frame with data
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe 40408880 td 
c273f000 tdstatus 18807ff tdinfo 88869 data 0x10
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe 40408980 td 
c0f93000 tdstatus 18807ff tdinfo 88969 data 0x10
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008a80 td 
c0baa000 tdstatus 398807ff tdinfo e08a69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0010a80 td 
c1e2b000 tdstatus 1900000f tdinfo 1e90a69 data 0x01 0x06 0x00 0x00 0x00 0x08 0x4f 0x00 
0x37 0x20 0x00 0x28 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: uhci_result_interrupt/bulk: finished TD with 
length 16 data 0x01 0x06 0x00 0x00 0x00 0x08 0x4f 0x00 0x37 0x20 0x00 0x28 0x00 0x00 
0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0010a80 td 
c1f55000 tdstatus 398807ff tdinfo 1e90a69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008b80 td 
c17a6000 tdstatus 398807ff tdinfo e08b69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0010b80 td 
c0af1000 tdstatus 398807ff tdinfo e10b69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008c80 td 
c0369000 tdstatus 398807ff tdinfo e88c69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0018c80 td 
c2b01000 tdstatus 398807ff tdinfo e18c69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: usbdevfs: async_completed: status 0 errcount 0 actlen 
16 pipe 0xc0010a80 data  0x01 0x06 0x00 0x00 0x00 0x08 0x4f 0x00 0x37 0x20 0x00 0x28 
0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: UHCI INTERRUPT end of frame with data
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe 40408880 td 
c273f000 tdstatus 18807ff tdinfo 88869 data 0x10
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe 40408980 td 
c0f93000 tdstatus 18807ff tdinfo 88969 data 0x10
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008a80 td 
c0baa000 tdstatus 398807ff tdinfo e08a69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0010a80 td 
c1f55000 tdstatus 398807ff tdinfo 1e90a69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008b80 td 
c17a6000 tdstatus 398807ff tdinfo e08b69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0010b80 td 
c0af1000 tdstatus 398807ff tdinfo e10b69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008c80 td 
c0369000 tdstatus 398807ff tdinfo e88c69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:41 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0018c80 td 
c2b01000 tdstatus 398807ff tdinfo e18c69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: uhci.c: UHCI INTERRUPT end of frame with data
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe 40408880 td 
c273f000 tdstatus 18807ff tdinfo 88869 data 0x10
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe 40408980 td 
c0f93000 tdstatus 18807ff tdinfo 88969 data 0x10
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008a80 td 
c0baa000 tdstatus 398807ff tdinfo e08a69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0010a80 td 
c1f55000 tdstatus 398807ff tdinfo 1e90a69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008b80 td 
c17a6000 tdstatus 398807ff tdinfo e08b69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0010b80 td 
c0af1000 tdstatus 398807ff tdinfo e10b69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008c80 td 
c0369000 tdstatus 398807ff tdinfo e88c69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0018c80 td 
c2b01000 tdstatus 398807ff tdinfo e18c69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: usbdevfs: async_completed: status 0 errcount 0 actlen 
10 pipe 0x80000a00 data  0x01 0x07 0x00 0x01 0x00 0x00 0x00 0x10 0x05 0x31
Jun 20 13:42:43 install kernel: uhci.c: UHCI INTERRUPT end of frame with data
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe 40408880 td 
c273f000 tdstatus 18807ff tdinfo 88869 data 0x10
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe 40408980 td 
c0f93000 tdstatus 18807ff tdinfo 88969 data 0x10
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008a80 td 
c0baa000 tdstatus 398807ff tdinfo e08a69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0010a80 td 
c1f55000 tdstatus 398807ff tdinfo 1e90a69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008b80 td 
c17a6000 tdstatus 398807ff tdinfo e08b69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0010b80 td 
c0af1000 tdstatus 398807ff tdinfo e10b69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0008c80 td 
c0369000 tdstatus 398807ff tdinfo e88c69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Jun 20 13:42:43 install kernel: uhci.c: RESULT-interrupt MARKER pipe c0018c80 td 
c2b01000 tdstatus 398807ff tdinfo e18c69 data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00




-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to