summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-06-14 17:42:19 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-14 17:42:19 -0700
commitd50bd8ce2df872435de7ced785e3208b623b3f11 (patch)
tree0b74c9565d83132873189aaf0463d2d675b4e65c
parent63937444f76047429c21b18f8ecd8f6126337b25 (diff)
downloadlongterm-queue-2.6.33-d50bd8ce2df872435de7ced785e3208b623b3f11.tar.gz
.33 patches
-rw-r--r--queue-2.6.33/pata_cm64x-fix-boot-crash-on-parisc.patch116
-rw-r--r--queue-2.6.33/pata_cmd64x-cmd648_bmdma_stop-fix.patch31
-rw-r--r--queue-2.6.33/pata_cmd64x-fix-pio-setup.patch42
-rw-r--r--queue-2.6.33/pata_cmd64x-remove-unused-definitions.patch66
-rw-r--r--queue-2.6.33/series4
5 files changed, 259 insertions, 0 deletions
diff --git a/queue-2.6.33/pata_cm64x-fix-boot-crash-on-parisc.patch b/queue-2.6.33/pata_cm64x-fix-boot-crash-on-parisc.patch
new file mode 100644
index 0000000..529621a
--- /dev/null
+++ b/queue-2.6.33/pata_cm64x-fix-boot-crash-on-parisc.patch
@@ -0,0 +1,116 @@
+From 9281b16caac1276817b77033c5b8a1f5ca30102c Mon Sep 17 00:00:00 2001
+From: James Bottomley <James.Bottomley@suse.de>
+Date: Sun, 24 Apr 2011 14:30:14 -0500
+Subject: pata_cm64x: fix boot crash on parisc
+
+From: James Bottomley <James.Bottomley@suse.de>
+
+commit 9281b16caac1276817b77033c5b8a1f5ca30102c upstream.
+
+The old IDE cmd64x checks the status of the CNTRL register to see if
+the ports are enabled before probing them. pata_cmd64x doesn't do
+this, which causes a HPMC on parisc when it tries to poke at the
+secondary port because apparently the BAR isn't wired up (and a
+non-responding piece of memory causes a HPMC).
+
+Fix this by porting the CNTRL register port detection logic from IDE
+cmd64x. In addition, following converns from Alan Cox, add a check to
+see if a mobility electronics bridge is the immediate parent and forgo
+the check if it is (prevents problems on hotplug controllers).
+
+Signed-off-by: James Bottomley <James.Bottomley@suse.de>
+Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/pata_cmd64x.c | 42 ++++++++++++++++++++++++++++++++++++++----
+ include/linux/pci_ids.h | 2 ++
+ 2 files changed, 40 insertions(+), 4 deletions(-)
+
+--- a/drivers/ata/pata_cmd64x.c
++++ b/drivers/ata/pata_cmd64x.c
+@@ -41,6 +41,9 @@
+ enum {
+ CFR = 0x50,
+ CFR_INTR_CH0 = 0x04,
++ CNTRL = 0x51,
++ CNTRL_CH0 = 0x04,
++ CNTRL_CH1 = 0x08,
+ CMDTIM = 0x52,
+ ARTTIM0 = 0x53,
+ DRWTIM0 = 0x54,
+@@ -328,9 +331,19 @@ static int cmd64x_init_one(struct pci_de
+ .port_ops = &cmd648_port_ops
+ }
+ };
+- const struct ata_port_info *ppi[] = { &cmd_info[id->driver_data], NULL };
+- u8 mrdmode;
++ const struct ata_port_info *ppi[] = {
++ &cmd_info[id->driver_data],
++ &cmd_info[id->driver_data],
++ NULL
++ };
++ u8 mrdmode, reg;
+ int rc;
++ struct pci_dev *bridge = pdev->bus->self;
++ /* mobility split bridges don't report enabled ports correctly */
++ int port_ok = !(bridge && bridge->vendor ==
++ PCI_VENDOR_ID_MOBILITY_ELECTRONICS);
++ /* all (with exceptions below) apart from 643 have CNTRL_CH0 bit */
++ int cntrl_ch0_ok = (id->driver_data != 0);
+
+ rc = pcim_enable_device(pdev);
+ if (rc)
+@@ -341,11 +354,18 @@ static int cmd64x_init_one(struct pci_de
+
+ if (pdev->device == PCI_DEVICE_ID_CMD_646) {
+ /* Does UDMA work ? */
+- if (pdev->revision > 4)
++ if (pdev->revision > 4) {
+ ppi[0] = &cmd_info[2];
++ ppi[1] = &cmd_info[2];
++ }
+ /* Early rev with other problems ? */
+- else if (pdev->revision == 1)
++ else if (pdev->revision == 1) {
+ ppi[0] = &cmd_info[3];
++ ppi[1] = &cmd_info[3];
++ }
++ /* revs 1,2 have no CNTRL_CH0 */
++ if (pdev->revision < 3)
++ cntrl_ch0_ok = 0;
+ }
+
+ pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 64);
+@@ -354,6 +374,20 @@ static int cmd64x_init_one(struct pci_de
+ mrdmode |= 0x02; /* Memory read line enable */
+ pci_write_config_byte(pdev, MRDMODE, mrdmode);
+
++ /* check for enabled ports */
++ pci_read_config_byte(pdev, CNTRL, &reg);
++ if (!port_ok)
++ dev_printk(KERN_NOTICE, &pdev->dev, "Mobility Bridge detected, ignoring CNTRL port enable/disable\n");
++ if (port_ok && cntrl_ch0_ok && !(reg & CNTRL_CH0)) {
++ dev_printk(KERN_NOTICE, &pdev->dev, "Primary port is disabled\n");
++ ppi[0] = &ata_dummy_port_info;
++
++ }
++ if (port_ok && !(reg & CNTRL_CH1)) {
++ dev_printk(KERN_NOTICE, &pdev->dev, "Secondary port is disabled\n");
++ ppi[1] = &ata_dummy_port_info;
++ }
++
+ /* Force PIO 0 here.. */
+
+ /* PPC specific fixup copied from old driver */
+--- a/include/linux/pci_ids.h
++++ b/include/linux/pci_ids.h
+@@ -605,6 +605,8 @@
+ #define PCI_DEVICE_ID_MATROX_G550 0x2527
+ #define PCI_DEVICE_ID_MATROX_VIA 0x4536
+
++#define PCI_VENDOR_ID_MOBILITY_ELECTRONICS 0x14f2
++
+ #define PCI_VENDOR_ID_CT 0x102c
+ #define PCI_DEVICE_ID_CT_69000 0x00c0
+ #define PCI_DEVICE_ID_CT_65545 0x00d8
diff --git a/queue-2.6.33/pata_cmd64x-cmd648_bmdma_stop-fix.patch b/queue-2.6.33/pata_cmd64x-cmd648_bmdma_stop-fix.patch
new file mode 100644
index 0000000..4e4ac41
--- /dev/null
+++ b/queue-2.6.33/pata_cmd64x-cmd648_bmdma_stop-fix.patch
@@ -0,0 +1,31 @@
+From 03a849e6ddb604ff6a220b78637ee8e122ffc796 Mon Sep 17 00:00:00 2001
+From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
+Date: Mon, 18 Jan 2010 18:15:11 +0100
+Subject: pata_cmd64x: cmd648_bmdma_stop() fix
+
+From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
+
+commit 03a849e6ddb604ff6a220b78637ee8e122ffc796 upstream.
+
+Clear the primary channel pending interrupt bit
+instead of the reserved one.
+
+Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
+Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/pata_cmd64x.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/ata/pata_cmd64x.c
++++ b/drivers/ata/pata_cmd64x.c
+@@ -40,7 +40,7 @@
+
+ enum {
+ CFR = 0x50,
+- CFR_INTR_CH0 = 0x02,
++ CFR_INTR_CH0 = 0x04,
+ CNTRL = 0x51,
+ CNTRL_DIS_RA0 = 0x40,
+ CNTRL_DIS_RA1 = 0x80,
diff --git a/queue-2.6.33/pata_cmd64x-fix-pio-setup.patch b/queue-2.6.33/pata_cmd64x-fix-pio-setup.patch
new file mode 100644
index 0000000..dc8875a
--- /dev/null
+++ b/queue-2.6.33/pata_cmd64x-fix-pio-setup.patch
@@ -0,0 +1,42 @@
+From a2bd62207af4be8f5fe815ff90cc309056407829 Mon Sep 17 00:00:00 2001
+From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
+Date: Mon, 18 Jan 2010 18:14:55 +0100
+Subject: pata_cmd64x: fix PIO setup
+
+From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
+
+commit a2bd62207af4be8f5fe815ff90cc309056407829 upstream.
+
+Fix incorrect handling of recovery clocks value == 16 resulting
+in overclocked recovery timings & potentially underclocked active
+timings.
+
+Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
+Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/pata_cmd64x.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/ata/pata_cmd64x.c
++++ b/drivers/ata/pata_cmd64x.c
+@@ -2,6 +2,7 @@
+ * pata_cmd64x.c - CMD64x PATA for new ATA layer
+ * (C) 2005 Red Hat Inc
+ * Alan Cox <alan@lxorguk.ukuu.org.uk>
++ * (C) 2009-2010 Bartlomiej Zolnierkiewicz
+ *
+ * Based upon
+ * linux/drivers/ide/pci/cmd64x.c Version 1.30 Sept 10, 2002
+@@ -147,7 +148,9 @@ static void cmd64x_set_timing(struct ata
+ /* Now convert the clocks into values we can actually stuff into
+ the chip */
+
+- if (t.recover > 1)
++ if (t.recover == 16)
++ t.recover = 0;
++ else if (t.recover > 1)
+ t.recover--;
+ else
+ t.recover = 15;
diff --git a/queue-2.6.33/pata_cmd64x-remove-unused-definitions.patch b/queue-2.6.33/pata_cmd64x-remove-unused-definitions.patch
new file mode 100644
index 0000000..0125e1b
--- /dev/null
+++ b/queue-2.6.33/pata_cmd64x-remove-unused-definitions.patch
@@ -0,0 +1,66 @@
+From c754d9b6e04371fb398cdd2f5e77be895126be20 Mon Sep 17 00:00:00 2001
+From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
+Date: Mon, 18 Jan 2010 18:15:18 +0100
+Subject: pata_cmd64x: remove unused definitions
+
+From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
+
+commit c754d9b6e04371fb398cdd2f5e77be895126be20 upstream.
+
+s/ARTIM2/ARTTIM23/ in cmd648_bmdma_stop() while at it
+
+Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
+Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/pata_cmd64x.c | 12 +-----------
+ 1 file changed, 1 insertion(+), 11 deletions(-)
+
+--- a/drivers/ata/pata_cmd64x.c
++++ b/drivers/ata/pata_cmd64x.c
+@@ -41,10 +41,6 @@
+ enum {
+ CFR = 0x50,
+ CFR_INTR_CH0 = 0x04,
+- CNTRL = 0x51,
+- CNTRL_DIS_RA0 = 0x40,
+- CNTRL_DIS_RA1 = 0x80,
+- CNTRL_ENA_2ND = 0x08,
+ CMDTIM = 0x52,
+ ARTTIM0 = 0x53,
+ DRWTIM0 = 0x54,
+@@ -54,9 +50,6 @@ enum {
+ ARTTIM23_DIS_RA2 = 0x04,
+ ARTTIM23_DIS_RA3 = 0x08,
+ ARTTIM23_INTR_CH1 = 0x10,
+- ARTTIM2 = 0x57,
+- ARTTIM3 = 0x57,
+- DRWTIM23 = 0x58,
+ DRWTIM2 = 0x58,
+ BRST = 0x59,
+ DRWTIM3 = 0x5b,
+@@ -64,14 +57,11 @@ enum {
+ MRDMODE = 0x71,
+ MRDMODE_INTR_CH0 = 0x04,
+ MRDMODE_INTR_CH1 = 0x08,
+- MRDMODE_BLK_CH0 = 0x10,
+- MRDMODE_BLK_CH1 = 0x20,
+ BMIDESR0 = 0x72,
+ UDIDETCR0 = 0x73,
+ DTPR0 = 0x74,
+ BMIDECR1 = 0x78,
+ BMIDECSR = 0x79,
+- BMIDESR1 = 0x7A,
+ UDIDETCR1 = 0x7B,
+ DTPR1 = 0x7C
+ };
+@@ -248,7 +238,7 @@ static void cmd648_bmdma_stop(struct ata
+ struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+ u8 dma_intr;
+ int dma_mask = ap->port_no ? ARTTIM23_INTR_CH1 : CFR_INTR_CH0;
+- int dma_reg = ap->port_no ? ARTTIM2 : CFR;
++ int dma_reg = ap->port_no ? ARTTIM23 : CFR;
+
+ ata_bmdma_stop(qc);
+
diff --git a/queue-2.6.33/series b/queue-2.6.33/series
index fc462ea..43d85a4 100644
--- a/queue-2.6.33/series
+++ b/queue-2.6.33/series
@@ -75,3 +75,7 @@ cpufreq-remove-cpufreq_stats-sysfs-entries-on-module-unload.patch
md-check-hot_remove_disk-when-removing-disk.patch
md-raid5-fix-raid5_set_bi_hw_segments.patch
md-raid5-fix-fua-request-handling-in-ops_run_io.patch
+pata_cmd64x-fix-pio-setup.patch
+pata_cmd64x-cmd648_bmdma_stop-fix.patch
+pata_cmd64x-remove-unused-definitions.patch
+pata_cm64x-fix-boot-crash-on-parisc.patch