[kernel] r12653 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series

Martin Michlmayr tbm at alioth.debian.org
Thu Jan 29 10:31:13 UTC 2009


Author: tbm
Date: Thu Jan 29 10:31:12 2009
New Revision: 12653

Log:
sata-mv fixes


Added:
   dists/sid/linux-2.6/debian/patches/bugfix/all/sata_mv-fix-8-port-timeouts.patch
   dists/sid/linux-2.6/debian/patches/bugfix/all/sata_mv-init-main-irq-mask.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/series/14

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	(original)
+++ dists/sid/linux-2.6/debian/changelog	Thu Jan 29 10:31:12 2009
@@ -10,6 +10,8 @@
 
   [ Martin Michlmayr ]
   * rt2x00: Fix VGC lower bound initialization. (Closes: #510607)
+  * sata_mv: fix 8-port timeouts on 508x/6081 chips.
+  * sata_mv: Properly initialize main irq mask.
 
  -- dann frazier <dannf at debian.org>  Mon, 19 Jan 2009 13:11:06 -0700
 

Added: dists/sid/linux-2.6/debian/patches/bugfix/all/sata_mv-fix-8-port-timeouts.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/sata_mv-fix-8-port-timeouts.patch	Thu Jan 29 10:31:12 2009
@@ -0,0 +1,30 @@
+From: Mark Lord <liml at rtr.ca>
+Date: Mon, 19 Jan 2009 23:04:37 +0000 (-0500)
+Subject: sata_mv: fix 8-port timeouts on 508x/6081 chips
+X-Git-Tag: v2.6.29-rc3~13^2~7
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=b0bccb18bc523d1d5060d25958f12438062829a9
+
+sata_mv: fix 8-port timeouts on 508x/6081 chips
+
+Fix a longstanding bug for the 8-port Marvell Sata controllers (508x/6081),
+where accesses to the upper 4 ports would cause lost-interrupts / timeouts
+for the lower 4-ports.  With this patch, the 6081 boards should finally be
+reliable enough for mainstream use with Linux.
+
+Signed-off-by: Mark Lord <mlord at pobox.com>
+Signed-off-by: Jeff Garzik <jgarzik at redhat.com>
+---
+
+diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
+index 8691863..ce9d6ad 100644
+--- a/drivers/ata/sata_mv.c
++++ b/drivers/ata/sata_mv.c
+@@ -883,7 +883,7 @@ static void mv_start_dma(struct ata_port *ap, void __iomem *port_mmio,
+ 		struct mv_host_priv *hpriv = ap->host->private_data;
+ 		int hardport = mv_hardport_from_port(ap->port_no);
+ 		void __iomem *hc_mmio = mv_hc_base_from_port(
+-					mv_host_base(ap->host), hardport);
++					mv_host_base(ap->host), ap->port_no);
+ 		u32 hc_irq_cause, ipending;
+ 
+ 		/* clear EDMA event indicators, if any */

Added: dists/sid/linux-2.6/debian/patches/bugfix/all/sata_mv-init-main-irq-mask.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/sata_mv-init-main-irq-mask.patch	Thu Jan 29 10:31:12 2009
@@ -0,0 +1,53 @@
+From: Thomas Reitmayr <treitmayr at devbase.at>
+Date: Sat, 24 Jan 2009 19:24:58 +0000 (+0100)
+Subject: sata_mv: Properly initialize main irq mask
+X-Git-Tag: v2.6.29-rc3~13^2~4
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=5d0fb2e730e2085021cf5c8b6d14983e92aea75b
+
+sata_mv: Properly initialize main irq mask
+
+I noticed that during initialization sata_mv.c assumes that the main
+interrupt mask has its default value of 0. The function
+mv_platform_probe(..) initializes a shadow irq mask with 0 assuming
+that's the value of the controller's register. Now
+mv_set_main_irq_mask(..) only writes the controller's register if the
+new value differs from the "shadowed" value. This is fatal when trying
+to disable all interrupts in mv_init_host(..), i.e. the following
+function call does not write anything to the main irq mask register:
+
+  mv_set_main_irq_mask(host, ~0, 0);
+
+The effect I see on my machine (QNAP TS-109 II) with booting via kexec
+(with Linux as a 2nd-stage boot loader) is that if the sata_mv module
+was still loaded when performing kexec, then the new kernel's sata_mv
+module starts up with interrupts enabled. This results in an unhandled
+IRQ and breaks the boot process.
+
+The unhandled interrupt itself might also be fixed by Lennert's patch
+proposed at http://markmail.org/message/kwvzxstnlsa3s26w which I did not
+try yet.
+
+However I still propose to additionally initialize the shadow variable
+with the current contents of the main irq mask register to get both in
+sync and allow proper disabling the main irq mask. This fixes the
+unhandled irq on my machine.
+
+Signed-off-by: Thomas Reitmayr <treitmayr at devbase.at>
+Signed-off-by: Mark Lord <mlord at pobox.com>
+Signed-off-by: Jeff Garzik <jgarzik at redhat.com>
+---
+
+diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
+index 874b60b..9e9fb95 100644
+--- a/drivers/ata/sata_mv.c
++++ b/drivers/ata/sata_mv.c
+@@ -3059,6 +3059,9 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
+ 		hpriv->main_irq_mask_addr  = mmio + PCI_HC_MAIN_IRQ_MASK_OFS;
+ 	}
+ 
++	/* initialize shadow irq mask with register's value */
++	hpriv->main_irq_mask = readl(hpriv->main_irq_mask_addr);
++
+ 	/* global interrupt mask: 0 == mask everything */
+ 	mv_set_main_irq_mask(host, ~0, 0);
+ 

Modified: dists/sid/linux-2.6/debian/patches/series/14
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/14	(original)
+++ dists/sid/linux-2.6/debian/patches/series/14	Thu Jan 29 10:31:12 2009
@@ -47,3 +47,5 @@
 + bugfix/all/CVE-2009-0029/0043-System-call-wrappers-part-33.patch
 + bugfix/all/CVE-2009-0029/0044-s390-specific-system-call-wrappers.patch
 + bugfix/all/rt2x00-fix-vgc-lower-bounc-init.patch
++ bugfix/all/sata_mv-fix-8-port-timeouts.patch
++ bugfix/all/sata_mv-init-main-irq-mask.patch



More information about the Kernel-svn-changes mailing list