On Mon, Aug 18, 2003 at 02:14:24PM -0400, Alan Stern wrote:
> On Mon, 18 Aug 2003, Matthias Bruestle wrote:
> 
> > Somewhere inside a program run, when waiting for the interrupt data:
> > 
> > HC status
> >   usbcmd    =     00c1   Maxp64 CF RS
> >   usbstat   =     0000
> >   usbint    =     000f
> >   usbfrnum  =   (0)194
> >   flbaseadd = 03848194
> >   sof       =       40
> >   stat1     =     0095   PortEnabled PortConnected
> >   stat2     =     0095   PortEnabled PortConnected
> > Frame List
> > Skeleton QH's
> > - skel_int4_qh
> >     [c3858240] link (03858122) element (03859030)
> >       0: [c3859030] link (00000001) e3 SPD IOC Active NAK Length=7ff MaxLen=f DT0 
> > EndPt=1 Dev=5, PID=69(IN) (buf=05a5f520)
> > 
> > In the second program run, the Active for Int IN is always set when an
> > interrupt occures.
> 
> The NAK flag above means that the HC issued the Intr IN request and the 
> device replied with a NAK.  That would explain the packets you see going 
> across the wire.  But why would the device NAK?  For some reason, it must 
> not have any interrupt data available.  Or maybe there's a problem with 
> the maxpacket size? -- the request is asking to transfer a 16-byte packet.
> 
> My guess would be that in your unsuccessful run, something isn't getting 
> initialized correctly and as a result the device doesn't queue any 
> interrupt data.

