diff options
| author | Conrad Meyer <cem@FreeBSD.org> | 2016-11-30 21:59:52 +0000 |
|---|---|---|
| committer | Conrad Meyer <cem@FreeBSD.org> | 2016-11-30 21:59:52 +0000 |
| commit | 58a639b77cdd79858e92f719fe11e3fa005eee9f (patch) | |
| tree | f780ea0dd6e9e991fe1ea2790eccbbe3ec6ba9da /sys/dev/ioat | |
| parent | 26e287836b13fdb777857a47fe48f504d77d9696 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ioat')
| -rw-r--r-- | sys/dev/ioat/ioat.c | 14 | ||||
| -rw-r--r-- | sys/dev/ioat/ioat_internal.h | 1 |
2 files changed, 10 insertions, 5 deletions
diff --git a/sys/dev/ioat/ioat.c b/sys/dev/ioat/ioat.c index b7a2b44327de..824d229dfde7 100644 --- a/sys/dev/ioat/ioat.c +++ b/sys/dev/ioat/ioat.c @@ -947,6 +947,7 @@ ioat_acquire(bus_dmaengine_t dmaengine) ioat = to_ioat_softc(dmaengine); mtx_lock(&ioat->submit_lock); CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx); + ioat->acq_head = ioat->head; } int @@ -976,12 +977,15 @@ ioat_release(bus_dmaengine_t dmaengine) CTR4(KTR_IOAT, "%s channel=%u dispatch2 hw_head=%u head=%u", __func__, ioat->chan_idx, ioat->hw_head & UINT16_MAX, ioat->head); - ioat_write_2(ioat, IOAT_DMACOUNT_OFFSET, (uint16_t)ioat->hw_head); + if (ioat->acq_head != ioat->head) { + ioat_write_2(ioat, IOAT_DMACOUNT_OFFSET, + (uint16_t)ioat->hw_head); - if (!ioat->is_completion_pending) { - ioat->is_completion_pending = TRUE; - callout_reset(&ioat->poll_timer, 1, ioat_poll_timer_callback, - ioat); + if (!ioat->is_completion_pending) { + ioat->is_completion_pending = TRUE; + callout_reset(&ioat->poll_timer, 1, + ioat_poll_timer_callback, ioat); + } } mtx_unlock(&ioat->submit_lock); } diff --git a/sys/dev/ioat/ioat_internal.h b/sys/dev/ioat/ioat_internal.h index 0ed05fc677f4..5d107b0420cf 100644 --- a/sys/dev/ioat/ioat_internal.h +++ b/sys/dev/ioat/ioat_internal.h @@ -483,6 +483,7 @@ struct ioat_softc { boolean_t resetting_cleanup; /* cleanup_lock */ uint32_t head; + uint32_t acq_head; uint32_t tail; uint32_t hw_head; uint32_t ring_size_order; |
