summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-28 06:29:28 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-28 06:29:28 +0000
commitc32b43144a0a0722b74d8f459eef61d6b3b0811c (patch)
tree3845f50c0d45be70b4edcda59d75248ca8c29f93 /sys
parentc698ea46a920270c1fa3344fac59c0c2ec107ac2 (diff)
Due to a logic inversion, we would error out any commands that had completed
successfully and not the ones that had actually failed to complete when unable to recover from an NCQ error. ok dlg@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/ahci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index 5eb6c9590d0..fc67de0d0d8 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.101 2007/03/28 06:24:22 pascoe Exp $ */
+/* $OpenBSD: ahci.c,v 1.102 2007/03/28 06:29:27 pascoe Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -1654,7 +1654,7 @@ failall:
ahci_port_stop(ap, 1);
/* Error all the active slots. */
- ci_masked = ~ci_saved & *active;
+ ci_masked = ci_saved & *active;
while (ci_masked) {
slot = ffs(ci_masked) - 1;
ccb = &ap->ap_ccbs[slot];
@@ -1662,8 +1662,8 @@ failall:
ccb->ccb_xa.state = ATA_S_ERROR;
}
- /* Run completion for all slots. */
- ci_saved = 0;
+ /* Run completion for all active slots. */
+ ci_saved &= ~*active;
/* Don't restart the port if our problems were deemed fatal. */
if (ap->ap_state == AP_S_FATAL_ERROR)