On Friday 19 May 2006 10:34 am, Alan Stern wrote: > Dave: > > While trying to test some changes to the ISO handling in uhci-hcd, I ran > across a whole mess of bugs. > > Easy one first: The ISO tests in usbtest don't report > errors! test_iso_queue() will return 0 even if all the > URBs fail. Not so good for testing purposes.
Whoops. They don't get much use, this might explain some of it... though I recall there being a tradeoff, since it's legit for ISO transfers to fail and thus hard to see what faults were actual test failures. > Intermediate ones: In inode.c, ep_aio_complete() assumes > that iocb->ki_retry will be set for reads and will be NULL > for writes. But it isn't; the aio core sets default values > for ki_retry always. I suspect this was an API change in the AIO core ... they've rewhacked the "retry" logic a few times since that code was written, and I didn't have time to track what changed. Several of the changes didn't make much sense to me, but then I was thinking more about real I/O queues than about having that API be a front end to the block framework (which has its own I/O queues). > Even when that is fixed, the call to kick_iocb() (in the same > routine) doesn't seem to do anything. ep_aio_read_retry() > does not get invoked and the pending aio requests never > terminate. See above re incompatible AIO changes... this would explain some of the odd behavior I saw last time I tried to use the AIO stuff. > Hard one: When DMA is enabled in net2280, the first ISO > request submitted by the gadget driver (an IN transfer) > completes immediately. Even though the host hasn't tried > to do any I/O. When DMA is disabled this doesn't happen. This is a problem how? The completion callbacks are specified so it's OK to report completion when the IN fifo fills ... that helps make sure drivers have the opportunity to keep the hardware busy. The PIO code paths sometimes give more "precise" reporting, but that's optional. > I might be able to work on the aio problem, except that I have no idea how > the kernel's aio facility is meant to work. Is there any documentation > for it? Not that's any good. Read the OLS presentations. I think the AIO mailing list is dead, but the changelogs for those kernel files may help. There have been discussions (and patches) aimed at merging AIO and vector I/O. This is a case where unfortunately the code is too much of the documentation. You should grab a copy of libaio and look at it from that end first though. It's the best way to get an overview of what the kernel should do: looking at the userspace API. It doesn't use the standard syscall model, note; it uses the SMP-friendly "code = call()" syntax, instead of having glue split the code into a positive return value vs errno. - Dave > Alan Stern > ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel