Skip to contentSkip to conversation

IDE fixes for 2.6.23-rc6

PATCH In review Bartlomiej Zolnierkiewicz 2 participants 2 messages Sep 11, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IDE fixes for 2.6.23-rc6

Please pull from:

master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/

to receive the following updates:

 drivers/ata/pata_ali.c         |    7 ++
 drivers/ide/Kconfig            |    4 +-
 drivers/ide/ide-iops.c         |    3 +-
 drivers/ide/pci/alim15x3.c     |    7 ++
 drivers/ide/pci/hpt366.c       |  138 +++++++++++++++++++++++-----------------
 drivers/ide/pci/pdc202xx_new.c |    9 ++-
 drivers/ide/pci/via82cxxx.c    |   15 +++-
 drivers/ide/ppc/mpc8xx.c       |    1 -
 drivers/ide/setup-pci.c        |   41 +++++-------
 include/linux/ide.h            |   13 ++++
 10 files changed, 141 insertions(+), 97 deletions(-)

Bartlomiej Zolnierkiewicz (1):
via82cxxx: add Arima W730-K8 and other rebadgings to short cables list

Daniel Exner (1):
pata_ali/alim15x3: override 80-wire cable detection for Toshiba S1800-814

Kumar Gala (1):
mpc8xx: Only build mpc8xx on arch/ppc

Mikael Pettersson (1):
pdc202xx_new: PLL detection fix

Sergei Shtylyov (5):
ide: fix PCI refcounting
pdc202xx_new: fix PCI refcounting
hpt366: fix PCI clock detection for HPT374 (take 4)
ide: add ide_dev_is_sata() helper (take 2)
hpt366: UltraDMA filter for SATA cards (take 2)

Tony Breeds (1):
pmac: build fix

drivers/ata/pata_ali.c +7 -0
index 94e5edc..71bdc3b 100644
@@ -48,6 +48,13 @@ static struct dmi_system_id cable_dmi_table[] = {
 			DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
 		},
 	},
+	{
+		.ident = "Toshiba Satelite S1800-814",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "S1800-814"),
+		},
+	},
 	{ }
 };
 
drivers/ide/Kconfig +2 -2
index 7adb61b..4200251 100644
@@ -781,7 +781,7 @@ endif
 
 config BLK_DEV_IDE_PMAC
 	bool "Builtin PowerMac IDE support"
-	depends on PPC_PMAC && IDE=y
+	depends on PPC_PMAC && IDE=y && BLK_DEV_IDE=y
 	help
 	  This driver provides support for the built-in IDE controller on
 	  most of the recent Apple Power Macintoshes and PowerBooks.
@@ -946,7 +946,7 @@ config BLK_DEV_Q40IDE
 
 config BLK_DEV_MPC8xx_IDE
 	bool "MPC8xx IDE support"
-	depends on 8xx && IDE=y && BLK_DEV_IDE=y
+	depends on 8xx && IDE=y && BLK_DEV_IDE=y && !PPC_MERGE
 	select IDE_GENERIC
 	help
 	  This option provides support for IDE on Motorola MPC8xx Systems.
drivers/ide/ide-iops.c +1 -2
index f4cd270..646a54e 100644
@@ -615,8 +615,7 @@ u8 eighty_ninty_three (ide_drive_t *drive)
 	if (hwif->cbl != ATA_CBL_PATA80 && !ivb)
 		goto no_80w;
 
-	/* Check for SATA but only if we are ATA5 or higher */
-	if (id->hw_config == 0 && (id->major_rev_num & 0x7FE0))
+	if (ide_dev_is_sata(id))
 		return 1;
 
 	/*
drivers/ide/pci/alim15x3.c +7 -0
index 025689d..11ecb61 100644
@@ -596,6 +596,13 @@ static struct dmi_system_id cable_dmi_table[] = {
 			DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
 		},
 	},
+	{
+		.ident = "Toshiba Satellite S1800-814",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "S1800-814"),
+		},
+	},
 	{ }
 };
 
drivers/ide/pci/hpt366.c +79 -59

279 lines not on this page · raw message

drivers/ide/pci/pdc202xx_new.c +5 -4
index f6db2f3..7b0e479 100644
@@ -9,7 +9,7 @@
  *  Split from:
  *  linux/drivers/ide/pdc202xx.c	Version 0.35	Mar. 30, 2002
  *  Copyright (C) 1998-2002		Andre Hedrick <[email protected]>
- *  Copyright (C) 2005-2006		MontaVista Software, Inc.
+ *  Copyright (C) 2005-2007		MontaVista Software, Inc.
  *  Portions Copyright (C) 1999 Promise Technology, Inc.
  *  Author: Frank Tiernan ([email protected])
  *  Released under terms of General Public License
@@ -341,7 +341,7 @@ static long __devinit detect_pll_input_clock(unsigned long dma_base)
 	 */
 	usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 1000000 +
 		(end_time.tv_usec - start_time.tv_usec);
-	pll_input = ((start_count - end_count) & 0x3ffffff) / 10 *
+	pll_input = ((start_count - end_count) & 0x3fffffff) / 10 *
 		(10000000 / usec_elapsed);
 
 	DBG("start[%ld] end[%ld]\n", start_count, end_count);
