Skip to content

Commit

Permalink
[SCSI] aic7xxx: fix ahc_done check SCB_ACTIVE for tagged transactions
Browse files Browse the repository at this point in the history
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: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
David Milburn authored and James Bottomley committed Jan 30, 2008
1 parent 2adbfa3 commit 969ceff
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/scsi/aic7xxx/aic7xxx_osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1658,9 +1658,12 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
untagged_q = &(ahc->untagged_queues[target_offset]);
TAILQ_REMOVE(untagged_q, scb, links.tqe);
BUG_ON(!TAILQ_EMPTY(untagged_q));
}

if ((scb->flags & SCB_ACTIVE) == 0) {
} else 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);
ahc_dump_card_state(ahc);
panic("Stopping for safety");
Expand Down

0 comments on commit 969ceff

Please sign in to comment.