From: Alan Stern on
On Thu, 22 Jul 2010, Andy Shevchenko wrote:

> 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/musb_hdrc/gadget/gadget-lun-X/nofua
>
> Patch is based on the work that was done by Denis Karpov for Maemo 5
> platform.
>
> Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko(a)nokia.com>
> Cc: Denis Karpov <ext-denis.2.karpov(a)nokia.com>
> Cc: Adrian Hunter <adrian.hunter(a)nokia.com>
> Cc: Alan Stern <stern(a)rowland.harvard.edu>
> Cc: David Brownell <dbrownell(a)users.sourceforge.net>
> Cc: Greg Kroah-Hartman <gregkh(a)suse.de>
> Cc: linux-usb(a)vger.kernel.org
> ---
> .../sysfs-devices-platform-musb_hdrc-gadget | 12 +++++++
> drivers/usb/gadget/file_storage.c | 31 +++++++++++++++----
> drivers/usb/gadget/storage_common.c | 28 ++++++++++++++++++
> 3 files changed, 64 insertions(+), 7 deletions(-)
> create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-musb_hdrc-gadget
>
> diff --git a/Documentation/ABI/testing/sysfs-devices-platform-musb_hdrc-gadget b/Documentation/ABI/testing/sysfs-devices-platform-musb_hdrc-gadget
> new file mode 100644
> index 0000000..192d3f3
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-devices-platform-musb_hdrc-gadget
> @@ -0,0 +1,12 @@
> +What: /sys/devices/platform/musb_hdrc/gadget/gadget-lun-X/nofua

The name of the new file and the path given here shouldn't mention
musb_hdrc. That's what _you_ see because that's the device controller
driver you use, but other people will see something different. As a
simple test, you might try using dummy_hcd instead and see what the
name turns out to be.

Just put "..." instead of "musb_hdrc", or something like that.

> +Date: July 2010
> +Contact: Andy Shevchenko <andy.shevchenko(a)gmail.com>
> +Description:
> + Show or set the reaction on the FUA (Force Unit Access) bit in
> + the SCSI WRITE(10,12) commands when a gadget in USB Mass
> + Storage mode.
> +
> + Possible values are:
> + 1 -> ignore FUA flag
> + 0 -> follow on it

Change this to "obey the FUA flag".

The rest is okay. Subject to these changes:

Acked-by: Alan Stern <stern(a)rowland.harvard.edu>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Andy Shevchenko on
On Thu, Jul 22, 2010 at 5:13 PM, Alan Stern <stern(a)rowland.harvard.edu> wrote:
>> +What:           /sys/devices/platform/musb_hdrc/gadget/gadget-lun-X/nofua
>
> The name of the new file and the path given here shouldn't mention
> musb_hdrc.  That's what _you_ see because that's the device controller
> driver you use, but other people will see something different.  As a
> simple test, you might try using dummy_hcd instead and see what the
> name turns out to be.
>
> Just put "..." instead of "musb_hdrc", or something like that.
Thanks for point.

Actually this seems to be part of exist sysfs-devices-platform-_UDC_-gadget.

--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/