From ea9e23edf392405750dd0bf886a038e8a5202e17 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Wed, 2 Nov 2016 23:18:16 +0000 Subject: [PATCH] ioat(4): Read CHANSTS register for suspended/halted checks The device doesn't accurately update the CHANCMP address with the device state when the device is suspended or halted. So, read the CHANSTS register to check for those states. We still need to read the CHANCMP address for the last completed descriptor. Sponsored by: Dell EMC Isilon --- sys/dev/ioat/ioat.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/ioat/ioat.c b/sys/dev/ioat/ioat.c index 68c207a953f6..a434b4225348 100644 --- a/sys/dev/ioat/ioat.c +++ b/sys/dev/ioat/ioat.c @@ -747,6 +747,12 @@ out: wakeup(&ioat->tail); } + /* + * The device doesn't seem to reliably push suspend/halt statuses to + * the channel completion memory address, so poll the device register + * here. + */ + comp_update = ioat_get_chansts(ioat) & IOAT_CHANSTS_STATUS; if (!is_ioat_halted(comp_update) && !is_ioat_suspended(comp_update)) return;