From af5ac829713346309d8784d737e7979488f5f348 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Mon, 24 May 2010 04:40:15 +0000 Subject: 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. --- sys/dev/pci/ahci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'sys') 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 @@ -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; -- cgit v1.2.3