summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-01-05 22:47:12 +0000
committermav <mav@FreeBSD.org>2014-01-05 22:47:12 +0000
commit67d4b65ac1864205e3ad00f521567a31bc3d74b5 (patch)
tree337aef48eb83c1325cb0e01d9379a9c1767a0e71
parent116abbfd1f102c63111657f01cc3761565131f66 (diff)
downloadFreeBSD-src-67d4b65ac1864205e3ad00f521567a31bc3d74b5.zip
FreeBSD-src-67d4b65ac1864205e3ad00f521567a31bc3d74b5.tar.gz
MFC r257930:
Some more registers access optimizations: - Process ATIO queue only if interrupt status tells so; - Do not update queue out pointers after each processed command, do it only once at the end of the loop.
-rw-r--r--sys/dev/isp/isp.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c
index 5f273d2..32ee10a 100644
--- a/sys/dev/isp/isp.c
+++ b/sys/dev/isp/isp.c
@@ -5082,7 +5082,9 @@ again:
/*
* Check for ATIO Queue entries.
*/
- if (IS_24XX(isp)) {
+ if (IS_24XX(isp) &&
+ ((isr & BIU2400_R2HST_ISTAT_MASK) == ISP2400R2HST_ATIO_RSPQ_UPDATE ||
+ (isr & BIU2400_R2HST_ISTAT_MASK) == ISP2400R2HST_ATIO_RQST_UPDATE)) {
iptr = ISP_READ(isp, BIU2400_ATIO_RSPINP);
optr = isp->isp_atioodx;
@@ -5107,9 +5109,11 @@ again:
break;
}
optr = ISP_NXT_QENTRY(oop, RESULT_QUEUE_LEN(isp));
+ }
+ if (isp->isp_atioodx != optr) {
ISP_WRITE(isp, BIU2400_ATIO_RSPOUTP, optr);
+ isp->isp_atioodx = optr;
}
- isp->isp_atioodx = optr;
}
#endif
@@ -5284,7 +5288,6 @@ again:
optr = ISP_NXT_QENTRY(tsto, RESULT_QUEUE_LEN(isp));
}
if (r > 0) {
- ISP_WRITE(isp, isp->isp_respoutrp, optr);
ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */
last_etype = etype;
continue;
@@ -5319,7 +5322,6 @@ again:
if (sp->req_header.rqs_flags & RQSFLAG_MASK) {
if (sp->req_header.rqs_flags & RQSFLAG_CONTINUATION) {
isp_print_bytes(isp, "unexpected continuation segment", QENTRY_LEN, sp);
- ISP_WRITE(isp, isp->isp_respoutrp, optr);
last_etype = etype;
continue;
}
@@ -5343,7 +5345,6 @@ again:
}
if (sp->req_header.rqs_flags & RQSFLAG_BADORDER) {
isp_print_bytes(isp, "invalid IOCB ordering", QENTRY_LEN, sp);
- ISP_WRITE(isp, isp->isp_respoutrp, optr);
last_etype = etype;
continue;
}
@@ -5352,7 +5353,6 @@ again:
if (!ISP_VALID_HANDLE(isp, sp->req_handle)) {
isp_prt(isp, ISP_LOGERR, "bad request handle 0x%x (iocb type 0x%x)", sp->req_handle, etype);
ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */
- ISP_WRITE(isp, isp->isp_respoutrp, optr);
last_etype = etype;
continue;
}
@@ -5369,7 +5369,6 @@ again:
isp_prt(isp, ISP_LOGERR, "cannot find handle 0x%x (status 0x%x)", sp->req_handle, ts);
}
ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */
- ISP_WRITE(isp, isp->isp_respoutrp, optr);
last_etype = etype;
continue;
}
OpenPOWER on IntegriCloud