diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/ata.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 69e40c8a7d..92332b580e 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -376,8 +376,11 @@ int ata_write_sectors(unsigned long start, | |||
376 | poweroff = false; | 376 | poweroff = false; |
377 | } | 377 | } |
378 | 378 | ||
379 | for (j=0; j<SECTOR_SIZE/2; j++) | 379 | for (j=0; j<SECTOR_SIZE/2; j++) { |
380 | ATA_DATA = SWAB16(((unsigned short*)buf)[j]); | 380 | ATA_DATA = (unsigned short) |
381 | (((unsigned char *)buf)[j*2+1] << 8) | | ||
382 | ((unsigned char *)buf)[j*2]; | ||
383 | } | ||
381 | 384 | ||
382 | #ifdef USE_INTERRUPT | 385 | #ifdef USE_INTERRUPT |
383 | /* reading the status register clears the interrupt */ | 386 | /* reading the status register clears the interrupt */ |