IDE layer adoptations that *fake* a failing drive?
Quoted 3 lines
code that sits between the IDE software layer and
the storage device, that emulates a failing disk
in one way or another.
I guess you want intermittent and unreliable failure ... else you could swap in an ATAPI drive, since ATAPI protocol by definition looks like a dead ATA drive.
Like you, I want to eject errors and timeouts, please post back here what you find. Meanwhile, three thoughts:
1) Read errors
Via ATA pass thru you can force a read error, if your drive supports the write/ read long legacy of ATA 2 for that purpose.
2) No-data timeouts
Via 48-bit lba ATA you can force a slow timeout by asking to verify xFFFF lba's = 32 MiB = (1 << (16+9)) bytes, at 512 = x200 = (1 << 9) bytes/lba, if you drive actually does verify blocks when asked.
3) Write errors, data timeouts, etc.
Tough, without customarily proprietary knowledge of the drive.
Pat LaVarre