ata_write_sectors() didn't handle odd buffer addresses
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3544 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1326f666a6
commit
b5401749cb
1 changed files with 5 additions and 2 deletions
|
@ -376,8 +376,11 @@ int ata_write_sectors(unsigned long start,
|
||||||
poweroff = false;
|
poweroff = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (j=0; j<SECTOR_SIZE/2; j++)
|
for (j=0; j<SECTOR_SIZE/2; j++) {
|
||||||
ATA_DATA = SWAB16(((unsigned short*)buf)[j]);
|
ATA_DATA = (unsigned short)
|
||||||
|
(((unsigned char *)buf)[j*2+1] << 8) |
|
||||||
|
((unsigned char *)buf)[j*2];
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef USE_INTERRUPT
|
#ifdef USE_INTERRUPT
|
||||||
/* reading the status register clears the interrupt */
|
/* reading the status register clears the interrupt */
|
||||||
|
|
Loading…
Reference in a new issue