summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/usbstack/usb_storage.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index 9be2d5d241..2080865e11 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -34,14 +34,6 @@
34 34
35#ifdef USB_STORAGE 35#ifdef USB_STORAGE
36 36
37/* The SD card driver on Sansa c200 and e200 can cause write corruption,
38 * often triggered by simultaneous USB activity. This can be largely avoided
39 * by not overlapping storage_write_sector() with USB transfers. This does reduce
40 * write performance, so we only do it for the affected DAPs
41 */
42#if (CONFIG_STORAGE & STORAGE_SD)
43#define SERIALIZE_WRITES
44#endif
45/* Enable the following define to export only the SD card slot. This 37/* Enable the following define to export only the SD card slot. This
46 * is useful for USBCV MSC tests, as those are destructive. 38 * is useful for USBCV MSC tests, as those are destructive.
47 * This won't work right if the device doesn't have a card slot. 39 * This won't work right if the device doesn't have a card slot.
@@ -470,13 +462,11 @@ void usb_storage_transfer_complete(int ep,int dir,int status,int length)
470 MIN(cur_cmd.count,BUFFER_SIZE/SECTOR_SIZE); 462 MIN(cur_cmd.count,BUFFER_SIZE/SECTOR_SIZE);
471 int next_select = !cur_cmd.data_select; 463 int next_select = !cur_cmd.data_select;
472 464
473#ifndef SERIALIZE_WRITES
474 if(next_count!=0) { 465 if(next_count!=0) {
475 /* Ask the host to send more, to the other buffer */ 466 /* Ask the host to send more, to the other buffer */
476 receive_block_data(cur_cmd.data[next_select], 467 receive_block_data(cur_cmd.data[next_select],
477 MIN(BUFFER_SIZE,next_count*SECTOR_SIZE)); 468 MIN(BUFFER_SIZE,next_count*SECTOR_SIZE));
478 } 469 }
479#endif
480 470
481 /* Now write the data that just came in, while the host is 471 /* Now write the data that just came in, while the host is
482 sending the next bit */ 472 sending the next bit */
@@ -498,13 +488,6 @@ void usb_storage_transfer_complete(int ep,int dir,int status,int length)
498 break; 488 break;
499 } 489 }
500#endif 490#endif
501#ifdef SERIALIZE_WRITES
502 if(next_count!=0) {
503 /* Ask the host to send more, to the other buffer */
504 receive_block_data(cur_cmd.data[next_select],
505 MIN(BUFFER_SIZE,next_count*SECTOR_SIZE));
506 }
507#endif
508 491
509 if(next_count==0) { 492 if(next_count==0) {
510 send_csw(UMS_STATUS_GOOD); 493 send_csw(UMS_STATUS_GOOD);