summaryrefslogtreecommitdiffstats
path: root/firmware/usbstack/usb_storage.c
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2010-03-11 00:59:17 +0000
committerMichael Sparmann <theseven@rockbox.org>2010-03-11 00:59:17 +0000
commit62c011c8fbfb02da6c93ad4c9e03ecf1eba8a366 (patch)
tree44fd187fff46485d52e757118c4f1f32cdb2a72a /firmware/usbstack/usb_storage.c
parent029e74866a6ed43f3b8833a06f28f4506210a99e (diff)
downloadrockbox-62c011c8fbfb02da6c93ad4c9e03ecf1eba8a366.tar.gz
rockbox-62c011c8fbfb02da6c93ad4c9e03ecf1eba8a366.tar.bz2
rockbox-62c011c8fbfb02da6c93ad4c9e03ecf1eba8a366.zip
Even more Nano2G FTL speedup. Now 8% faster than disk mode, 10% slower than the OFW. 4.5MB/s sustained (contiguous) write, 6.0MB/s read for me now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25109 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usbstack/usb_storage.c')
-rw-r--r--firmware/usbstack/usb_storage.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index 144603348b..4a8f2dc397 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -57,13 +57,21 @@
* optimal, except for sd devices that apparently don't gain anything from
* double-buffering
*/
+#ifdef USB_READ_BUFFER_SIZE
+#define READ_BUFFER_SIZE USB_READ_BUFFER_SIZE
+#else
#define READ_BUFFER_SIZE (1024*64)
+#endif
+#ifdef USB_WRITE_BUFFER_SIZE
+#define WRITE_BUFFER_SIZE USB_WRITE_BUFFER_SIZE
+#else
#if (CONFIG_STORAGE & STORAGE_SD)
#define WRITE_BUFFER_SIZE (1024*64)
#else
#define WRITE_BUFFER_SIZE (1024*24)
#endif
+#endif
#define ALLOCATE_BUFFER_SIZE (2*MAX(READ_BUFFER_SIZE,WRITE_BUFFER_SIZE))