On Wed, 19 Jan 2005, Vladimir Trukhin wrote:
> >One useful experiment might be disabling the call to halt that
> >endpoint, to see if that makes MS-Windows happier.
> >
> >
>
> That's it!
> That was the source of my problem. But actually it doesn't matter
> whether or not it's a zero length packet. Anyway, the usb controller
> doesn't send a packet if halt has been called (at least, I can't see it
> on Windows side with sniffer).
The controller driver is supposed to return -EAGAIN if it has been asked
to halt an IN endpoint that has data still in the fifo. Take a look at
the halt_bulk_in_endpoint routine in file_storage.c.
> When I disabled halting it passed READ FORMAT CAPACITIES command but
> stopped at some others.
> Unfortunately, I have no time now to debug it deeply.
What were the other commands that caused trouble?
> But with 'removable' option and disabled halting it connects and works
> fine with both Linux and Windows.
> Anyway, for my immediate aim it's more than enough.
>
> By and large, to make it works I just made the following change:
>
> --- file_storage.c 2004-12-25 06:36:01.000000000 +0900
> +++ file_storage.c 2005-01-14 14:18:51.000000000 +0900
> @@ -3714,7 +3714,7 @@
> mod_data.protocol_type = USB_SC_SCSI;
> mod_data.protocol_name = "Transparent SCSI";
>
> - if (gadget_is_sh(fsg->gadget))
> + if (gadget_is_sh(fsg->gadget) || gadget_is_pxa(fsg->gadget))
> mod_data.can_stall = 0;
>
> if (mod_data.release == 0xffff) { // Parameter wasn't set
You don't need to do this. Just use the 'stall=no' module parameter when
the driver is loaded.
> And specified 'removable' option for correct connection to Windows.
You shouldn't need to have 'removable' set; it ought to work okay without
it (unless you need the ability to change the backing file, of course).
Alan Stern
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel