- printf("hd%d: ", ctlr);
- switch(code) {
-#define P(op, msg) case op: printf("%s\n", msg); return;
- P(0x0100, "Invalid command code")
- P(0x0221, "Total longword count too large")
- P(0x0222, "Total longword count incorrect")
- P(0x0223, "Longword count of zero not permitted")
- P(0x0231, "Too many data chained items")
- P(0x0232, "Data chain not permitted for this command")
- P(0x0341, "Maximum logical cylinder address exceeded")
- P(0x0342, "Maximum logical head address exceeded")
- P(0x0343, "Maximum logical sectoraddress exceeded")
- P(0x0351, "Maximum physical cylinder address exceeded")
- P(0x0352, "Maximum physical head address exceeded")
- P(0x0353, "Maximum physical sectoraddress exceeded")
- P(0x0621, "Control store PROM revision incorrect")
- P(0x0642, "Power fail detected")
- P(0x0721, "Sector count test failed")
- P(0x0731, "First access test failed")
- P(0x0811, "Drive not online")
- P(0x0812, "Drive not ready")
- P(0x0813, "Drive seek error")
- P(0x0814, "Drive faulted")
- P(0x0815, "Drive reserved")
- P(0x0816, "Drive write protected")
- P(0x0841, "Timeout waiting for drive to go on-cylinder")
- P(0x0851, "Timeout waiting for a specific sector address")
- P(0x0921, "Correctable ECC error")
- P(0x0A11, "Attempt to spill-off of physical boundary")
- P(0x0A21, "Attempt to spill-off of logical boundary")
- P(0x0A41, "Unknown DDC status (PSREAD)")
- P(0x0A42, "Unknown DDC status (PSWRITE)")
- P(0x0A51, "Track relocation limit exceeded")
- P(0x0C00, "HFASM")
- P(0x0C01, "data field error")
- P(0x0C02, "sector not found")
- P(0x0C03, "sector overrun")
- P(0x0C04, "no data sync")
- P(0x0C05, "FIFO data lost")
- P(0x0C06, "correction failed")
- P(0x0C07, "late interlock")
- P(0x0D21, "Output data buffer parity error")
- P(0x0D31, "Input data transfer FIFO indicates overflow")
- P(0x0D32, "Input data buffer FIFO indicates overflow")
- P(0x0D41, "Longword count != 0 indicates underflow")
- P(0x0D42, "Output data buffer FIFO indicates underflow")
- P(0x0E01, "FT timeout -- DDC interrupt")
- P(0x0E02, "RDDB timeout -- IDTFINRDY -- and DDC interrupt")
- P(0x0E03, "RDDB timeout -- DDC interrupt")
- P(0x0E04, "RDDB timeout -- writing ZERO's to IDTF")
- P(0x0E05, "RDDB timeout -- IDTFINRDY -- and IDBFEMPTY+")
- P(0x0E06, "WRDB timeout -- ODTFOUTRDT -- and DDC interrupt")
- P(0x0E07, "WRDB timeout -- ODTFOUTRDT -- and DDC interrupt")
- P(0x0E08, "WRDB timeout -- DDC interrupt")
- P(0x0E09, "WRDB timeout -- ODBFFULL+ and DDC interrupt")
- P(0x0E0A, "VLT timeout -- DDC interrupt")
- P(0x0E0B, "WRBA timeout -- ODTFOUTRDY-")
- P(0x0F00, "Error log full")
- default:
- if (code >= 0x0B00 && code <= 0x0BFF)
- printf("Unknown DDC status type 0x%x.", code&0xff);
- else
- printf("Unknown error %lx\n", code);
- }