summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2002-06-16 04:56:07 +0000
committermjacob <mjacob@FreeBSD.org>2002-06-16 04:56:07 +0000
commit4aaea6a855ede6547a4ba4fc67219d6f46a9a99b (patch)
tree30dfd0f08786953509bd8b95377e96cf1f517344 /sys/dev/isp
parentaace7c9e2f2343fb1a04ae8d7e0c0847d1b5ba3d (diff)
downloadFreeBSD-src-4aaea6a855ede6547a4ba4fc67219d6f46a9a99b.zip
FreeBSD-src-4aaea6a855ede6547a4ba4fc67219d6f46a9a99b.tar.gz
Change isp_target_async to a function returning an integer.
Roll most immediate notifies into something the platform has to handle.
Diffstat (limited to 'sys/dev/isp')
-rw-r--r--sys/dev/isp/isp_target.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/sys/dev/isp/isp_target.c b/sys/dev/isp/isp_target.c
index 05a8446..aff77a4 100644
--- a/sys/dev/isp/isp_target.c
+++ b/sys/dev/isp/isp_target.c
@@ -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);
}
OpenPOWER on IntegriCloud