linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.8.1] sata_nv.c
@ 2004-08-19 20:41 achew
  2004-08-28 23:30 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: achew @ 2004-08-19 20:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-ide, jgarzik

This patch fixes a problem introduced when CK804 support was added.  mmio_base can only be set in the CK804 case,
else libata will attempt to iounmap mmio_base, which isn't iomapped for the non-CK804 case.  Still need the bar 5
address, so steal from host_set->ports[0]->ioaddr.scr_addr.  Jeff, let me know if this is a bad thing to do.




--- linux-2.6.8.1/drivers/scsi/sata_nv.c	2004-08-19 13:38:27.630375944 -0700
+++ linux/drivers/scsi/sata_nv.c	2004-08-19 13:36:05.668957360 -0700
@@ -20,6 +20,10 @@
  *  If you do not delete the provisions above, a recipient may use your
  *  version of this file under either the OSL or the GPL.
  *
+ *  0.03
+ *     - Fixed a bug where the hotplug handlers for non-CK804/MCP04 were using
+ *       mmio_base, which is only set for the CK804/MCP04 case.
+ *
  *  0.02
  *     - Added support for CK804 SATA controller.
  *
@@ -40,7 +44,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME			"sata_nv"
-#define DRV_VERSION			"0.02"
+#define DRV_VERSION			"0.03"
 
 #define NV_PORTS			2
 #define NV_PIO_MASK			0x1f
@@ -417,33 +421,33 @@
 	u8 intr_mask;
 
 	outb(NV_INT_STATUS_HOTPLUG,
-		(unsigned long)probe_ent->mmio_base + NV_INT_STATUS);
+		probe_ent->port[0].scr_addr + NV_INT_STATUS);
 
-	intr_mask = inb((unsigned long)probe_ent->mmio_base + NV_INT_ENABLE);
+	intr_mask = inb(probe_ent->port[0].scr_addr + NV_INT_ENABLE);
 	intr_mask |= NV_INT_ENABLE_HOTPLUG;
 
-	outb(intr_mask, (unsigned long)probe_ent->mmio_base + NV_INT_ENABLE);
+	outb(intr_mask, probe_ent->port[0].scr_addr + NV_INT_ENABLE);
 }
 
 static void nv_disable_hotplug(struct ata_host_set *host_set)
 {
 	u8 intr_mask;
 
-	intr_mask = inb((unsigned long)host_set->mmio_base + NV_INT_ENABLE);
+	intr_mask = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_ENABLE);
 
 	intr_mask &= ~(NV_INT_ENABLE_HOTPLUG);
 
-	outb(intr_mask, (unsigned long)host_set->mmio_base + NV_INT_ENABLE);
+	outb(intr_mask, host_set->ports[0]->ioaddr.scr_addr + NV_INT_ENABLE);
 }
 
 static void nv_check_hotplug(struct ata_host_set *host_set)
 {
 	u8 intr_status;
 
-	intr_status = inb((unsigned long)host_set->mmio_base + NV_INT_STATUS);
+	intr_status = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS);
 
 	// Clear interrupt status.
-	outb(0xff, (unsigned long)host_set->mmio_base + NV_INT_STATUS);
+	outb(0xff, host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS);
 
 	if (intr_status & NV_INT_STATUS_HOTPLUG) {
 		if (intr_status & NV_INT_STATUS_PDEV_ADDED)



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

* Re: [PATCH 2.6.8.1] sata_nv.c
  2004-08-19 20:41 [PATCH 2.6.8.1] sata_nv.c achew
@ 2004-08-28 23:30 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2004-08-28 23:30 UTC (permalink / raw)
  To: achew; +Cc: linux-kernel, linux-ide

achew wrote:
> This patch fixes a problem introduced when CK804 support was added.  
> mmio_base can only be set in the CK804 case,
> else libata will attempt to iounmap mmio_base, which isn't iomapped for 
> the non-CK804 case.  Still need the bar 5
> address, so steal from host_set->ports[0]->ioaddr.scr_addr.  Jeff, let 
> me know if this is a bad thing to do.

applied.

PLEASE use a descriptive subject line.

The email subject, after stripping '\[.*]', becomes a one-line summary 
of the change, and is directly injected into the BK changelog.

	Jeff




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

end of thread, other threads:[~2004-08-28 23:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-19 20:41 [PATCH 2.6.8.1] sata_nv.c achew
2004-08-28 23:30 ` Jeff Garzik

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).