linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] libata sata_qstor fix oops on rmmod
@ 2007-11-07 15:51 Mark Lord
  2007-11-07 15:52 ` [PATCH 2/4] libata sata_qstor nuke idle state Mark Lord
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Mark Lord @ 2007-11-07 15:51 UTC (permalink / raw)
  To: Jeff Garzik, Tejun Heo, Alan Cox, IDE/ATA development list

sata_qstor fix oops on rmmod.

sata_qstor likes to disable the chip on module unload,
so it provides a libata "host_stop" method to do this.
But in recent kernels, this routine is now called too late,
after the PCI mmio resources have already been released.
Which produces an oops.

This really needs to be fixed higher up.
For an interim workaround, we disable this function for now.

This belongs in 2.6.24.

Signed-off-by:  Mark Lord <mlord@pobox.com>
---

--- old/drivers/ata/sata_qstor.c	2007-10-12 12:43:44.000000000 -0400
+++ linux/drivers/ata/sata_qstor.c	2007-11-06 22:32:34.000000000 -0500
@@ -523,10 +523,20 @@
 
 static void qs_host_stop(struct ata_host *host)
 {
+#if 0
+	/*
+	 * This code used to work, but now segfaults
+	 * because we get called *after* our mmio resources
+	 * have already been unmapped.  That's probably a bug
+	 * in an upper layer somewhere, so this code has been
+	 * disabled (but left in place) until it gets tracked
+	 * down properly.
+	 */
 	void __iomem *mmio_base = qs_mmio_base(host);
 
 	writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */
 	writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */
+#endif
 }
 
 static void qs_host_init(struct ata_host *host, unsigned int chip_id)

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-11-08 18:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-07 15:51 [PATCH 1/4] libata sata_qstor fix oops on rmmod Mark Lord
2007-11-07 15:52 ` [PATCH 2/4] libata sata_qstor nuke idle state Mark Lord
2007-11-08 18:14   ` Jeff Garzik
2007-11-07 15:53 ` [PATCH 3/4] libata sata_qstor workaround for spurious interrupts Mark Lord
2007-11-07 15:54 ` [PATCH 4/4] libata sata_qstor conversion to new error handling (EH) Mark Lord
2007-11-07 23:27   ` Jeff Garzik
2007-11-07 23:32     ` Mark Lord
2007-11-07 23:36       ` Mark Lord
2007-11-07 23:45         ` Jeff Garzik
2007-11-07 23:58           ` Mark Lord
2007-11-07 16:24 ` [PATCH 1/4] libata sata_qstor fix oops on rmmod Mark Lord
2007-11-08  2:30 ` Tejun Heo
2007-11-08 13:45 ` Mark Lord

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).