svn commit: r316093 - stable/10/sys/dev/isp
Alexander Motin
mav at FreeBSD.org
Tue Mar 28 10:26:28 UTC 2017
Author: mav
Date: Tue Mar 28 10:26:27 2017
New Revision: 316093
URL: https://svnweb.freebsd.org/changeset/base/316093
Log:
MFC r315279: Remove some dead/broken code paths around async handling
Modified:
stable/10/sys/dev/isp/isp.c
stable/10/sys/dev/isp/isp_freebsd.c
stable/10/sys/dev/isp/isp_target.c
stable/10/sys/dev/isp/ispvar.h
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/isp/isp.c
==============================================================================
--- stable/10/sys/dev/isp/isp.c Tue Mar 28 10:25:56 2017 (r316092)
+++ stable/10/sys/dev/isp/isp.c Tue Mar 28 10:26:27 2017 (r316093)
@@ -95,11 +95,11 @@ static const uint8_t alpa_map[] = {
/*
* Local function prototypes.
*/
-static int isp_parse_async(ispsoftc_t *, uint16_t);
-static int isp_parse_async_fc(ispsoftc_t *, uint16_t);
+static void isp_parse_async(ispsoftc_t *, uint16_t);
+static void isp_parse_async_fc(ispsoftc_t *, uint16_t);
static int isp_handle_other_response(ispsoftc_t *, int, isphdr_t *, uint32_t *);
-static void isp_parse_status(ispsoftc_t *, ispstatusreq_t *, XS_T *, long *); static void
-isp_parse_status_24xx(ispsoftc_t *, isp24xx_statusreq_t *, XS_T *, long *);
+static void isp_parse_status(ispsoftc_t *, ispstatusreq_t *, XS_T *, long *);
+static void isp_parse_status_24xx(ispsoftc_t *, isp24xx_statusreq_t *, XS_T *, long *);
static void isp_fastpost_complete(ispsoftc_t *, uint32_t);
static void isp_scsi_init(ispsoftc_t *);
static void isp_scsi_channel_init(ispsoftc_t *, int);
@@ -4950,10 +4950,10 @@ again:
isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) with no waiters", info);
}
} else {
- i = IS_FC(isp)? isp_parse_async_fc(isp, info) : isp_parse_async(isp, info);
- if (i < 0) {
- return;
- }
+ if (IS_FC(isp))
+ isp_parse_async_fc(isp, info);
+ else
+ isp_parse_async(isp, info);
}
if ((IS_FC(isp) && info != ASYNC_RIOZIO_STALL) || isp->isp_state != ISP_RUNSTATE) {
goto out;
@@ -5504,13 +5504,10 @@ isp_prt_endcmd(ispsoftc_t *isp, XS_T *xs
/*
* Parse an ASYNC mailbox complete
- *
- * Return non-zero if the event has been acknowledged.
*/
-static int
+static void
isp_parse_async(ispsoftc_t *isp, uint16_t mbox)
{
- int acked = 0;
uint32_t h1 = 0, h2 = 0;
uint16_t chan = 0;
@@ -5529,9 +5526,7 @@ isp_parse_async(ispsoftc_t *isp, uint16_
case ASYNC_BUS_RESET:
ISP_SET_SENDMARKER(isp, chan, 1);
#ifdef ISP_TARGET_MODE
- if (isp_target_async(isp, chan, mbox)) {
- acked = 1;
- }
+ isp_target_async(isp, chan, mbox);
#endif
isp_async(isp, ISPASYNC_BUS_RESET, chan);
break;
@@ -5551,7 +5546,6 @@ isp_parse_async(ispsoftc_t *isp, uint16_
* restart the firmware
*/
isp_async(isp, ISPASYNC_FW_CRASH);
- acked = 1;
break;
case ASYNC_RQS_XFER_ERR:
@@ -5575,9 +5569,7 @@ isp_parse_async(ispsoftc_t *isp, uint16_
isp_prt(isp, ISP_LOGWARN, "timeout initiated SCSI bus reset of chan %d", chan);
ISP_SET_SENDMARKER(isp, chan, 1);
#ifdef ISP_TARGET_MODE
- if (isp_target_async(isp, chan, mbox)) {
- acked = 1;
- }
+ isp_target_async(isp, chan, mbox);
#endif
break;
@@ -5585,9 +5577,7 @@ isp_parse_async(ispsoftc_t *isp, uint16_
isp_prt(isp, ISP_LOGINFO, "device reset on chan %d", chan);
ISP_SET_SENDMARKER(isp, chan, 1);
#ifdef ISP_TARGET_MODE
- if (isp_target_async(isp, chan, mbox)) {
- acked = 1;
- }
+ isp_target_async(isp, chan, mbox);
#endif
break;
@@ -5687,14 +5677,12 @@ isp_parse_async(ispsoftc_t *isp, uint16_
} else {
isp->isp_intoasync++;
}
- return (acked);
}
-static int
+static void
isp_parse_async_fc(ispsoftc_t *isp, uint16_t mbox)
{
fcparam *fcp;
- int acked = 0;
uint16_t chan;
if (IS_DUALBUS(isp)) {
@@ -5723,7 +5711,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
* restart the firmware
*/
isp_async(isp, ISPASYNC_FW_CRASH);
- acked = 1;
break;
case ASYNC_RQS_XFER_ERR:
@@ -5756,11 +5743,9 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
case ASYNC_CTIO_DONE:
#ifdef ISP_TARGET_MODE
- if (isp_target_async(isp, (ISP_READ(isp, OUTMAILBOX2) << 16) | ISP_READ(isp, OUTMAILBOX1), mbox)) {
- acked = 1;
- } else {
- isp->isp_fphccmplt++;
- }
+ isp_target_async(isp, (ISP_READ(isp, OUTMAILBOX2) << 16) |
+ ISP_READ(isp, OUTMAILBOX1), mbox);
+ isp->isp_fphccmplt++;
#else
isp_prt(isp, ISP_LOGWARN, "unexpected ASYNC CTIO done");
#endif
@@ -5785,9 +5770,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
ISP_SET_SENDMARKER(isp, chan, 1);
isp_async(isp, ISPASYNC_LIP, chan);
#ifdef ISP_TARGET_MODE
- if (isp_target_async(isp, chan, mbox)) {
- acked = 1;
- }
+ isp_target_async(isp, chan, mbox);
#endif
/*
* We've had problems with data corruption occuring on
@@ -5841,9 +5824,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
ISP_SET_SENDMARKER(isp, chan, 1);
isp_async(isp, ISPASYNC_LOOP_UP, chan);
#ifdef ISP_TARGET_MODE
- if (isp_target_async(isp, chan, mbox)) {
- acked = 1;
- }
+ isp_target_async(isp, chan, mbox);
#endif
}
break;
@@ -5862,9 +5843,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
fcp->isp_loopstate = LOOP_NIL;
isp_async(isp, ISPASYNC_LOOP_DOWN, chan);
#ifdef ISP_TARGET_MODE
- if (isp_target_async(isp, chan, mbox)) {
- acked = 1;
- }
+ isp_target_async(isp, chan, mbox);
#endif
}
break;
@@ -5884,9 +5863,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
fcp->isp_loopstate = LOOP_HAVE_LINK;
isp_async(isp, ISPASYNC_LOOP_RESET, chan);
#ifdef ISP_TARGET_MODE
- if (isp_target_async(isp, chan, mbox)) {
- acked = 1;
- }
+ isp_target_async(isp, chan, mbox);
#endif
}
break;
@@ -5990,7 +5967,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
isp->isp_state = ISP_CRASHED;
isp_prt(isp, ISP_LOGERR, "FATAL CONNECTION ERROR");
isp_async(isp, ISPASYNC_FW_CRASH);
- return (-1);
+ return;
case ISP_CONN_LOOPBACK:
isp_prt(isp, ISP_LOGWARN,
"Looped Back in Point-to-Point mode");
@@ -6043,7 +6020,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint
if (mbox != ASYNC_CTIO_DONE && mbox != ASYNC_CMD_CMPLT) {
isp->isp_intoasync++;
}
- return (acked);
}
/*
Modified: stable/10/sys/dev/isp/isp_freebsd.c
==============================================================================
--- stable/10/sys/dev/isp/isp_freebsd.c Tue Mar 28 10:25:56 2017 (r316092)
+++ stable/10/sys/dev/isp/isp_freebsd.c Tue Mar 28 10:26:27 2017 (r316093)
@@ -4290,11 +4290,13 @@ changed:
mbox6 = 0;
}
isp_prt(isp, ISP_LOGERR, "Internal Firmware Error on bus %d @ RISC Address 0x%x", mbox6, mbox1);
+#if 0
mbox1 = isp->isp_osinfo.mbox_sleep_ok;
isp->isp_osinfo.mbox_sleep_ok = 0;
isp_reinit(isp, 1);
isp->isp_osinfo.mbox_sleep_ok = mbox1;
isp_async(isp, ISPASYNC_FW_RESTARTED, NULL);
+#endif
break;
}
default:
Modified: stable/10/sys/dev/isp/isp_target.c
==============================================================================
--- stable/10/sys/dev/isp/isp_target.c Tue Mar 28 10:25:56 2017 (r316092)
+++ stable/10/sys/dev/isp/isp_target.c Tue Mar 28 10:26:27 2017 (r316093)
@@ -617,7 +617,7 @@ isp_endcmd(ispsoftc_t *isp, ...)
* These are either broadcast events or specifically CTIO fast completion
*/
-int
+void
isp_target_async(ispsoftc_t *isp, int bus, int event)
{
isp_notify_t notify;
@@ -694,7 +694,6 @@ isp_target_async(ispsoftc_t *isp, int bu
}
break;
}
- return (0);
}
/*
Modified: stable/10/sys/dev/isp/ispvar.h
==============================================================================
--- stable/10/sys/dev/isp/ispvar.h Tue Mar 28 10:25:56 2017 (r316092)
+++ stable/10/sys/dev/isp/ispvar.h Tue Mar 28 10:26:27 2017 (r316093)
@@ -1141,9 +1141,7 @@ int isp_endcmd(ispsoftc_t *, ...);
/*
* Handle an asynchronous event
- *
- * Return nonzero if the interrupt that generated this event has been dismissed.
*/
-int isp_target_async(ispsoftc_t *, int, int);
+void isp_target_async(ispsoftc_t *, int, int);
#endif
#endif /* _ISPVAR_H */
More information about the svn-src-stable-10
mailing list