diff options
author | mjacob <mjacob@cvs.openbsd.org> | 2002-08-17 17:42:55 +0000 |
---|---|---|
committer | mjacob <mjacob@cvs.openbsd.org> | 2002-08-17 17:42:55 +0000 |
commit | 771033d3d5fe6d5733e2d4d2df86eee9d8632a98 (patch) | |
tree | 459e35d1bb58b1b5eb00236f7994073f064bfdc9 /sys/dev/ic/isp_target.c | |
parent | 03c44894c7d6a4ccd2ce8cb708129a21d6e7d3f2 (diff) |
isp_target_notify changes what it returns for success.
Diffstat (limited to 'sys/dev/ic/isp_target.c')
-rw-r--r-- | sys/dev/ic/isp_target.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/sys/dev/ic/isp_target.c b/sys/dev/ic/isp_target.c index 4c2868574ef..91050761a6f 100644 --- a/sys/dev/ic/isp_target.c +++ b/sys/dev/ic/isp_target.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_target.c,v 1.8 2002/05/17 01:33:50 mjacob Exp $ */ +/* $OpenBSD: isp_target.c,v 1.9 2002/08/17 17:42:54 mjacob Exp $ */ /* * Machine and OS Independent Target Mode Code for the Qlogic SCSI/FC adapters. * @@ -139,7 +139,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; @@ -216,24 +216,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, @@ -265,7 +252,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 @@ -501,7 +488,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; @@ -524,12 +511,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; @@ -557,6 +544,7 @@ isp_target_async(struct ispsoftc *isp, int bus, int event) } if (isp->isp_state == ISP_RUNSTATE) isp_notify_ack(isp, NULL); + return(0); } |