diff options
author | mdodd <mdodd@FreeBSD.org> | 1999-10-02 17:40:07 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 1999-10-02 17:40:07 +0000 |
commit | bbea2fab83170c021aaa767678c591bbec4bed6a (patch) | |
tree | 6041640efd466a19f8d2edc6c11ffff9d09e4b00 /sys/dev/aha | |
parent | 685a5b90582dda73778c9efe49a26b533b120d44 (diff) | |
download | FreeBSD-src-bbea2fab83170c021aaa767678c591bbec4bed6a.zip FreeBSD-src-bbea2fab83170c021aaa767678c591bbec4bed6a.tar.gz |
Use the PRVERB() macro instead of 'if (bootverbose) printf()...
Add debuging for all failure cases in aha_cmd().
Always check DATAIN_REG_READY even if we're ready to exit the
read loop.
The last fix allows the AHA-1640 MCA SCSI adapter to operate
correctly and likely fixes problems on a few other oddball
adapters. (I suspect my Dell Drive Array in 1540 mode needs this.)
Reviewed by: Warner Losh
Diffstat (limited to 'sys/dev/aha')
-rw-r--r-- | sys/dev/aha/aha.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/aha/aha.c b/sys/dev/aha/aha.c index 458ff06..223e12b 100644 --- a/sys/dev/aha/aha.c +++ b/sys/dev/aha/aha.c @@ -330,8 +330,7 @@ aha_probe(struct aha_softc* aha) * looking at a BusLogic. */ if ((error = ahareset(aha, /*hard_reset*/TRUE)) != 0) { - if (bootverbose) - printf("%s: Failed Reset\n", aha_name(aha)); + PRVERB(("%s: Failed Reset\n", aha_name(aha))); return (ENXIO); } @@ -1704,7 +1703,8 @@ aha_cmd(struct aha_softc *aha, aha_op_t opcode, u_int8_t *params, */ cmd_complete = 1; saved_status = status; - } else if ((status & DATAIN_REG_READY) != 0) { + } + if ((status & DATAIN_REG_READY) != 0) { u_int8_t data; data = aha_inb(aha, DATAIN_REG); @@ -1767,11 +1767,16 @@ aha_cmd(struct aha_softc *aha, aha_op_t opcode, u_int8_t *params, if (param_len > 0) { /* The controller did not accept the full argument list */ + PRVERB(("%s: Controller did not accept full argument list " + "(%d > 0)\n", + aha_name(aha), param_len)); return (E2BIG); } if (reply_len != reply_buf_size) { /* Too much or too little data received */ + PRVERB(("%s: Too much or too little data received (%d != %d)\n", + aha_name(aha), reply_len, reply_buf_size)); return (EMSGSIZE); } |