Hi everybody,

I've been trying to find out why my ACR30U Smart Card reader refuses to work 
with the 2.6.7 kernel. I spent a week reading the USB specifications and 
digging through the USB stack code (my host controller is a UHCI, using the 
alternate (JE) driver with both 2.4 and 2.6 kernels).

The device is accessed by sending a CONTROL transaction, and reading the 
results back using an INTERRUPT endpoint.

On the 2.4.27 kernel, I can send a request to the device and get a response. 
The response doesn't seem to be valid, the device stops responding after the 
first request, but at least I get a response.

Here is a dump of the CONTROL transaction, before it gets sent.

[c65950c0] link (00000001) element (065841e4)
  Depth traverse
SETUP: 40 00 00 00 00 00 0a 00
DATA:  02 30 31 30 31 30 30 30
  0: [c65841e0] link (06584214) e3 LS Active Length=0 MaxLen=7 DT0 EndPt=0 
Dev=2, PID=2d(SETUP) (buf=066112c0)
  1: [c6584210] link (06584244) e3 SPD LS Active Length=0 MaxLen=7 DT1 EndPt=0 
Dev=2, PID=e1(OUT) (buf=05dc1000)
  2: [c6584240] link (06584274) e3 SPD LS Active Length=0 MaxLen=1 DT0 EndPt=0 
Dev=2, PID=e1(OUT) (buf=05dc1008)
  3: [c6584270] link (00000001) e3 LS IOC Active Length=0 MaxLen=7ff DT1 
EndPt=0 Dev=2, PID=69(IN) (buf=00000000)

On the 2.6.7 kernel, the CONTROL transaction stalls.

Here is a dump of the CONTROL transaction, before it gets sent:

[c6988240] link (00000001) element (02e99040)
SETUP: 40 00 00 00 00 00 0a 00
DATA:  02 30 31 30 31 30 30 30
  0: [c2e99040] link (02e99080) e3 LS Active Length=0 MaxLen=7 DT0 EndPt=0 
Dev=2, PID=2d(SETUP) (buf=05865c48)
  1: [c2e99080] link (02e990c0) e3 LS Active Length=0 MaxLen=7 DT1 EndPt=0 
Dev=2, PID=e1(OUT) (buf=0705b000)
  2: [c2e990c0] link (02e99100) e3 LS Active Length=0 MaxLen=1 DT0 EndPt=0 
Dev=2, PID=e1(OUT) (buf=0705b008)
  3: [c2e99100] link (00000001) e3 LS IOC Active Length=0 MaxLen=7ff DT1 
EndPt=0 Dev=2, PID=69(IN) (buf=00000000)

And here is a dump of the same transaction, after the Stall condition gets 
detected:

uhci_hcd 0000:00:1f.2: uhci_result_control: failed with status 400000
[c150a240] link (0150a1b2) element (05570080)
SETUP: 40 00 00 00 00 00 0a 00
DATA:  02 30 31 30 31 30 30 30
 Element != First TD
  0: [c5570040] link (05570080) e3 LS Length=7 MaxLen=7 DT0 EndPt=0 Dev=3, 
PID=2d(SETUP) (buf=02497988)
  1: [c5570080] link (055700c0) e3 LS Stalled Length=7 MaxLen=7 DT1 EndPt=0 
Dev=3, PID=e1(OUT) (buf=008ef000)
  2: [c55700c0] link (05570100) e3 LS Active Length=0 MaxLen=1 DT0 EndPt=0 
Dev=3, PID=e1(OUT) (buf=008ef008)
  3: [c5570100] link (00000001) e3 LS IOC Active Length=0 MaxLen=7ff DT1 
EndPt=0 Dev=3, PID=69(IN) (buf=00000000)

The only difference I noticed between 2.4.27 and 2.6.7 is that 2.4.27 sets the 
SPD (Short Packet Detection) flag in OUT packets, while 2.6.7 doesn't. I 
tried forcing 2.6.7 to add the SPD flag. Unfortunately, results are 
identical.

I've added debug code to get as much information as possible from the kernel, 
and I'm now completely stuck. Both kernels send the same requests to the 
device (I've dumped all CONTROL transactions), with the 2.4.27 kernel sending 
a few more GET_DESCRIPTOR requests, but that shouldn't be relevant.

Could anyone point me to something I should investigate ? Why is the behaviour 
so different ?

Thanks in advance for all the help you can provide.

Laurent Pinchart

Attachment: pgp663ZmFXwZY.pgp
Description: signature

Reply via email to