All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] ahci: Enable SB600 64bit DMA on MSI K9AGM2 (MS-7327)
@ 2012-06-26  2:45 Mark Nelson
  0 siblings, 0 replies; only message in thread
From: Mark Nelson @ 2012-06-26  2:45 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide, tj

I've come across another motherboard that uses an SB600 southbridge so I
figured I'd run some tests to see if it worked correctly with 64bit DMA
enabled in the AHCI driver. And it does indeed work properly, so this patch
enables 64bit DMA on the MSI K9AGM2 (MS-7327).

Similar to my earlier patches that enabled 64bit DMA on the MSI K9A2
Platinum (e65cc194f7628ecaa02462f22f42fb09b50dcd49) and the Asus M3A
(3c4aa91f21f65b7b40bdfb015eacbcb8453ccae2) this patch matches on a Board
Product Name DMI field of "MS-7327" which stays constant across all BIOS
versions.

Testing was done in exactly the same way as it was for the other patches
(http://patchwork.ozlabs.org/patch/36881) - with 4GB RAM installed in the
machine (which had ~1GB remapped above the 4GB boundary) a large (~8GB)
file was copied and the checksums of the copy and original were compared.
To make sure that we were actually DMAing to a high enough address for the
copy the following simple patch was used:

---
  drivers/ata/libahci.c |    5 +++++
  1 file changed, 5 insertions(+)

Index: linux-2.6/drivers/ata/libahci.c
===================================================================
--- linux-2.6.orig/drivers/ata/libahci.c
+++ linux-2.6/drivers/ata/libahci.c
@@ -1395,6 +1395,11 @@ static unsigned int ahci_fill_sg(struct
  	for_each_sg(qc->sg, sg, qc->n_elem, si) {
  		dma_addr_t addr = sg_dma_address(sg);
  		u32 sg_len = sg_dma_len(sg);
+		static int cnt;
+
+		if (addr > 0xffffffffULL && !(cnt++ % 500))
+			printk("ahci: dma'ing to address 0x%llx\n",
+				(unsigned long long)addr);

  		ahci_sg[si].addr = cpu_to_le32(addr & 0xffffffff);
  		ahci_sg[si].addr_hi = cpu_to_le32((addr >> 16) >> 16);


For the testing I had an old enough CPU that I could flash to and test
all the BIOS releases going all the way back to 1.0. I ended up testing
7 BIOS releases from 1.0 to 1.6 (all those that MSI publicly released)
to make sure that there weren't any regressions lurking in there.

And all worked flawlessly. Thus this patch :)

Thanks!
Mark

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-26  2:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-26  2:45 [PATCH 0/1] ahci: Enable SB600 64bit DMA on MSI K9AGM2 (MS-7327) Mark Nelson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.