diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2017-03-05 09:55:17 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2017-03-05 09:55:17 +0000 |
commit | 25f2541adca2938e1554b126a87677911dd05257 (patch) | |
tree | 7f9c8ffbbdd544d4b2e6d0eb962a7c06e2d73d6e /sys | |
parent | 8b911f5c7c3915fc38edaa2b8d11d5b84b78f8ff (diff) |
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@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/ahci.c | 8 |
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. */ } |