Commit 969ceffb authored by David Milburn's avatar David Milburn Committed by James Bottomley

[SCSI] aic7xxx: fix ahc_done check SCB_ACTIVE for tagged transactions

The driver only needs to check the SCB_ACTIVE flag if the SCB is not
in the untagged queue.

If the driver is in error recovery, you may end panic'ing on a TUR
that is in the untagged queue.

Attempting to queue an ABORT message
CDB: 0x0 0x0 0x0 0x0 0x0 0x0
SCB 3 done'd twice

This patch is included in Adaptec's 6.3.11 driver on their website.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 2adbfa33
...@@ -1658,9 +1658,12 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb) ...@@ -1658,9 +1658,12 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
untagged_q = &(ahc->untagged_queues[target_offset]); untagged_q = &(ahc->untagged_queues[target_offset]);
TAILQ_REMOVE(untagged_q, scb, links.tqe); TAILQ_REMOVE(untagged_q, scb, links.tqe);
BUG_ON(!TAILQ_EMPTY(untagged_q)); BUG_ON(!TAILQ_EMPTY(untagged_q));
} } else if ((scb->flags & SCB_ACTIVE) == 0) {
/*
if ((scb->flags & SCB_ACTIVE) == 0) { * Transactions aborted from the untagged queue may
* not have been dispatched to the controller, so
* only check the SCB_ACTIVE flag for tagged transactions.
*/
printf("SCB %d done'd twice\n", scb->hscb->tag); printf("SCB %d done'd twice\n", scb->hscb->tag);
ahc_dump_card_state(ahc); ahc_dump_card_state(ahc);
panic("Stopping for safety"); panic("Stopping for safety");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment