summaryrefslogtreecommitdiff
path: root/sys/dev/ic/isp.c
diff options
context:
space:
mode:
authormjacob <mjacob@NetBSD.org>2001-02-20 01:10:50 +0000
committermjacob <mjacob@NetBSD.org>2001-02-20 01:10:50 +0000
commit3f7d69fe2c534d2caa1284202bbba887a244e839 (patch)
tree8c59810f3936c6f8e5461f0d0a4cecc9b2364b88 /sys/dev/ic/isp.c
parent0009ba56a7fe9137ded22b1a9a7e41f19830c45e (diff)
Add ISPCTL_RUN_MBOXCMD control function and ISPASYNC_UNHANDLED_RESPONSE
async event. Call ISP_DUMPREGS on f/w erro. Correct problem in bitmap for MBOX_DUMP_RAM.
Diffstat (limited to 'sys/dev/ic/isp.c')
-rw-r--r--sys/dev/ic/isp.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/dev/ic/isp.c b/sys/dev/ic/isp.c
index d99336a89f0..de0b0c3f0e1 100644
--- a/sys/dev/ic/isp.c
+++ b/sys/dev/ic/isp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: isp.c,v 1.70 2001/02/12 23:28:50 mjacob Exp $ */
+/* $NetBSD: isp.c,v 1.71 2001/02/20 01:10:50 mjacob Exp $ */
/*
* This driver, which is contained in NetBSD in the files:
*
@@ -2762,6 +2762,11 @@ isp_control(isp, ctl, arg)
}
break;
+ case ISPCTL_RUN_MBOXCMD:
+
+ isp_mboxcmd(isp, arg, MBLOGALL);
+ return(0);
+
#ifdef ISP_TARGET_MODE
case ISPCTL_TOGGLE_TMODE:
{
@@ -3018,7 +3023,9 @@ isp_intr(arg)
if (sp->req_handle > isp->isp_maxcmds || sp->req_handle < 1) {
MEMZERO(sp, sizeof (isphdr_t));
isp_prt(isp, ISP_LOGERR,
- "bad request handle %d", sp->req_handle);
+ "bad request handle %d (type 0x%x, flags 0x%x)",
+ sp->req_handle, sp->req_header.rqs_entry_type,
+ sp->req_header.rqs_flags);
ISP_WRITE(isp, INMAILBOX5, optr);
continue;
}
@@ -3113,7 +3120,7 @@ isp_intr(arg)
break;
default:
isp_prt(isp, ISP_LOGWARN,
- "unhandled respose queue type 0x%x",
+ "unhandled response queue type 0x%x",
sp->req_header.rqs_entry_type);
if (XS_NOERR(xs)) {
XS_SETERR(xs, HBA_BOTCH);
@@ -3206,7 +3213,8 @@ isp_parse_async(isp, mbox)
case ASYNC_SYSTEM_ERROR:
mbox = ISP_READ(isp, OUTMAILBOX1);
isp_prt(isp, ISP_LOGERR,
- "Internal FW Error @ RISC Addr 0x%x", mbox);
+ "Internal Firmware Error @ RISC Addr 0x%x", mbox);
+ ISP_DUMPREGS(isp, "Firmware Error");
isp_reinit(isp);
#ifdef ISP_TARGET_MODE
isp_target_async(isp, bus, ASYNC_SYSTEM_ERROR);
@@ -3480,6 +3488,9 @@ isp_handle_other_response(isp, sp, optrp)
#endif
case RQSTYPE_REQUEST:
default:
+ if (isp_async(isp, ISPASYNC_UNHANDLED_RESPONSE, sp)) {
+ return (0);
+ }
isp_prt(isp, ISP_LOGWARN, "Unhandled Response Type 0x%x",
sp->req_header.rqs_entry_type);
return (-1);
@@ -4058,7 +4069,7 @@ static u_int16_t mbpfc[] = {
ISPOPMAP(0x01, 0x01), /* 0x00: MBOX_NO_OP */
ISPOPMAP(0x1f, 0x01), /* 0x01: MBOX_LOAD_RAM */
ISPOPMAP(0x03, 0x01), /* 0x02: MBOX_EXEC_FIRMWARE */
- ISPOPMAP(0x1f, 0x01), /* 0x03: MBOX_DUMP_RAM */
+ ISPOPMAP(0xdf, 0x01), /* 0x03: MBOX_DUMP_RAM */
ISPOPMAP(0x07, 0x07), /* 0x04: MBOX_WRITE_RAM_WORD */
ISPOPMAP(0x03, 0x07), /* 0x05: MBOX_READ_RAM_WORD */
ISPOPMAP(0xff, 0xff), /* 0x06: MBOX_MAILBOX_REG_TEST */