diff options
author | mav <mav@FreeBSD.org> | 2009-10-07 15:40:04 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2009-10-07 15:40:04 +0000 |
commit | 879668e11f814231a5d5f27b64d4d558e6b5b4ad (patch) | |
tree | 190bc34a270650227fbe93184aed5a46afe77ab9 /sys/dev/ahci | |
parent | b6e5e1e0aaa6b3ee5352a9acf334ae1e4fc04330 (diff) | |
download | FreeBSD-src-879668e11f814231a5d5f27b64d4d558e6b5b4ad.zip FreeBSD-src-879668e11f814231a5d5f27b64d4d558e6b5b4ad.tar.gz |
On command timeout handle frozen command first, to not run it inside
XXX_end_transaction().
Submitted by: avg
Diffstat (limited to 'sys/dev/ahci')
-rw-r--r-- | sys/dev/ahci/ahci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 273c276..f420629 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -1259,15 +1259,16 @@ ahci_timeout(struct ahci_slot *slot) if (!ch->readlog) xpt_freeze_simq(ch->sim, ch->numrslots); - /* Handle command with timeout. */ - ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT); - /* Handle the rest of commands. */ + /* Handle frozen command. */ if (ch->frozen) { union ccb *fccb = ch->frozen; ch->frozen = NULL; fccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ; xpt_done(fccb); } + /* Handle command with timeout. */ + ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT); + /* Handle the rest of commands. */ for (i = 0; i < ch->numslots; i++) { /* Do we have a running request on slot? */ if (ch->slot[i].state < AHCI_SLOT_RUNNING) |