svn commit: r227905 - projects/head_mfi/sys/dev/mfi
Xin LI
delphij at FreeBSD.org
Wed Nov 23 20:01:35 UTC 2011
Author: delphij
Date: Wed Nov 23 20:01:35 2011
New Revision: 227905
URL: http://svn.freebsd.org/changeset/base/227905
Log:
Apply a different approach for the timeout from Scott Long. Instead of doing
the (expensive) dummy read and do nothing with the result, move it to the end
of the interrupt handler, and restart the interrupt handler if we see more
pending job to do.
Modified:
projects/head_mfi/sys/dev/mfi/mfi.c
Modified: projects/head_mfi/sys/dev/mfi/mfi.c
==============================================================================
--- projects/head_mfi/sys/dev/mfi/mfi.c Wed Nov 23 19:38:32 2011 (r227904)
+++ projects/head_mfi/sys/dev/mfi/mfi.c Wed Nov 23 20:01:35 2011 (r227905)
@@ -1230,12 +1230,7 @@ mfi_intr(void *arg)
if (sc->mfi_check_clear_intr(sc))
return;
- /*
- * Do a dummy read to flush the interrupt ACK that we just performed,
- * ensuring that everything is really, truly consistent.
- */
- (void)sc->mfi_read_fw_status(sc);
-
+restart:
pi = sc->mfi_comms->hw_pi;
ci = sc->mfi_comms->hw_ci;
mtx_lock(&sc->mfi_io_lock);
@@ -1260,6 +1255,14 @@ mfi_intr(void *arg)
mfi_startio(sc);
mtx_unlock(&sc->mfi_io_lock);
+ /*
+ * Dummy read to flush the bus; this ensures that the indexes are up
+ * to date. Restart processing if more commands have come it.
+ */
+ (void)sc->mfi_read_fw_status(sc);
+ if (pi != sc->mfi_comms->hw_pi)
+ goto restart;
+
return;
}
More information about the svn-src-projects
mailing list