summaryrefslogtreecommitdiff
path: root/firmware/drivers/fat.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/fat.c')
-rw-r--r--firmware/drivers/fat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index 61bf9051f2..50619983e9 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -266,7 +266,7 @@ static struct bpb
266 266
267} fat_bpbs[NUM_VOLUMES]; /* mounted partition info */ 267} fat_bpbs[NUM_VOLUMES]; /* mounted partition info */
268 268
269#ifdef STORAGE_WANTS_ALIGN 269#ifdef STORAGE_NEEDS_BOUNCE_BUFFER
270#define FAT_BOUNCE_SECTORS 10 270#define FAT_BOUNCE_SECTORS 10
271static uint8_t fat_bounce_buffers[NUM_VOLUMES][SECTOR_SIZE*FAT_BOUNCE_SECTORS] STORAGE_ALIGN_ATTR; 271static uint8_t fat_bounce_buffers[NUM_VOLUMES][SECTOR_SIZE*FAT_BOUNCE_SECTORS] STORAGE_ALIGN_ATTR;
272#define FAT_BOUNCE_BUFFER(bpb) \ 272#define FAT_BOUNCE_BUFFER(bpb) \
@@ -2393,7 +2393,7 @@ static long transfer(struct bpb *fat_bpb, unsigned long start, long count,
2393 else 2393 else
2394 { 2394 {
2395 void* xferbuf = buf; 2395 void* xferbuf = buf;
2396#ifdef STORAGE_WANTS_ALIGN 2396#ifdef STORAGE_NEEDS_BOUNCE_BUFFER
2397 int remain = count; 2397 int remain = count;
2398 int xferred = 0; 2398 int xferred = 0;
2399 int aligned = 1; 2399 int aligned = 1;
@@ -2407,7 +2407,7 @@ static long transfer(struct bpb *fat_bpb, unsigned long start, long count,
2407#endif 2407#endif
2408 rc = storage_read_sectors(IF_MD(fat_bpb->drive,) 2408 rc = storage_read_sectors(IF_MD(fat_bpb->drive,)
2409 start + fat_bpb->startsector, count, xferbuf); 2409 start + fat_bpb->startsector, count, xferbuf);
2410#ifdef STORAGE_WANTS_ALIGN 2410#ifdef STORAGE_NEEDS_BOUNCE_BUFFER
2411 if(rc < 0) 2411 if(rc < 0)
2412 break; 2412 break;
2413 if(LIKELY(aligned)) 2413 if(LIKELY(aligned))