Matthew Dharm wrote:
On Sat, Feb 02, 2008 at 12:22:14AM +0100, Robert Spitzenpfeil wrote:
Alan Stern wrote:
On Fri, 1 Feb 2008, Robert Spitzenpfeil wrote:

Alan Stern wrote:
So Robert, this suggests an experiment for you to try.  First remove
the US_FL_FIX_INQUIRY flag in your unusual_devs entry, of course.  But
then edit transport.c, and in usb_stor_Bulk_max_lun() replace the two
lines saying

        usb_stor_clear_halt(us, us->recv_bulk_pipe);
        usb_stor_clear_halt(us, us->send_bulk_pipe);

with a single line saying

        usb_stor_clear_halt(us, us->send_ctrl_pipe);

This should duplicate Windows' actions, except for the two retries. Maybe then the device will work...

IT WORKS.
And just out of curiousity, what happens if you remove the usb_stor_clear_halt() entirely?

still works :-)

What happens if you do all three usb_stor_clear_halt() calls?

Matt

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.



robert





-
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

Reply via email to