diff options
author | cem <cem@FreeBSD.org> | 2016-02-13 02:55:45 +0000 |
---|---|---|
committer | cem <cem@FreeBSD.org> | 2016-02-13 02:55:45 +0000 |
commit | 0a4cceb161dfcb232aa9f5d8664e017c2590e0d9 (patch) | |
tree | 43124df58e3187816ba0b47044985bb5773bccb6 /sys/dev/ioat | |
parent | 5c7654c5553069c19ceb0c1a04810268a3511f7b (diff) | |
download | FreeBSD-src-0a4cceb161dfcb232aa9f5d8664e017c2590e0d9.zip FreeBSD-src-0a4cceb161dfcb232aa9f5d8664e017c2590e0d9.tar.gz |
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
Diffstat (limited to 'sys/dev/ioat')
-rw-r--r-- | sys/dev/ioat/ioat.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/ioat/ioat.c b/sys/dev/ioat/ioat.c index 956e8d1..3215c6f 100644 --- a/sys/dev/ioat/ioat.c +++ b/sys/dev/ioat/ioat.c @@ -630,8 +630,14 @@ ioat_process_events(struct ioat_softc *ioat) 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; |