Skip to contentSkip to conversation

2.5.13 IDE PIO mode Fix

PATCH [email protected] 2 participants 2 messages May 4, 2002 – May 5, 2002

lore
Share & tools
lore
#0 lore raw

I found this bug in 2.5.10 first. And caused ext2 FS corruption. We are porting Linux to PC-9801 architecture (made by NEC Japan). It has PIO ONLY IDE I/F. So please check PIO mode too.
# Our porting status - 2.2.x/2.4.x done and updating. 2.5.x partial.

diff -urN linux-2.5.10/drivers/ide/ide-taskfile.c linux/drivers/ide/ide-taskfile.c
--- linux-2.5.10/drivers/ide/ide-taskfile.c Wed Apr 24 16:15:19 2002
+++ linux/drivers/ide/ide-taskfile.c Fri Apr 26 15:44:42 2002
@@ -202,7 +202,7 @@
ata_write_slow(drive, buffer, wcount);
else
#endif
- ata_write_16(drive, buffer, wcount<<1);
+ ata_write_16(drive, buffer, wcount);
}
}

Excellent!
It was introduced in 2.5.9 and still exists in 2.5.13, and caused superblock corruption for me. This fixes it.

Andries

#1 lore raw
Quoted 17 lines · Użytkownik [email protected] napisał:

I found this bug in 2.5.10 first. And caused ext2 FS corruption. We are porting Linux to PC-9801 architecture (made by NEC Japan). It has PIO ONLY IDE I/F. So please check PIO mode too.
# Our porting status - 2.2.x/2.4.x done and updating. 2.5.x partial.

diff -urN linux-2.5.10/drivers/ide/ide-taskfile.c linux/drivers/ide/ide-taskfile.c
--- linux-2.5.10/drivers/ide/ide-taskfile.c Wed Apr 24 16:15:19 2002
+++ linux/drivers/ide/ide-taskfile.c Fri Apr 26 15:44:42 2002
@@ -202,7 +202,7 @@
ata_write_slow(drive, buffer, wcount);
else
#endif
- ata_write_16(drive, buffer, wcount<<1);
+ ata_write_16(drive, buffer, wcount);
}
}

Quoted 1 line

Excellent!

Thank you for confirmations. This even streamlines the code to what it was intendid to be.

BTW.> The next thing I plan to break is host chips initialization, since Jens introduced several additional ide_dma_action_t fields for no good reaons... I decided to remove them all as next... :-).