• Andy Shevchenko's avatar
    USB: gadget: storage: optional SCSI WRITE FUA bit · a93917d3
    Andy Shevchenko authored
    MS Windows mounts removable storage in "Removal optimized mode" by
    default. All the writes to the media are synchronous which is achieved
    by setting FUA (Force Unit Access) bit in SCSI WRITE(10,12) commands.
    This prevents I/O requests aggregation in block layer dramatically
    decreasing performance.
    
    This patch brings an option to accept or ignore mentioned bit
     a) via specifying module parameter "nofua", or
     b) through sysfs entry
    	/sys/devices/platform/_UDC_/gadget/gadget-lunX/nofua
    	(_UDC_ is the name of the USB Device Controller driver)
    
    Patch is based on the work that was done by Denis Karpov for Maemo 5
    platform.
    Signed-off-by: default avatarAndy Shevchenko <ext-andriy.shevchenko@nokia.com>
    Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Cc: Denis Karpov <ext-denis.2.karpov@nokia.com>
    Cc: Adrian Hunter <adrian.hunter@nokia.com>
    Cc: David Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    a93917d3
storage_common.c 22.1 KB