ioat(4): Add additional CTR tracing during reset

This commit is contained in:
Conrad Meyer 2016-08-29 20:51:34 +00:00
parent 1bbc06b85b
commit ee5642bb35
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305028

View File

@ -1831,6 +1831,9 @@ ioat_reset_hw(struct ioat_softc *ioat)
ioat->resetting_cleanup = TRUE;
mtx_unlock(&ioat->cleanup_lock);
CTR2(KTR_IOAT, "%s channel=%u quiesced and drained", __func__,
ioat->chan_idx);
status = ioat_get_chansts(ioat);
if (is_ioat_active(status) || is_ioat_idle(status))
ioat_suspend(ioat);
@ -1851,6 +1854,9 @@ ioat_reset_hw(struct ioat_softc *ioat)
chanerr = ioat_read_4(ioat, IOAT_CHANERR_OFFSET);
ioat_write_4(ioat, IOAT_CHANERR_OFFSET, chanerr);
CTR2(KTR_IOAT, "%s channel=%u hardware suspended", __func__,
ioat->chan_idx);
/*
* IOAT v3 workaround - CHANERRMSK_INT with 3E07h to masks out errors
* that can cause stability issues for IOAT v3.
@ -1870,6 +1876,8 @@ ioat_reset_hw(struct ioat_softc *ioat)
}
ioat_reset(ioat);
CTR2(KTR_IOAT, "%s channel=%u hardware reset", __func__,
ioat->chan_idx);
/* Wait at most 20 ms */
for (timeout = 0; ioat_reset_pending(ioat) && timeout < 20; timeout++)
@ -1919,11 +1927,16 @@ ioat_reset_hw(struct ioat_softc *ioat)
ioat_write_chancmp(ioat, ioat->comp_update_bus_addr);
ioat_write_chainaddr(ioat, ioat->ring[0]->hw_desc_bus_addr);
error = 0;
CTR2(KTR_IOAT, "%s channel=%u configured channel", __func__,
ioat->chan_idx);
out:
/* Enqueues a null operation and ensures it completes. */
if (error == 0)
if (error == 0) {
error = ioat_start_channel(ioat);
CTR2(KTR_IOAT, "%s channel=%u started channel", __func__,
ioat->chan_idx);
}
/*
* Resume completions now that ring state is consistent.
@ -1943,6 +1956,7 @@ ioat_reset_hw(struct ioat_softc *ioat)
if (ioat->is_completion_pending)
callout_reset(&ioat->poll_timer, 1, ioat_poll_timer_callback,
ioat);
CTR2(KTR_IOAT, "%s channel=%u reset done", __func__, ioat->chan_idx);
mtx_unlock(IOAT_REFLK);
return (error);