keep target mode up to date.
This commit is contained in:
parent
e02259aa26
commit
168ee5d9a6
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: isp_target.c,v 1.18 2002/02/21 22:32:42 mjacob Exp $ */
|
||||
/* $NetBSD: isp_target.c,v 1.19 2002/06/15 00:17:28 mjacob Exp $ */
|
||||
/*
|
||||
* This driver, which is contained in NetBSD in the files:
|
||||
*
|
||||
@ -65,7 +65,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: isp_target.c,v 1.18 2002/02/21 22:32:42 mjacob Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: isp_target.c,v 1.19 2002/06/15 00:17:28 mjacob Exp $");
|
||||
|
||||
#ifdef __NetBSD__
|
||||
#include <dev/ic/isp_netbsd.h>
|
||||
@ -170,7 +170,7 @@ isp_target_notify(struct ispsoftc *isp, void *vptr, u_int16_t *optrp)
|
||||
#define hdrp unp.hp
|
||||
} unp;
|
||||
u_int8_t local[QENTRY_LEN];
|
||||
int bus, type, rval = 0;
|
||||
int bus, type, rval = 1;
|
||||
|
||||
type = isp_get_response_type(isp, (isphdr_t *)vptr);
|
||||
unp.vp = vptr;
|
||||
@ -247,24 +247,11 @@ isp_target_notify(struct ispsoftc *isp, void *vptr, u_int16_t *optrp)
|
||||
case IN_RSRC_UNAVAIL:
|
||||
isp_prt(isp, ISP_LOGWARN, "Firmware out of ATIOs");
|
||||
break;
|
||||
case IN_ABORT_TASK:
|
||||
isp_prt(isp, ISP_LOGWARN,
|
||||
"Abort Task from IID %d RX_ID 0x%x",
|
||||
inot_fcp->in_iid, seqid);
|
||||
(void) isp_async(isp, ISPASYNC_TARGET_ACTION, &bus);
|
||||
break;
|
||||
case IN_PORT_LOGOUT:
|
||||
isp_prt(isp, ISP_LOGWARN,
|
||||
"Port Logout for Initiator %d RX_ID 0x%x",
|
||||
inot_fcp->in_iid, seqid);
|
||||
break;
|
||||
case IN_ABORT_TASK:
|
||||
case IN_PORT_CHANGED:
|
||||
isp_prt(isp, ISP_LOGWARN,
|
||||
"Port Changed for Initiator %d RX_ID 0x%x",
|
||||
inot_fcp->in_iid, seqid);
|
||||
break;
|
||||
case IN_GLOBAL_LOGO:
|
||||
isp_prt(isp, ISP_LOGWARN, "All ports logged out");
|
||||
(void) isp_async(isp, ISPASYNC_TARGET_ACTION, &local);
|
||||
break;
|
||||
default:
|
||||
isp_prt(isp, ISP_LOGERR,
|
||||
@ -296,7 +283,7 @@ isp_target_notify(struct ispsoftc *isp, void *vptr, u_int16_t *optrp)
|
||||
default:
|
||||
isp_prt(isp, ISP_LOGERR,
|
||||
"Unknown entry type 0x%x in isp_target_notify", type);
|
||||
rval = -1;
|
||||
rval = 0;
|
||||
break;
|
||||
}
|
||||
#undef atiop
|
||||
@ -532,7 +519,7 @@ isp_endcmd(struct ispsoftc *isp, void *arg, u_int32_t code, u_int16_t hdl)
|
||||
return (isp_target_put_entry(isp, &un));
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
isp_target_async(struct ispsoftc *isp, int bus, int event)
|
||||
{
|
||||
tmd_event_t evt;
|
||||
@ -555,12 +542,12 @@ isp_target_async(struct ispsoftc *isp, int bus, int event)
|
||||
* treat them like SCSI Bus Resets, but that was just plain
|
||||
* wrong. Let the normal CTIO completion report what occurred.
|
||||
*/
|
||||
return;
|
||||
return (0);
|
||||
|
||||
case ASYNC_BUS_RESET:
|
||||
case ASYNC_TIMEOUT_RESET:
|
||||
if (IS_FC(isp)) {
|
||||
return; /* we'll be getting an inotify instead */
|
||||
return (0); /* we'll be getting an inotify instead */
|
||||
}
|
||||
evt.ev_bus = bus;
|
||||
evt.ev_event = event;
|
||||
@ -588,6 +575,7 @@ isp_target_async(struct ispsoftc *isp, int bus, int event)
|
||||
}
|
||||
if (isp->isp_state == ISP_RUNSTATE)
|
||||
isp_notify_ack(isp, NULL);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user