Date: Wed, 23 Nov 2011 20:01:35 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r227905 - projects/head_mfi/sys/dev/mfi Message-ID: <201111232001.pANK1Za3060854@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111232001.pANK1Za3060854>