Georg Acher wrote:
> > Another question related to this, when i unplug my device, what happens
> > to the queued urb's ?
>
> They are killed, for usb-uhci it's uhci_free_dev which calls this.
> uhci_free_dev itself is called from the hub thread.
ok, found it, but doesn't seem to match the attached trace, or did i
miss anything ?
> > is the completion handler called ?
>
> No, except the urb->transfer_flags have USB_ASYNC_UNLINK set.
hmm. I do not set that flag, but it seems to be called anyway...(
receive_data() )
the status seemed to be set to -EILSEQ ?
mayeb because of the queueing ?
see attached dump.
> > If it isn't, can I still call usb_unlink_urb() on it ?
>
> It should cause no harm, since unlink_urb should only do something if
> urb->status is -EINPROGRESS. This is changed to -ENOENT during the
> disconnect.
So I should not release the memeory myself?
not even when the result is actually -EILSEQ ?
> > If not, then what ?
> >
> > does the completion handler have to return quickly ?
>
> Well, it should, because it is called in interrupt context.
hmm. thought so.
I do memory allocations, some processing/copying and delivering it to a
function which can be called in interrupt context, so i should be safe.
> > ...and one more ;-)
> >
> > i presume the following allows me to queue mulitple urbs for quick data
> > transport ?
> >
> > urb->transfer_flags |= USB_QUEUE_BULK;
>
> Yes, it's experimental in usb-uhci and uhci. So it may work, but may also
> cause unexpected behavior. In both cases, please inform us...
'key.
no ohci support ?
> BTW: Does this happen with usb-uhci AND uhci?
dunno. can't try at the moment.
When i have solved something else, i can try ohci, uhci and usb-uhci,
but now only usb-uhci (I think, must check).
thank you,
J.
<< unplug >>
Apr 11 23:33:35 Infinity kernel: usb-uhci.c: interrupt, status 3, frame# 894
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: TD @ c1e7a860/01E7A860, MaxLen=3f
DT0 EP=7 Dev=3 PID=( IN ) buf=046c6000
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Len=7ff e0 SPD Stalled CRC/Timeo
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Link points to TD @ 01f06460,
Breadth first
Apr 11 23:33:35 Infinity kernel: receive_data entered, got packet c1c6d660 with length
0 an status 0xffffffac
Apr 11 23:33:35 Infinity kernel: usb-uhci.c: interrupt, status 2, frame# 898
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: TD @ c1f06de0/01F06DE0, MaxLen=3f
DT1 EP=7 Dev=3 PID=( IN ) buf=046c7000
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Len=7ff e0 SPD Stalled CRC/Timeo
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Link points to TD @ 01f06e20,
Breadth first
Apr 11 23:33:35 Infinity kernel: receive_data entered, got packet c1c6d160 with length
0 an status 0xffffffac
Apr 11 23:33:35 Infinity kernel: usb-uhci.c: interrupt, status 2, frame# 902
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: TD @ c1d17c00/01D17C00, MaxLen=3f
DT0 EP=7 Dev=3 PID=( IN ) buf=02246000
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Len=7ff e0 SPD Stalled
CRC/Timeo
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Link points to TD @ 01d17c40,
Breadth first
Apr 11 23:33:35 Infinity kernel: receive_data entered, got packet c1c6dc00 with length
0 an status 0xffffffac
Apr 11 23:33:35 Infinity kernel: usb-uhci.c: interrupt, status 2, frame# 906
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: TD @ c1f022a0/01F022A0, MaxLen=3f
DT1 EP=7 Dev=3 PID=( IN ) buf=02247000
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Len=7ff e0 SPD Stalled
CRC/Timeo
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Link points to TD @ 01f022e0,
Breadth first
Apr 11 23:33:35 Infinity kernel: receive_data entered, got packet c1c6d020 with length
0 an status 0xffffffac
Apr 11 23:33:35 Infinity kernel: usb-uhci.c: interrupt, status 2, frame# 910
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: TD @ c1f0dba0/01F0DBA0, MaxLen=3f
DT0 EP=7 Dev=3 PID=( IN ) buf=021f1000
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Len=7ff e0 SPD Stalled CRC/Timeo
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Link points to TD @ 01f0db60,
Breadth first
Apr 11 23:33:35 Infinity kernel: receive_data entered, got packet c1c6d0c0 with length
0 an status 0xffffffac
Apr 11 23:33:35 Infinity kernel: usb-uhci.c: interrupt, status 2, frame# 914
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: TD @ c1f03200/01F03200, MaxLen=3f
DT1 EP=7 Dev=3 PID=( IN ) buf=021f0000
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Len=7ff e0 SPD Stalled CRC/Timeo
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Link points to TD @ 01f03240,
Breadth first
Apr 11 23:33:35 Infinity kernel: receive_data entered, got packet c1c6de80 with length
0 an status 0xffffffac
Apr 11 23:33:35 Infinity kernel: usb-uhci.c: interrupt, status 2, frame# 918
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: TD @ c1f063e0/01F063E0, MaxLen=3f
DT0 EP=7 Dev=3 PID=( IN ) buf=01f49000
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Len=7ff e0 SPD Stalled
CRC/Timeo
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Link points to TD @ 01f06fa0,
Breadth first
Apr 11 23:33:35 Infinity kernel: receive_data entered, got packet c1c6d520 with length
0 an status 0xffffffac
Apr 11 23:33:35 Infinity kernel: usb-uhci.c: interrupt, status 2, frame# 922
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: TD @ c1f0b920/01F0B920, MaxLen=3f
DT1 EP=7 Dev=3 PID=( IN ) buf=01f48000
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Len=7ff e0 SPD Stalled CRC/Timeo
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Link points to TD @ 01f0b8e0,
Breadth first
Apr 11 23:33:35 Infinity kernel: receive_data entered, got packet c1c6df20 with length
0 an status 0xffffffac
Apr 11 23:33:35 Infinity kernel: usb-uhci.c: interrupt, status 2, frame# 926
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: TD @ c1f05240/01F05240, MaxLen=3f
DT0 EP=7 Dev=3 PID=( IN ) buf=02144000
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Len=7ff e0 SPD Stalled CRC/Timeo
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Link points to TD @ 01f05280,
Breadth first
Apr 11 23:33:35 Infinity kernel: receive_data entered, got packet c1c6d2a0 with length
0 an status 0xffffffac
Apr 11 23:33:35 Infinity kernel: usb-uhci.c: interrupt, status 2, frame# 930
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: TD @ c1e48fa0/01E48FA0, MaxLen=3f
DT1 EP=7 Dev=3 PID=( IN ) buf=02145000
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Len=7ff e0 SPD Stalled
CRC/Timeo
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: Link points to TD @ 01e48320,
Breadth first
Apr 11 23:33:35 Infinity kernel: receive_data entered, got packet c1c6d5c0 with length
0 an status 0xffffffac
Apr 11 23:33:35 Infinity kernel: usb-uhci.c: interrupt, status 2, frame# 934
Apr 11 23:33:35 Infinity kernel: usb-uhci-debug.h: TD @ c1f0c080/01F0C080, MaxLen=3f
DT0 EP=7 Dev=3 PID=( IN ) buf=01fb8000
<< reboot >>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]