ioat(4): Start poll timer when descriptors are released to HW

Rather than when the software creates the descriptors.

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Conrad Meyer 2016-09-11 20:15:41 +00:00
parent dc46505973
commit f44abf1fe7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305711

View File

@ -949,6 +949,13 @@ ioat_release(bus_dmaengine_t dmaengine)
ioat = to_ioat_softc(dmaengine);
CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx);
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);
callout_stop(&ioat->shrink_timer);
}
mtx_unlock(&ioat->submit_lock);
}
@ -1788,13 +1795,6 @@ ioat_submit_single(struct ioat_softc *ioat)
atomic_add_rel_int(&ioat->head, 1);
atomic_add_rel_int(&ioat->hw_head, 1);
if (!ioat->is_completion_pending) {
ioat->is_completion_pending = TRUE;
callout_reset(&ioat->poll_timer, 1, ioat_poll_timer_callback,
ioat);
callout_stop(&ioat->shrink_timer);
}
ioat->stats.descriptors_submitted++;
}