summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2017-03-05 09:55:16 +0000
committerjmatthew <jmatthew@openbsd.org>2017-03-05 09:55:16 +0000
commit92a87063e90c0e9b7ea1242615f3de300df7f3f5 (patch)
tree60eda8619ba019803b1ae996a0a49d9187173356
parentWe've fixed PID handling, so update the comment describing ps_mainproc (diff)
downloadwireguard-openbsd-92a87063e90c0e9b7ea1242615f3de300df7f3f5.tar.xz
wireguard-openbsd-92a87063e90c0e9b7ea1242615f3de300df7f3f5.zip
When we're unable to determine which NCQ command failed, fail all active
commands rather than proceeding to an assertion failure. This matches how we handle the same condition with non-queued commands, and the behaviour of every other ahci driver I can find. Add a printf there so we might get some idea of how often this condition arises and what happens afterwards. ok dlg@
-rw-r--r--sys/dev/ic/ahci.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c
index d600f3eff3a..699e482d71b 100644
--- a/sys/dev/ic/ahci.c
+++ b/sys/dev/ic/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.28 2016/10/02 18:56:05 patrick Exp $ */
+/* $OpenBSD: ahci.c,v 1.29 2017/03/05 09:55:16 jmatthew Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -2158,6 +2158,12 @@ ahci_port_intr(struct ahci_port *ap, u_int32_t ci_mask)
PORTNAME(ap), err_slot);
ccb = &ap->ap_ccbs[err_slot];
+ if (ccb->ccb_xa.state != ATA_S_ONCHIP) {
+ printf("%s: NCQ errored slot %d is idle"
+ " (%08x active)\n", PORTNAME(ap), err_slot,
+ ci_saved);
+ goto failall;
+ }
} else {
/* Didn't reset, could gather extended info from log. */
}