Please CC the mailing list for all messages; otherwise they won't end up in the archives. On Sat, 11 Dec 2010 david.schueler@xxxxxxxxxxxxxxxxxxx wrote: > -----linux-usb-owner@xxxxxxxxxxxxxxx wrote: ----- > > >Anyway, let's start off small. Here's a short patch which hopefully > >will get rid of the BUG you saw, although it may also get rid of most > > > >of the useful information. If this allows you to read the "async" > >file both before and after the hang, we'll move forward from there. > > > >Alan Stern > > Hey Alan > > > > sorry for my late response. I've been in winter holidays :D > > > > Okay, i applied your patch manually, rebooted, started the program for > weather data reading. > > While it hangs i grabbed the files from /sys/kernel/debug/... > > > > Server usb # cat ohci/0000\:00\:02.0/async > > Server usb # cat ohci/0000\:00\:02.0/periodic > > size = 32 > > Server usb # cat ohci/0000\:00\:02.0/registers > > bus pci, device 0000:00:02.0 > > OHCI Host Controller > > ohci_hcd > > OHCI 1.0, NO legacy support registers > > control 0x683 RWE RWC HCFS=operational CBSR=3 > > cmdstatus 0x00000 SOC=0 > > intrstatus 0x00000020 FNO > > intrenable 0x8000005e MIE RHSC UE RD SF WDH > > ed_controlhead 0581f050 > > ed_bulkhead 0581f0a0 > > hcca frame 0x3464 > > fmintvl 0xa7782edf FIT FSMPS=0xa778 FI=0x2edf > > fmremaining 0x800010b1 FRT FR=0x10b1 > > periodicstart 0x2a2f > > lsthresh 0x0700 > > hub poll timer off > > roothub.a 01000206 POTPGT=1 NPS NDP=6(6) > > roothub.b 00000000 PPCM=0000 DR=0000 > > roothub.status 00008000 DRWE > > roothub.portstatus [0] 0x00000103 PPS PES CCS > > roothub.portstatus [1] 0x00000103 PPS PES CCS > > roothub.portstatus [2] 0x00000100 PPS > > roothub.portstatus [3] 0x00000100 PPS > > roothub.portstatus [4] 0x00000100 PPS > > roothub.portstatus [5] 0x00000100 PPS > > > > So the reading of the async file works, but it has still no content. Should > it have some...? Well, no, normally it shouldn't. But then, normally your system wouldn't hang after the program ends. :-) In this case the usbmon information indicates clearly that there should be something in the async file. Here's another patch for you to try (you can keep the previous patch as well). It will produce a lot of log output, so if possible unplug all other USB devices and stop the test program as quickly as you can. Alan Stern Index: usb-2.6/drivers/usb/host/ohci-q.c =================================================================== --- usb-2.6.orig/drivers/usb/host/ohci-q.c +++ usb-2.6/drivers/usb/host/ohci-q.c @@ -165,6 +165,7 @@ static void periodic_link (struct ohci_h static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed) { int branch; + u32 info; ed->state = ED_OPER; ed->ed_prev = NULL; @@ -209,6 +210,10 @@ static int ed_schedule (struct ohci_hcd break; case PIPE_BULK: + info = hc32_to_cpu(ohci, ed->hwINFO); + ohci_info(ohci, "Add ed %p (%d:%d%s) tail %p\n", + ed, info & 0x7f, (info >> 7) & 0xf, + (info & ED_IN) ? "in" : "out", ohci->ed_bulktail); if (ohci->ed_bulktail == NULL) { WARN_ON (ohci->hc_control & OHCI_CTRL_BLE); ohci_writel (ohci, ed->dma, &ohci->regs->ed_bulkhead); @@ -344,6 +349,8 @@ static void ed_deschedule (struct ohci_h break; case PIPE_BULK: + ohci_info(ohci, "Del ed %p prev %p next %p\n", + ed, ed->ed_prev, ed->ed_next); /* remove ED from the HC's list: */ if (ed->ed_prev == NULL) { if (!ed->hwNextED) { -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html