diff options
author | David Milburn <dmilburn@redhat.com> | 2008-01-25 13:16:18 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-30 14:03:39 -0500 |
commit | 969ceffb6696ac361db9dbc33c83f855dbdb1528 (patch) | |
tree | b542507aa954eef1311b94f7b43ea31c23c10f1e /drivers/scsi | |
parent | 2adbfa333ad2c365bd27f3cf21ae464501d9619d (diff) |
[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: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index e310e414067f..bff7f8c59856 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -1658,9 +1658,12 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb) | |||
1658 | untagged_q = &(ahc->untagged_queues[target_offset]); | 1658 | untagged_q = &(ahc->untagged_queues[target_offset]); |
1659 | TAILQ_REMOVE(untagged_q, scb, links.tqe); | 1659 | TAILQ_REMOVE(untagged_q, scb, links.tqe); |
1660 | BUG_ON(!TAILQ_EMPTY(untagged_q)); | 1660 | BUG_ON(!TAILQ_EMPTY(untagged_q)); |
1661 | } | 1661 | } else if ((scb->flags & SCB_ACTIVE) == 0) { |
1662 | 1662 | /* | |
1663 | if ((scb->flags & SCB_ACTIVE) == 0) { | 1663 | * Transactions aborted from the untagged queue may |
1664 | * not have been dispatched to the controller, so | ||
1665 | * only check the SCB_ACTIVE flag for tagged transactions. | ||
1666 | */ | ||
1664 | printf("SCB %d done'd twice\n", scb->hscb->tag); | 1667 | printf("SCB %d done'd twice\n", scb->hscb->tag); |
1665 | ahc_dump_card_state(ahc); | 1668 | ahc_dump_card_state(ahc); |
1666 | panic("Stopping for safety"); | 1669 | panic("Stopping for safety"); |