aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>2002-03-07 17:32:45 +0000
committerMatt Jacob <mjacob@FreeBSD.org>2002-03-07 17:32:45 +0000
commit70e967391737a3e0fb28d6d4bda6c1a3fbddf399 (patch)
treefec0c998be5fff30546f64131d445e3d1eb8651f /sys
parentf651c1533c235cb5b3df020d266733bd8cce1b89 (diff)
downloadsrc-70e967391737a3e0fb28d6d4bda6c1a3fbddf399.tar.gz
src-70e967391737a3e0fb28d6d4bda6c1a3fbddf399.zip
Disable RIO (reduced interrupt operation) for 2200 boards- it seemed like
it worked- but I ran into a case with a 2204 where commands were being lost right and left. Best be safe. For target mode, or things called if we call isp_handle_other response- note that we might have dropped locks by changing the output pointer so we bail from the loop. It's the responsibility of the entity dropping the lock to make sure that we let the f/w know we've read thus far into the response queue (else we begin processing the same entries again- blech!). MFC after: 1 day
Notes
Notes: svn path=/head/; revision=91823
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/isp/isp.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c
index 8f0ddaacd2dd..cfae85f403f6 100644
--- a/sys/dev/isp/isp.c
+++ b/sys/dev/isp/isp.c
@@ -1250,9 +1250,20 @@ isp_fibre_init(struct ispsoftc *isp)
}
#ifndef ISP_NO_RIO_FC
- if ((isp->isp_role & ISP_ROLE_TARGET) == 0 &&
- ((IS_2100(isp) && ISP_FW_REVX(isp->isp_fwrev) >=
- ISP_FW_REV(1, 17, 0)) || IS_2200(isp) || IS_23XX(isp))) {
+ /*
+ * RIO seems to be enabled in 2100s for fw >= 1.17.0.
+ *
+ * I've had some questionable problems with RIO on 2200.
+ * More specifically, on a 2204 I had problems with RIO
+ * on a Linux system where I was dropping commands right
+ * and left. It's not clear to me what the actual problem
+ * was, but it seems safer to only support this on the
+ * 23XX cards.
+ *
+ * I have it disabled if we support a target mode role for
+ * reasons I can't now remember.
+ */
+ if ((isp->isp_role & ISP_ROLE_TARGET) == 0 && IS_23XX(isp)) {
icbp->icb_xfwoptions |= ICBXOPT_RIO_16BIT;
icbp->icb_racctimer = 4;
icbp->icb_idelaytimer = 8;
@@ -3189,8 +3200,17 @@ again:
isp->isp_fpcchiwater = rio.req_header.rqs_seqno;
continue;
} else {
+ /*
+ * Somebody reachable via isp_handle_other_response
+ * may have updated the response queue pointers for
+ * us.
+ */
+ oop = optr;
if (!isp_handle_other_response(isp, type, hp, &optr)) {
MEMZERO(hp, QENTRY_LEN); /* PERF */
+ if (oop != optr) {
+ goto out;
+ }
continue;
}
@@ -3410,7 +3430,7 @@ again:
if (nlooked) {
WRITE_RESPONSE_QUEUE_OUT_POINTER(isp, optr);
/*
- * While we're at it, reqad the requst queue out pointer.
+ * While we're at it, read the requst queue out pointer.
*/
isp->isp_reqodx = READ_REQUEST_QUEUE_OUT_POINTER(isp);
if (isp->isp_rscchiwater < ndone)
@@ -3418,6 +3438,7 @@ again:
}
isp->isp_residx = optr;
+out:
for (i = 0; i < ndone; i++) {
xs = complist[i];
if (xs) {