]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/gadget/file_storage.c
Merge branch 'thermal' into release
[linux-2.6-omap-h63xx.git] / drivers / usb / gadget / file_storage.c
index 93933155e81c66894d35f74976cdb84146bb5c6c..1ab9dac7e12df8eec07e5ed278e48ca90cdd3bc5 100644 (file)
@@ -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
@@ -4182,6 +4186,7 @@ out:
        fsg->state = FSG_STATE_TERMINATED;      // The thread is dead
        fsg_unbind(gadget);
        close_all_backing_files(fsg);
+       complete(&fsg->thread_notifier);
        return rc;
 }