[<prev] [next>] [day] [month] [year] [list]
Message-ID: <455A751F.4040607@us.ibm.com>
Date: Tue, 14 Nov 2006 18:02:07 -0800
From: "Darrick J. Wong" <djwong@...ibm.com>
To: linux-scsi <linux-scsi@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
CC: Alexis Bruemmer <alexisb@...ibm.com>
Subject: [PATCH] aic94xx: delete ascb timers when freeing queues
When the aic94xx driver creates ascbs, each ascb is initialized with a
timeout timer. If there are any ascbs left over when the driver is being
torn down, these timers need to be deleted. In particular, we seem to
hit this case when ascbs are issued yet never end up on the done list.
Right now there's a sequencer bug that results in this happening every
so often.
CONTROL PHY commands are typically sent when things are really messed
up with the sequencer; however, any other leftover ascb should produce
loud warnings.
--
Signed-off-by: Darrick J. Wong <djwong@...ibm.com>
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index 2148afd..c2c233d 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -727,6 +727,15 @@ static void asd_free_queues(struct asd_h
list_for_each_safe(pos, n, &pending) {
struct asd_ascb *ascb = list_entry(pos, struct asd_ascb, list);
+ /*
+ * Delete unexpired ascb timers. This may happen if we issue
+ * a CONTROL PHY scb to an adapter and rmmod before the scb
+ * times out. Apparently we don't wait for the CONTROL PHY
+ * to complete, so it doesn't matter if we kill the timer.
+ */
+ del_timer_sync(&ascb->timer);
+ WARN_ON(ascb->scb->header.opcode != CONTROL_PHY);
+
list_del_init(pos);
ASD_DPRINTK("freeing from pending\n");
asd_ascb_free(ascb);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists