diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-05-24 04:40:15 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-05-24 04:40:15 +0000 |
commit | af5ac829713346309d8784d737e7979488f5f348 (patch) | |
tree | 3150759b466faf14c80d6f2ef5d4eab8529544de /sys | |
parent | 8290987282000ff434f8c0fd97c12b256d1127cd (diff) |
atascsi may (will) reuse ata_xfers, meaning the xa state that
ahci_ata_cmd is called with might be the state of the xfer that
ahci set previously. this stops ahci_ata_cmd from checking the
state of ata_xfers its given, and instead trusts that atascsi is
doing the right thing.
reported and fix tested by matthew dempsky, who also did an awesome
job of tracing the problem.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/ahci.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c index 98630fcb7c0..4f0b095fcb3 100644 --- a/sys/dev/pci/ahci.c +++ b/sys/dev/pci/ahci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahci.c,v 1.164 2010/05/19 15:27:35 oga Exp $ */ +/* $OpenBSD: ahci.c,v 1.165 2010/05/24 04:40:14 dlg Exp $ */ /* * Copyright (c) 2006 David Gwynne <dlg@openbsd.org> @@ -1564,8 +1564,6 @@ ahci_start(struct ahci_ccb *ccb) struct ahci_port *ap = ccb->ccb_port; struct ahci_softc *sc = ap->ap_sc; - KASSERT(ccb->ccb_xa.state == ATA_S_PENDING); - /* Zero transferred byte count before transfer */ ccb->ccb_cmd_hdr->prdbc = 0; @@ -2349,8 +2347,6 @@ ahci_ata_cmd(struct ata_xfer *xa) struct ahci_cmd_hdr *cmd_slot; int s; - KASSERT(xa->state == ATA_S_SETUP); - if (ccb->ccb_port->ap_state == AP_S_FATAL_ERROR) goto failcmd; |