The Int IN is issued from the PC every 4 or 8 ms (can't remember). In an
unsuccessful run, the device does allways response with NAK with one exception,
where it sends data to the PC. I want to get this data, which I do correctly
on the first run (or with 2.4.20 or 2.5.3x), but not here.

Some debug output from the kernel:

(Comments with "(eZ)" are added by me to the kernel.)

<7>drivers/usb/serial/usb-serial.c: serial_write - port 0, 7 byte(s)

The write sends a command to the reader. After that a Int IN answer from the
reader is expected to signal the availability of the response data.

<7>drivers/usb/serial/cyberjack.c: cyberjack_write - port 0
<7>drivers/usb/serial/cyberjack.c: cyberjack_write - from_user 1
<7>drivers/usb/serial/cyberjack.c: cyberjack_write - length = 7, data = 00 04 00 e2 c1 
00 23
<7>drivers/usb/serial/cyberjack.c: cyberjack_write - expected data: 7
<7>drivers/usb/serial/cyberjack.c: cyberjack_write - transmitting data (frame 1)
<7>drivers/usb/serial/cyberjack.c: cyberjack_write - priv->wrsent=7
<7>drivers/usb/serial/cyberjack.c: cyberjack_write - priv->wrfilled=7
<7>drivers/usb/serial/cyberjack.c: cyberjack_write - buffer cleaned
<7>drivers/usb/serial/usb-serial.c: serial_chars_in_buffer = port 0
<7>drivers/usb/serial/generic.c: usb_serial_generic_chars_in_buffer - port 0
<7>drivers/usb/serial/generic.c: usb_serial_generic_chars_in_buffer - returns 7

Interrupt

<7>drivers/usb/host/uhci-hcd.c: uhci_irq(), pipe=40408280 (eZ)
<7>drivers/usb/host/uhci-hcd.c: uhci_transfer_result/A: pipetype:40408280 (eZ)

The first in the queue is the Int IN running.

<4>[c3792240] link (03792122) element (03793030)
<4>  0: [c3793030] link (00000001) e3 SPD IOC Active NAK Length=7ff MaxLen=f DT1 
EndPt=1 Dev=2, PID=69(IN) (buf=05d2dac0)
<4>
<7>drivers/usb/host/uhci-hcd.c: uhci_result_common() entered (eZ)
<7>drivers/usb/host/uhci-hcd.c: uhci_irq(), pipe=C0010200 (eZ)
<7>drivers/usb/host/uhci-hcd.c: uhci_transfer_result/A: pipetype:C0010200 (eZ)

The second is the response to the write...

<4>[c3792270] link (03792212) element (00000001)
<4> Element != First TD
<4>  0: [c3793060] link (00000001) e3 SPD IOC Length=6 MaxLen=6 DT0 EndPt=2 Dev=2, 
PID=e1(OUT) (buf=067b8560)
<4>
<7>drivers/usb/host/uhci-hcd.c: uhci_result_common() entered (eZ)
<7>drivers/usb/host/uhci-hcd.c: uhci_transfer_result/B: pipetype:C0010200 vorm 
anfassen (eZ)
<7>drivers/usb/core/hcd.c: usb_hcd_giveback_urb is grufa wordn. (eZ)

... initiating a call to the write callback

<7>drivers/usb/serial/cyberjack.c: cyberjack_write_bulk_callback - port 0

Now we are waiting for the Int IN response which traves over the USB cable to the
PC as can be seen with the analyzer ....

<7>drivers/usb/host/uhci-hcd.c: uhci_irq(), pipe=40408280 (eZ)
<7>drivers/usb/host/uhci-hcd.c: uhci_transfer_result/A: pipetype:40408280 (eZ)a

No data.

<4>[c3792240] link (03792122) element (03793030)
<4>  0: [c3793030] link (00000001) e3 SPD IOC Active NAK Length=7ff MaxLen=f DT1 
EndPt=1 Dev=2, PID=69(IN) (buf=05d2dac0)
<4>
<7>drivers/usb/host/uhci-hcd.c: uhci_result_common() entered (eZ)
<7>drivers/usb/serial/usb-serial.c: usb_serial_port_softint - port 0
<7>drivers/usb/host/uhci-hcd.c: uhci_irq(), pipe=40408280 (eZ)
<7>drivers/usb/host/uhci-hcd.c: uhci_transfer_result/A: pipetype:40408280 (eZ)

Again no data.

<4>[c3792240] link (03792122) element (03793030)
<4>  0: [c3793030] link (00000001) e3 SPD IOC Active NAK Length=7ff MaxLen=f DT1 
EndPt=1 Dev=2, PID=69(IN) (buf=05d2dac0)
<4>
<7>drivers/usb/host/uhci-hcd.c: uhci_result_common() entered (eZ)

So what is wrong?

I expected something like:

<7>drivers/usb/host/uhci-hcd.c: uhci_irq(), pipe=40408280 (eZ)
<7>drivers/usb/host/uhci-hcd.c: uhci_transfer_result/A: pipetype:40408280 (eZ)
<4>[c3792240] link (03792122) element (03793030)
<4>  0: [c3793030] link (00000001) e3 SPD IOC Length=3 MaxLen=f DT0 EndPt=1 Dev=2, 
PID=69(IN) (buf=05d2dac0)
<4>
<7>drivers/usb/host/uhci-hcd.c: uhci_result_common() entered (eZ)
<7>drivers/usb/host/uhci-hcd.c: uhci_transfer_result/B: pipetype:40408280 vorm 
anfassen (eZ)
<7>drivers/usb/core/hcd.c: usb_hcd_giveback_urb is grufa wordn. (eZ)
<7>drivers/usb/serial/cyberjack.c: cyberjack_read_int_callback - port 0
<7>drivers/usb/serial/cyberjack.c: cyberjack_read_int_callback - length = 4, data = 01 
02 04 00
<7>drivers/usb/serial/cyberjack.c: cyberjack_read_int_callback - rdtodo: 7
<7>drivers/usb/serial/cyberjack.c: cyberjack_read_int_callback - usb_submit_urb(read 
urb)
<7>drivers/usb/serial/cyberjack.c: cyberjack_read_int_callback - usb_submit_urb(int 
urb)


Mahlzeit
endergone Zwiebeltuete



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to