@@ -535,7 +535,7 @@ static int __devinit init_setup_pdc20270(struct pci_dev *dev,
 	    (dev->bus->self->device == PCI_DEVICE_ID_DEC_21150)) {
 		if (PCI_SLOT(dev->devfn) & 2)
 			return -ENODEV;
-		d->extra = 0;
+
 		while ((findev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, findev)) != NULL) {
 			if ((findev->vendor == dev->vendor) &&
 			    (findev->device == dev->device) &&
@@ -544,7 +544,8 @@ static int __devinit init_setup_pdc20270(struct pci_dev *dev,
 					findev->irq = dev->irq;
 				}
 				ret = ide_setup_pci_devices(dev, findev, d);
-				pci_dev_put(findev);
+				if (ret < 0)
+					pci_dev_put(findev);
 				return ret;
 			}
 		}
drivers/ide/pci/via82cxxx.c +11 -4
index 8c53938..a7be779 100644
@@ -1,6 +1,6 @@
 /*
  *
- * Version 3.46
+ * Version 3.47
  *
  * VIA IDE driver for Linux. Supported southbridges:
  *
@@ -430,19 +430,26 @@ static struct dmi_system_id cable_dmi_table[] = {
 	{ }
 };
 
-static int via_cable_override(void)
+static int via_cable_override(struct pci_dev *pdev)
 {
 	/* Systems by DMI */
 	if (dmi_check_system(cable_dmi_table))
 		return 1;
+
+	/* Arima W730-K8/Targa Visionary 811/... */
+	if (pdev->subsystem_vendor == 0x161F &&
+	    pdev->subsystem_device == 0x2032)
+		return 1;
+
 	return 0;
 }
 
 static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif)
 {
-	struct via82cxxx_dev *vdev = pci_get_drvdata(hwif->pci_dev);
+	struct pci_dev *pdev = hwif->pci_dev;
+	struct via82cxxx_dev *vdev = pci_get_drvdata(pdev);
 
-	if (via_cable_override())
+	if (via_cable_override(pdev))
 		return ATA_CBL_PATA40_SHORT;
 
 	if ((vdev->via_80w >> hwif->channel) & 1)
drivers/ide/ppc/mpc8xx.c +0 -1
index 8859fe2..dab79af 100644
@@ -32,7 +32,6 @@
 #include <asm/mpc8xx.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
-#include <asm/residual.h>
 #include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/ide.h>
drivers/ide/setup-pci.c +16 -25

62 lines not on this page · raw message

include/linux/ide.h +13 -0
index c792b4f..b9f66c1 100644
@@ -1378,6 +1378,19 @@ static inline int ide_dev_has_iordy(struct hd_driveid *id)
 	return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0;
 }
 
+static inline int ide_dev_is_sata(struct hd_driveid *id)
+{
+	/*
+	 * See if word 93 is 0 AND drive is at least ATA-5 compatible
+	 * verifying that word 80 by casting it to a signed type --
+	 * this trick allows us to filter out the reserved values of
+	 * 0x0000 and 0xffff along with the earlier ATA revisions...
+	 */
+	if (id->hw_config == 0 && (short)id->major_rev_num >= 0x0020)
+		return 1;
+	return 0;
+}
+
 u8 ide_dump_status(ide_drive_t *, const char *, u8);
 
 typedef struct ide_pio_timings_s {
#1 lore raw
Quoted 50 lines · Bartlomiej Zolnierkiewicz

Please pull from:

master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/

to receive the following updates:

 drivers/ata/pata_ali.c         |    7 ++
 drivers/ide/Kconfig            |    4 +-
 drivers/ide/ide-iops.c         |    3 +-
 drivers/ide/pci/alim15x3.c     |    7 ++
 drivers/ide/pci/hpt366.c       |  138 +++++++++++++++++++++++-----------------
 drivers/ide/pci/pdc202xx_new.c |    9 ++-
 drivers/ide/pci/via82cxxx.c    |   15 +++-
 drivers/ide/ppc/mpc8xx.c       |    1 -
 drivers/ide/setup-pci.c        |   41 +++++-------
 include/linux/ide.h            |   13 ++++
 10 files changed, 141 insertions(+), 97 deletions(-)

Bartlomiej Zolnierkiewicz (1):
via82cxxx: add Arima W730-K8 and other rebadgings to short cables list

Daniel Exner (1):
pata_ali/alim15x3: override 80-wire cable detection for Toshiba S1800-814

Kumar Gala (1):
mpc8xx: Only build mpc8xx on arch/ppc

Mikael Pettersson (1):
pdc202xx_new: PLL detection fix

Sergei Shtylyov (5):
ide: fix PCI refcounting
pdc202xx_new: fix PCI refcounting
hpt366: fix PCI clock detection for HPT374 (take 4)
ide: add ide_dev_is_sata() helper (take 2)
hpt366: UltraDMA filter for SATA cards (take 2)

Tony Breeds (1):
pmac: build fix

drivers/ata/pata_ali.c +0 -0
index 94e5edc..71bdc3b 100644
@@ -48,6 +48,13 @@ static struct dmi_system_id cable_dmi_table[] = {
 			DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
 		},
 	},

drivers/ata/pata_ali.c static struct dmi_system_id cable_dmi_table[] = { · line 60

Quoted 10 lines
drivers/ata/pata_ali.c +7 -0
+	{
+		.ident = "Toshiba Satelite S1800-814",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "S1800-814"),
+		},
+	},
 	{ }
 };
 

ACK