Date: Sat, 13 Feb 2016 02:55:45 +0000 (UTC) From: "Conrad E. Meyer" <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295588 - head/sys/dev/ioat Message-ID: <201602130255.u1D2tjaE037684@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Sat Feb 13 02:55:45 2016 New Revision: 295588 URL: https://svnweb.freebsd.org/changeset/base/295588 Log: ioat(4): Recheck status register on zero-descriptor wakeups Errors that halt the channel don't necessarily result in a completion update, apparently. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sat Feb 13 00:28:48 2016 (r295587) +++ head/sys/dev/ioat/ioat.c Sat Feb 13 02:55:45 2016 (r295588) @@ -630,8 +630,14 @@ ioat_process_events(struct ioat_softc *i CTR0(KTR_IOAT, __func__); - if (status == ioat->last_seen) + if (status == ioat->last_seen) { + /* + * If we landed in process_events and nothing has been + * completed, check for a timeout due to channel halt. + */ + comp_update = ioat_get_chansts(ioat); goto out; + } while (1) { desc = ioat_get_ring_entry(ioat, ioat->tail); @@ -661,8 +667,10 @@ out: ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); mtx_unlock(&ioat->cleanup_lock); - ioat_putn(ioat, completed, IOAT_ACTIVE_DESCR_REF); - wakeup(&ioat->tail); + if (completed != 0) { + ioat_putn(ioat, completed, IOAT_ACTIVE_DESCR_REF); + wakeup(&ioat->tail); + } if (!is_ioat_halted(comp_update)) return;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602130255.u1D2tjaE037684>