diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2009-02-25 00:19:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-02-28 01:40:50 +0300 |
commit | ce459ec1d278b19be8e0719dbfd47dd1d6687bfb (patch) | |
tree | c9e32a817372e53656f45aefe9470ce1c329e681 /drivers/usb/gadget/file_storage.c | |
parent | 5126a2674ddac0804450f59da25a058cca629d38 (diff) | |
download | linux-ce459ec1d278b19be8e0719dbfd47dd1d6687bfb.tar.xz |
USB: g_file_storage: automatically disable stalls under Atmel
This patch (as1220) automatically disables stalls when g_file_storage
finds itself running with an Atmel device controller, because the
Atmel hardware/driver isn't capable of halting bulk endpoints
correctly.
Reported-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/file_storage.c')
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index b10fa31cc915..1ab9dac7e12d 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -3879,7 +3879,11 @@ static int __init check_parameters(struct fsg_dev *fsg) mod_data.protocol_type = USB_SC_SCSI; mod_data.protocol_name = "Transparent SCSI"; - if (gadget_is_sh(fsg->gadget)) + /* Some peripheral controllers are known not to be able to + * halt bulk endpoints correctly. If one of them is present, + * disable stalls. + */ + if (gadget_is_sh(fsg->gadget) || gadget_is_at91(fsg->gadget)) mod_data.can_stall = 0; if (mod_data.release == 0xffff) { // Parameter wasn't set |