On Wed, 26 Jul 2006, Pete Zaitcev wrote: > On Tue, 25 Jul 2006 17:11:56 -0400 (EDT), Alan Stern <[EMAIL PROTECTED]> > wrote: > > > > + /* > > > + * A timeout could have happened becasue we reloaded and > > > + * inherited a nonzero toggle. And there is no way to know! > > > + * We clear and hope for the best. Bugs 129165, 160308. > > > + */ > > > + US_DEBUGP("clearing after halt for pipe 0x%x\n", pipe); > > > + usb_stor_clear_halt(us, pipe); > > > return USB_STOR_XFER_ERROR; > > > Isn't it true that whenever this error occurs, usb-storage will do a port > > reset? And won't that fix up the toggles for you? > > OK, never mind. This seems not to happen anymore. Maybe something we > do now (in 2.6.18-rc1) resets toggles as a side effect... With that > out of the picture, the attached patch drops that case from the switch.
The port reset is responsible. It resets the toggles along with almost everything else. It has been in usb-storage since ca. 2.6.13. > diff -urp -X dontdiff linux-2.6.18-rc1/drivers/usb/storage/transport.c > linux-2.6.18-rc1-lem/drivers/usb/storage/transport.c > --- linux-2.6.18-rc1/drivers/usb/storage/transport.c 2006-07-09 > 17:54:37.000000000 -0700 > +++ linux-2.6.18-rc1-lem/drivers/usb/storage/transport.c 2006-07-26 > 18:48:15.000000000 -0700 > @@ -294,11 +294,6 @@ static int interpret_urb_result(struct u > return USB_STOR_XFER_ERROR; > return USB_STOR_XFER_STALLED; > > - /* timeout or excessively long NAK */ > - case -ETIMEDOUT: > - US_DEBUGP("-- timeout or NAK\n"); > - return USB_STOR_XFER_ERROR; > - Looks good to me. If there is an actual timeout, the code added by Franck will report it separately. Hence this part isn't needed and should be removed. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel