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.
This commit is contained in:
parent
0009ba56a7
commit
3f7d69fe2c
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue