Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce459ec1 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman
Browse files

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: default avatarStanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5126a267
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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