summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPons, Jean-Marie <jm-pons@ti.com>2012-07-26 12:02:37 +0200
committerXavier Boudet <x-boudet@ti.com>2012-07-26 12:02:37 +0200
commitee58a68c84d8fb881a5474f678108e468ac702a7 (patch)
treed54130a55d151943919d40c72a5a1c74cca0ed63
parent64c9c3ffc1bf2c133bc0042ffdcd5e37176a5d68 (diff)
HACK: usb: mass_storage: Increase write throughput by 2x on musb
Currently the musb controller driver relies on short_not_ok flag in the usb request to use DMA mode 1 which gives a performance boost. We set this flag in the mass storage gadget to take benefit of DMA mode 1. This would give us 2x performance boost in PC to device transfers in mass storage mode. This patch is a HACK because it is not a generic solution and would break USB3.0 controllers using mass storage mode. We intend to revert it and use a proper solution when it is ready. Signed-off-by: Roger Quadros <rogerq@ti.com>
-rw-r--r--drivers/usb/gadget/f_mass_storage.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index cb8c162cae5a..66bc4d9d9a8b 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -960,6 +960,7 @@ static int do_write(struct fsg_common *common)
* the bulk-out maxpacket size.
*/
set_bulk_out_req_length(common, bh, amount);
+ bh->outreq->short_not_ok = 1;
if (!start_out_transfer(common, bh))
/* Dunno what to do if common->fsg is NULL */
return -EIO;
@@ -1617,6 +1618,7 @@ static int throw_away_data(struct fsg_common *common)
* the bulk-out maxpacket size.
*/
set_bulk_out_req_length(common, bh, amount);
+ bh->outreq->short_not_ok = 1;
if (!start_out_transfer(common, bh))
/* Dunno what to do if common->fsg is NULL */
return -EIO;
@@ -2303,6 +2305,7 @@ static int get_next_command(struct fsg_common *common)
/* Queue a request to read a Bulk-only CBW */
set_bulk_out_req_length(common, bh, US_BULK_CB_WRAP_LEN);
+ bh->outreq->short_not_ok = 1;
if (!start_out_transfer(common, bh))
/* Don't know what to do if common->fsg is NULL */
return -EIO;