From: Kevin O'Connor Date: Tue, 17 Nov 2015 19:54:11 +0000 (-0500) Subject: sdcard: fix typo causing 32bit write to 16bit block_size field X-Git-Tag: rel-1.9.1~5 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fe8d98613c134ac62b38a82b3f9504605ec52910;p=seabios.git sdcard: fix typo causing 32bit write to 16bit block_size field The block_size field is 16bits and only 16bit writes should be used with it. Signed-off-by: Kevin O'Connor (cherry picked from commit 8f7dc5ab820beac980f0d40f3934a5ae04771349) --- diff --git a/src/hw/sdcard.c b/src/hw/sdcard.c index 0617d24..e01e1bb 100644 --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -224,7 +224,7 @@ sdcard_pio_transfer(struct sddrive_s *drive, int cmd, u32 addr , void *data, int count) { // Send command - writel(&drive->regs->block_size, DISK_SECTOR_SIZE); + writew(&drive->regs->block_size, DISK_SECTOR_SIZE); writew(&drive->regs->block_count, count); int isread = cmd != SC_WRITE_SINGLE && cmd != SC_WRITE_MULTIPLE; u16 tmode = ((count > 1 ? ST_MULTIPLE|ST_AUTO_CMD12|ST_BLOCKCOUNT : 0)