On Sat, 2 Feb 2008, Robert Spitzenpfeil wrote: > if I understand right you wanted me to make my system mimic this: > > Loop 3 times { > Get-Max-LUN => STALL > clear-halt(ep0) > } > > I don't know how to hack usb-storage to run this very loop (lack of > knowledge / understanding of the inner workings). > Usually I just have to deal with perl/bash and not c/c++. > > the closest thing I could manage was to activate these subroutines > within transport.c: > > if (result == -EPIPE) { > /* > * usb_stor_clear_halt(us, us->recv_bulk_pipe); > * usb_stor_clear_halt(us, us->send_bulk_pipe); > */ > > /* sb_stor_clear_halt(us, us->send_ctrl_pipe); */ > > usb_stor_clear_halt(us, us->recv_bulk_pipe); /* A */ > usb_stor_clear_halt(us, us->send_bulk_pipe); /* B */ > usb_stor_clear_halt(us, us->send_ctrl_pipe); /* C */ > } > > > combinations of ABC: (order not changed, no multiple runs, A = A was > executed, a = A was not executed): > > * abc : OK > * Abc : FAILS > * aBc : OK > * abC : OK > * aBC : OK > * ABc : FAILS > * AbC : FAILS > * ABC : FAILS > > so for this order running A is the killer.
That's impressively thorough testing! IMO this indicates we shouldn't issue any clear-halts at all unless the device actually needs it. In general it's not a good idea to do a clear-halt for an endpoint that isn't actually halted; devices are prone to misinterpret the request. And since the only device we know of that does need the clear-halts is long obsolete, the simplest strategy is just to leave them out. That ancient ZIP-100 drive can be accomodated by adding a US_FL_SINGLE_LUN flag for it, since the Get-Max-LUN is never issued when that flag is set. Alan Stern - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html