Sorry no.Were you able to test that "interrupt transfers don't queue" case?
Don't know. It's my aura. I attract chaos. ;-)That it would. How are you forcing the controller into that particular rude shutdown path?
It behaves good:
Better would be to just remove the HCD_IS_RUNNING test I highlighted, which will mean that aborting a running controller takes a smidgeon longer than it should ... in just the last frame. Try that and see how it behaves.
Feb 3 23:28:34 snoopy kernel: ehci_hcd 0000:00:10.3: shutdown urb c807f940 pipe 40408180 ep1in-intr
Feb 3 23:28:34 snoopy kernel: usb usb4: unregistering interface 4-0:1.0
Feb 3 23:28:34 snoopy kernel: usb usb4: hcd_unlink_urb c807f940 fail -22
Feb 3 23:28:34 snoopy kernel: drivers/usb/core/usb.c: usb_hotplug
Feb 3 23:28:34 snoopy kernel: usb usb4: unregistering device
Feb 3 23:28:34 snoopy kernel: drivers/usb/core/usb.c: usb_hotplug
Feb 3 23:28:34 snoopy kernel: ehci_hcd 0000:00:10.3: stop
Feb 3 23:28:34 snoopy kernel: ehci_hcd 0000:00:10.3: reset command 01000b (park)=0 ithresh=1 period=256 Reset RUN
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=928,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=936,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=944,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=952,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=960,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=968,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=976,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=984,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=992,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=1000,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=1008,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=1016,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=1024,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=1032,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=1040,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=1048,running=0
...
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=824,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=832,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=840,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=848,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=856,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=864,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=872,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=880,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=888,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=896,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=904,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=912,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=920,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=921,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=922,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=923,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=924,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=925,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=926,running=0
Feb 3 23:28:34 snoopy kernel: clock=927,now_uframe=927,running=0
Feb 3 23:28:34 snoopy kernel: ehci_hcd 0000:00:10.3: irq normal 8936 err 0 reclaim 7 (lost 0)
Feb 3 23:28:34 snoopy kernel: ehci_hcd 0000:00:10.3: complete 8932 unlink 4
Feb 3 23:28:34 snoopy kernel: ehci_hcd 0000:00:10.3: ehci_stop completed status 1000 Halt
Feb 3 23:28:34 snoopy kernel: ehci_hcd 0000:00:10.3: USB bus 4 deregistered
scan_periodic (struct ehci_hcd *ehci, struct pt_regs *regs)
{
unsigned frame, clock, now_uframe, mod;
unsigned modified;mod = ehci->periodic_size << 3;
/*
* When running, scan from last scan point up to "now"
* else clean up by scanning everything that's left.
* Touches as few pages as possible: cache-friendly.
*/
now_uframe = ehci->next_uframe;
if (HCD_IS_RUNNING (ehci->hcd.state))
clock = readl (&ehci->regs->frame_index);
else
clock = now_uframe + mod - 1;
clock %= mod; for (;;) {
union ehci_shadow q, *q_p;
u32 type, *hw_p;
unsigned uframes; printk("clock=%d,now_uframe=%d,running=%d\n",
clock,now_uframe,
HCD_IS_RUNNING (ehci->hcd.state)); /* don't scan past the live uframe */
frame = now_uframe >> 3;
if ((frame == (clock >> 3)))
// && HCD_IS_RUNNING (ehci->hcd.state))
uframes = now_uframe & 0x07;
else {
/* safe to scan the whole frame at once */
now_uframe |= 0x07;
uframes = 8;
}restart:
/* scan each element in frame's queue for completions */
q_p = &ehci->pshadow [frame];
hw_p = &ehci->periodic [frame];
q.ptr = q_p->ptr;
type = Q_NEXT_TYPE (*hw_p);/Bernd
- Dave
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
