On Tue, 2 Mar 2004, David Brownell wrote: > > Hm, obviously I've missed something - since the completion callback is > > called from the interrupt, my understanding is at least on UP the only > > thing we could race with is the HC itself. But why would a delay in the > > completion callback help then - my assumption is all the critical stuff is > > done before the HCD decides to giveback the urb? > > It should be. But there's a short-cut that OHCI has taken > forever (2.2 usb-ohci does it!!), leaving a short window where > the HCD thinks the HC isn't using an ED ... wrongly. And into > that window can sneak confusion, unless a delay closes it first. > > The patch I just posted stops taking that short-cut, and > forces the two to be always in sync. "Obviously correct", > unlike the previous logic.
See my other posting. > > So far I've tried with ohci_hcd and a slightly modified version of > > usbtest. No luck however with ehci_hcd. First I got nothing but ENOSYS > > because the split-iso support is disabled in 2.6.4-rc1. Enabling it didn't > > help because it didn't build due to some missing sitd_* functions. I guess > > I'd need some patches? > > Yes, this one is queued for after 2.6.4 freezes: > > http://marc.theaimsgroup.com/?l=linux-usb-devel&m=107790500929613&w=2 Ok, thanks - this was doing the trick! Looks good - it seems it's basically working. Not much detailed testing so far, but it passes test15. You said it should work for ISO-OUT, so I assume the ENOMEM-failure of test16 is within expectations? I had some debugging on the ezusb, so at least I know it was actually receiving the iso-out data with correct crc. But I haven't checked for synchronisation and data correctness. Details below. Martin --------------- * this NEC-EHCI PCI: Found IRQ 11 for device 0000:00:0c.2 PCI: Sharing IRQ 11 with 0000:00:0a.0 ehci_hcd 0000:00:0c.2: EHCI Host Controller ehci_hcd 0000:00:0c.2: irq 11, pci mem cd050000 ehci_hcd 0000:00:0c.2: new USB bus registered, assigned bus number 1 ehci_hcd 0000:00:0c.2: USB 2.0 enabled, EHCI 0.95, driver 2003-Dec-29 hub 1-0:1.0: USB hub found hub 1-0:1.0: 5 ports detected usb 1-4: new high speed USB device using address 2 hub 1-4:1.0: USB hub found hub 1-4:1.0: 4 ports detected * usbtest driver load and test device connected drivers/usb/core/usb.c: registered new driver usbtest usb 1-4.4: new full speed USB device using address 4 ehci_hcd 0000:00:0c.2: qh cb0ac200 (#0) state 1 usbtest 1-4.4:1.0: usb test device usbtest 1-4.4:1.0: full speed {control in/out bulk-in bulk-out iso-in iso-out} tests (+alt) * current topology /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=Host/5p, 480M |__ Port 4: Dev 2, If 0, Class=hub, Driver=hub/4p, 480M |__ Port 4: Dev 4, If 0, Class=vend., Driver=usbtest, 12M |__ Port 4: Dev 4, If 0, Class=vend., Driver=usbtest, 12M * test firmware personality T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=ff MxPS=64 #Cfgs= 1 P: Vendor=fff0 ProdID=fff0 Rev= 0.01 S: Manufacturer=Martin Diehl S: Product=USB-Test S: SerialNumber=2004-03-02 C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=00 Prot=00 Driver=usbtest I: If#= 0 Alt= 1 #EPs= 4 Cls=ff(vend.) Sub=01 Prot=00 Driver=usbtest E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=88(I) Atr=01(Isoc) MxPS= 512 Ivl=1ms E: Ad=08(O) Atr=01(Isoc) MxPS= 512 Ivl=1ms * ./testusb -a -g 8 -v 0 /proc/bus/usb/001/004 test 0, 0.000046 secs /proc/bus/usb/001/004 test 1, 1.000703 secs /proc/bus/usb/001/004 test 2, 1.000626 secs /proc/bus/usb/001/004 test 5, 6.784527 secs /proc/bus/usb/001/004 test 6, 6.687679 secs /proc/bus/usb/001/004 test 9, 3.558065 secs /proc/bus/usb/001/004 test 10, 1.502038 secs /proc/bus/usb/001/004 test 11, 4.030243 secs /proc/bus/usb/001/004 test 12, 4.032602 secs /proc/bus/usb/001/004 test 13, 9.206410 secs /proc/bus/usb/001/004 test 14, 4.012137 secs /proc/bus/usb/001/004 test 15, 8.008405 secs /proc/bus/usb/001/004 test 16 --> 12 (error 12) * corresponding syslog usbtest 1-4.4:1.0: TEST 0: NOP usbtest 1-4.4:1.0: TEST 1: write 512 bytes 1000 times usbtest 1-4.4:1.0: TEST 2: read 512 bytes 1000 times usbtest 1-4.4:1.0: TEST 5: write 1000 sglists 8 entries of 512 bytes usbtest 1-4.4:1.0: TEST 6: read 1000 sglists 8 entries of 512 bytes usbtest 1-4.4:1.0: TEST 9: ch9 (subset) control tests, 1000 times usbtest 1-4.4:1.0: TEST 10: queue 8 control calls, 1000 times usbtest 1-4.4:1.0: TEST 11: unlink 1000 reads of 512 usbtest 1-4.4:1.0: TEST 12: unlink 1000 writes of 512 usbtest 1-4.4:1.0: TEST 13: set/clear 1000 halts usbtest 1-4.4:1.0: TEST 14: 1000 ep0out, 0..512 vary 0 usbtest 1-4.4:1.0: TEST 15: write 1000 iso, 8 entries of 512 bytes usbtest 1-4.4:1.0: ... iso period 1 frames, wMaxPacket 0200 usbtest 1-4.4:1.0: ... total 8000 msec (8000 packets) usbtest 1-4.4:1.0: TEST 16: read 1000 iso, 8 entries of 512 bytes usbtest 1-4.4:1.0: ... iso period 1 frames, wMaxPacket 0200 usbtest 1-4.4:1.0: ... total 8000 msec (8000 packets) usbtest 1-4.4:1.0: submit iso[0], error -12 ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel