rpms/kernel/F-12 ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch, NONE, 1.1 kernel.spec, 1.1865, 1.1866

Chuck Ebbert cebbert at fedoraproject.org
Tue Oct 13 09:38:39 UTC 2009


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv916

Modified Files:
	kernel.spec 
Added Files:
	ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch 
Log Message:
Disable 64-bit DMA on SB600 SATA controllers.

ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch:
 ahci.c |   52 ++--------------------------------------------------
 1 file changed, 2 insertions(+), 50 deletions(-)

--- NEW FILE ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch ---
ahci: revert "Restore SB600 sata controller 64 bit DMA"

revert commit 58a09b38cfcd700b796ea07ae3d2e0efbb28b561
("[libata] ahci: Restore SB600 SATA controller 64 bit DMA")

Upstream commit 58a09b38cfcd700b796ea07ae3d2e0efbb28b561 does
nearly the same thing but this patch is simplified.

Disables 64-bit DMA for _all_ boards, unlike 2.6.32 which adds a
whitelist. (The whitelist function requires a fairly large patch
that touches unrelated code.)

Doesn't revert the DMI part as other backported patches might need
the exported symbol.

Applies to 2.6.31.4

Signed-off-by: Chuck Ebbert <cebbert at redhat.com>

--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -447,7 +447,8 @@
 	[board_ahci_sb600] =
 	{
 		AHCI_HFLAGS	(AHCI_HFLAG_IGN_SERR_INTERNAL |
-				 AHCI_HFLAG_NO_MSI | AHCI_HFLAG_SECT255),
+				 AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI |
+				 AHCI_HFLAG_SECT255),
 		.flags		= AHCI_FLAG_COMMON,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= ATA_UDMA6,
@@ -2584,51 +2585,6 @@
 	}
 }
 
-/*
- * SB600 ahci controller on ASUS M2A-VM can't do 64bit DMA with older
- * BIOS.  The oldest version known to be broken is 0901 and working is
- * 1501 which was released on 2007-10-26.  Force 32bit DMA on anything
- * older than 1501.  Please read bko#9412 for more info.
- */
-static bool ahci_asus_m2a_vm_32bit_only(struct pci_dev *pdev)
-{
-	static const struct dmi_system_id sysids[] = {
-		{
-			.ident = "ASUS M2A-VM",
-			.matches = {
-				DMI_MATCH(DMI_BOARD_VENDOR,
-					  "ASUSTeK Computer INC."),
-				DMI_MATCH(DMI_BOARD_NAME, "M2A-VM"),
-			},
-		},
-		{ }
-	};
-	const char *cutoff_mmdd = "10/26";
-	const char *date;
-	int year;
-
-	if (pdev->bus->number != 0 || pdev->devfn != PCI_DEVFN(0x12, 0) ||
-	    !dmi_check_system(sysids))
-		return false;
-
-	/*
-	 * Argh.... both version and date are free form strings.
-	 * Let's hope they're using the same date format across
-	 * different versions.
-	 */
-	date = dmi_get_system_info(DMI_BIOS_DATE);
-	year = dmi_get_year(DMI_BIOS_DATE);
-	if (date && strlen(date) >= 10 && date[2] == '/' && date[5] == '/' &&
-	    (year > 2007 ||
-	     (year == 2007 && strncmp(date, cutoff_mmdd, 5) >= 0)))
-		return false;
-
-	dev_printk(KERN_WARNING, &pdev->dev, "ASUS M2A-VM: BIOS too old, "
-		   "forcing 32bit DMA, update BIOS\n");
-
-	return true;
-}
-
 static bool ahci_broken_system_poweroff(struct pci_dev *pdev)
 {
 	static const struct dmi_system_id broken_systems[] = {
@@ -2789,10 +2745,6 @@
 	if (board_id == board_ahci_sb700 && pdev->revision >= 0x40)
 		hpriv->flags &= ~AHCI_HFLAG_IGN_SERR_INTERNAL;
 
-	/* apply ASUS M2A_VM quirk */
-	if (ahci_asus_m2a_vm_32bit_only(pdev))
-		hpriv->flags |= AHCI_HFLAG_32BIT_ONLY;
-
 	if ((hpriv->flags & AHCI_HFLAG_NO_MSI) || pci_enable_msi(pdev))
 		pci_intx(pdev, 1);
 


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.1865
retrieving revision 1.1866
diff -u -p -r1.1865 -r1.1866
--- kernel.spec	13 Oct 2009 03:13:12 -0000	1.1865
+++ kernel.spec	13 Oct 2009 09:38:39 -0000	1.1866
@@ -748,6 +748,9 @@ Patch14101: improve-resource-counter-sca
 # fix boot hang on some systems
 Patch14200: acpi-revert-attach-device-to-handle-early.patch
 
+# disable 64-bit DMA on SB600 SATA controllers
+Patch14300: ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch
+
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1399,6 +1402,9 @@ ApplyPatch improve-resource-counter-scal
 # fix boot hang on some systems
 ApplyPatch acpi-revert-attach-device-to-handle-early.patch
 
+# disable 64-bit DMA on SB600 SATA controllers
+ApplyPatch ahci-revert-restore-sb600-sata-controller-64-bit-dma.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2053,6 +2059,9 @@ fi
 # and build.
 
 %changelog
+* Tue Oct 13 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31.4-80
+- Disable 64-bit DMA on SB600 SATA controllers.
+
 * Tue Oct 13 2009 Kyle McMartin <kyle at redhat.com>
 - Always build perf docs, regardless of whether we build kernel-doc.
   Seems rather unfair to not ship the manpages half the time.




More information about the fedora-extras-commits mailing list