Skip to contentSkip to conversation

IDE fixes

PATCH In review Bartlomiej Zolnierkiewicz 2 participants 3 messages Mar 17, 2007 – Mar 18, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IDE fixes

Please pull from:

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

to receive the following updates:

 b/drivers/ide/Kconfig                       |   48 -
 b/drivers/ide/Makefile                      |    1 
 b/drivers/ide/arm/icside.c                  |   13 
 b/drivers/ide/ide-dma.c                     |    2 
 b/drivers/ide/ide.c                         |    4 
 b/drivers/ide/mips/au1xxx-ide.c             |    3 
 b/drivers/ide/pci/Makefile                  |    1 
 b/drivers/ide/pci/cmd64x.c                  |   45 -
 b/drivers/ide/pci/jmicron.c                 |   29 
 b/drivers/ide/pci/scc_pata.c                |  858 ++++++++++++++++++++++++++++
 b/drivers/ide/setup-pci.c                   |    5 
 b/include/asm-mips/mach-au1x00/au1xxx_ide.h |   34 -
 drivers/ide/ppc/scc_pata.c                  |  858 ----------------------------
 13 files changed, 915 insertions(+), 986 deletions(-)

Bartlomiej Zolnierkiewicz (2):
ide: don't allow DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=n
ide: remove CONFIG_IDEDMA_{ICS,PCI}_AUTO config options

Daniel Mack (1):
ide: remove static prototypes from include/asm-mips/mach-au1x00/au1xxx_ide.h

Kou Ishizaki (1):
scc_pata: dependency fix

Ralf Baechle (1):
ide: au1xxx: fix use of mixed declarations and code

Sergei Shtylyov (1):
cmd64x: fix recovery time calculation (take 3)

Tejun Heo (1):
jmicron: make ide jmicron driver play nice with libata ones

drivers/ide/Kconfig +8 -40
index 3f76987..8f1fd01 100644
@@ -434,24 +434,8 @@ config BLK_DEV_IDEDMA_FORCED
 
 	  Generally say N here.
 
-config IDEDMA_PCI_AUTO
-	bool "Use PCI DMA by default when available"
-	---help---
-	  Prior to kernel version 2.1.112, Linux used to automatically use
-	  DMA for IDE drives and chipsets which support it. Due to concerns
-	  about a couple of cases where buggy hardware may have caused damage,
-	  the default is now to NOT use DMA automatically. To revert to the
-	  previous behaviour, say Y to this question.
-
-	  If you suspect your hardware is at all flakey, say N here.
-	  Do NOT email the IDE kernel people regarding this issue!
-
-	  It is normally safe to answer Y to this question unless your
-	  motherboard uses a VIA VP2 chipset, in which case you should say N.
-
 config IDEDMA_ONLYDISK
 	bool "Enable DMA only for disks "
-	depends on IDEDMA_PCI_AUTO
 	help
 	  This is used if you know your ATAPI Devices are going to fail DMA
 	  Transfers.
@@ -769,6 +753,14 @@ config BLK_DEV_TC86C001
 	help
 	This driver adds support for Toshiba TC86C001 GOKU-S chip.
 
+config BLK_DEV_CELLEB
+	tristate "Toshiba's Cell Reference Set IDE support"
+	depends on PPC_CELLEB
+	help
+	  This driver provides support for the built-in IDE controller on
+	  Toshiba Cell Reference Board.
+	  If unsure, say Y.
+
 endif
 
 config BLK_DEV_IDE_PMAC
@@ -800,14 +792,6 @@ config BLK_DEV_IDEDMA_PMAC
 	  to transfer data to and from memory.  Saying Y is safe and improves
 	  performance.
 
-config BLK_DEV_IDE_CELLEB
-	bool "Toshiba's Cell Reference Set IDE support"
-	depends on PPC_CELLEB && IDE=y
-	help
-	  This driver provides support for the built-in IDE controller on
-	  Toshiba Cell Reference Board.
-	  If unsure, say Y.
-
 config BLK_DEV_IDE_SWARM
 	tristate "IDE for Sibyte evaluation boards"
 	depends on SIBYTE_SB1xxx_SOC
@@ -851,19 +835,6 @@ config BLK_DEV_IDEDMA_ICS
 	  Say Y here if you want to add DMA (Direct Memory Access) support to
 	  the ICS IDE driver.
 
-config IDEDMA_ICS_AUTO
-	bool "Use ICS DMA by default"
-	depends on BLK_DEV_IDEDMA_ICS
-	help
-	  Prior to kernel version 2.1.112, Linux used to automatically use
-	  DMA for IDE drives and chipsets which support it. Due to concerns
-	  about a couple of cases where buggy hardware may have caused damage,
-	  the default is now to NOT use DMA automatically. To revert to the
-	  previous behaviour, say Y to this question.
-
-	  If you suspect your hardware is at all flakey, say N here.
-	  Do NOT email the IDE kernel people regarding this issue!
-
 config BLK_DEV_IDE_RAPIDE
 	tristate "RapIDE interface support"
 	depends on ARM && ARCH_ACORN
@@ -1086,9 +1057,6 @@ config IDEDMA_IVB
 
 	  It is normally safe to answer Y; however, the default is N.
 
-config IDEDMA_AUTO
-	def_bool IDEDMA_PCI_AUTO || IDEDMA_ICS_AUTO
-
 endif
 
 config BLK_DEV_HD_ONLY
drivers/ide/Makefile +0 -1
index 28feedf..d9f029e 100644
@@ -37,7 +37,6 @@ ide-core-$(CONFIG_BLK_DEV_Q40IDE)	+= legacy/q40ide.o
 # built-in only drivers from ppc/
 ide-core-$(CONFIG_BLK_DEV_MPC8xx_IDE)	+= ppc/mpc8xx.o
 ide-core-$(CONFIG_BLK_DEV_IDE_PMAC)	+= ppc/pmac.o
-ide-core-$(CONFIG_BLK_DEV_IDE_CELLEB)	+= ppc/scc_pata.o
 
 # built-in only drivers from h8300/
 ide-core-$(CONFIG_H8300)		+= h8300/ide-h8300.o
drivers/ide/arm/icside.c +1 -12
index 40e5c66..e2953fc 100644
@@ -196,11 +196,6 @@ static void icside_maskproc(ide_drive_t *drive, int mask)
 }
 
 #ifdef CONFIG_BLK_DEV_IDEDMA_ICS
-
-#ifndef CONFIG_IDEDMA_ICS_AUTO
-#warning CONFIG_IDEDMA_ICS_AUTO=n support is obsolete, and will be removed soon.
-#endif
-
 /*
  * SG-DMA support.
  *
@@ -474,12 +469,6 @@ static int icside_dma_lostirq(ide_drive_t *drive)
 
 static void icside_dma_init(ide_hwif_t *hwif)
 {
-	int autodma = 0;
-
-#ifdef CONFIG_IDEDMA_ICS_AUTO
-	autodma = 1;
-#endif
-
 	printk("    %s: SG-DMA", hwif->name);
 
 	hwif->atapi_dma		= 1;
@@ -489,7 +478,7 @@ static void icside_dma_init(ide_hwif_t *hwif)
 	hwif->dmatable_cpu	= NULL;
 	hwif->dmatable_dma	= 0;
 	hwif->speedproc		= icside_set_speed;
-	hwif->autodma		= autodma;
+	hwif->autodma		= 1;
 
 	hwif->ide_dma_check	= icside_dma_check;
 	hwif->dma_host_off	= icside_dma_host_off;
drivers/ide/ide-dma.c +1 -1
index 08e7cd0..fd21308 100644
@@ -767,7 +767,7 @@ int ide_set_dma(ide_drive_t *drive)
 	switch(rc) {
 	case -1: /* DMA needs to be disabled */
 		hwif->dma_off_quietly(drive);
-		return 0;
+		return -1;
 	case  0: /* DMA needs to be enabled */
 		return hwif->ide_dma_on(drive);
 	case  1: /* DMA setting cannot be changed */
drivers/ide/ide.c +0 -4
index dfbd744..695610f 100644
@@ -177,11 +177,7 @@ DECLARE_MUTEX(ide_cfg_sem);
 static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
 #endif
 
-#ifdef CONFIG_IDEDMA_AUTO
 int noautodma = 0;
-#else
-int noautodma = 1;
-#endif
 
 EXPORT_SYMBOL(noautodma);
 
drivers/ide/mips/au1xxx-ide.c +2 -1
index b2dc028..d54d9fe 100644
@@ -639,6 +639,7 @@ static int au_ide_probe(struct device *dev)
 	_auide_hwif *ahwif = &auide_hwif;
 	ide_hwif_t *hwif;
 	struct resource *res;
+	hw_regs_t *hw;
 	int ret = 0;
 
 #if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA)
@@ -681,7 +682,7 @@ static int au_ide_probe(struct device *dev)
 	/* FIXME:  This might possibly break PCMCIA IDE devices */
 
 	hwif                            = &ide_hwifs[pdev->id];
-	hw_regs_t *hw 			= &hwif->hw;
+	hw 				= &hwif->hw;
 	hwif->irq = hw->irq             = ahwif->irq;
 	hwif->chipset                   = ide_au1xxx;
 
drivers/ide/pci/Makefile +1 -0
index 6591ff4..95d1ea8 100644
@@ -3,6 +3,7 @@ obj-$(CONFIG_BLK_DEV_AEC62XX)		+= aec62xx.o
 obj-$(CONFIG_BLK_DEV_ALI15X3)		+= alim15x3.o
 obj-$(CONFIG_BLK_DEV_AMD74XX)		+= amd74xx.o
 obj-$(CONFIG_BLK_DEV_ATIIXP)		+= atiixp.o
+obj-$(CONFIG_BLK_DEV_CELLEB)		+= scc_pata.o
 obj-$(CONFIG_BLK_DEV_CMD64X)		+= cmd64x.o
 obj-$(CONFIG_BLK_DEV_CS5520)		+= cs5520.o
 obj-$(CONFIG_BLK_DEV_CS5530)		+= cs5530.o
drivers/ide/pci/cmd64x.c +20 -25

79 lines not on this page · raw message

drivers/ide/pci/jmicron.c +24 -5
index 53f2550..be4fc96 100644
@@ -240,12 +240,31 @@ static int __devinit jmicron_init_one(struct pci_dev *dev, const struct pci_devi
 	return 0;
 }
 
+/* If libata is configured, jmicron PCI quirk will configure it such
+ * that the SATA ports are in AHCI function while the PATA ports are
+ * in a separate IDE function.  In such cases, match device class and
+ * attach only to IDE.  If libata isn't configured, keep the old
+ * behavior for backward compatibility.
+ */
+#if defined(CONFIG_ATA) || defined(CONFIG_ATA_MODULE)
+#define JMB_CLASS	PCI_CLASS_STORAGE_IDE << 8
+#define JMB_CLASS_MASK	0xffff00
+#else
+#define JMB_CLASS	0
+#define JMB_CLASS_MASK	0
+#endif
+
 static struct pci_device_id jmicron_pci_tbl[] = {
-	{ PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
-	{ PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
-	{ PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
-	{ PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
-	{ PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
+	{ PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361,
+	  PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 0},
+	{ PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363,
+	  PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 1},
+	{ PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365,
+	  PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 2},
+	{ PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366,
+	  PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 3},
+	{ PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368,
+	  PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 4},
 	{ 0, },
 };
 
drivers/ide/pci/scc_pata.c new file +858 -0

858 lines not on this page · raw message

drivers/ide/ppc/scc_pata.c deleted +0 -858

858 lines not on this page · raw message

drivers/ide/setup-pci.c +0 -5
index a52c80f..118fb32 100644
@@ -505,11 +505,6 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi
 		}
 	}
 }
-
-#ifndef CONFIG_IDEDMA_PCI_AUTO
-#warning CONFIG_IDEDMA_PCI_AUTO=n support is obsolete, and will be removed soon.
-#endif
-
 #endif /* CONFIG_BLK_DEV_IDEDMA_PCI*/
 
 /**
include/asm-mips/mach-au1x00/au1xxx_ide.h +0 -34
index e9fa252..8fcae21 100644
@@ -141,40 +141,6 @@ static int auide_ddma_init( _auide_hwif *auide );
 static void auide_setup_ports(hw_regs_t *hw, _auide_hwif *ahwif);
 int __init auide_probe(void);
 
-#ifdef CONFIG_PM
-        int au1200ide_pm_callback( au1xxx_power_dev_t *dev,
-                                   au1xxx_request_t request, void *data);
-        static int au1xxxide_pm_standby( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_sleep( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_resume( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_getstatus( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_access( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_idle( au1xxx_power_dev_t *dev );
-        static int au1xxxide_pm_cleanup( au1xxx_power_dev_t *dev );
-#endif
-
-
-/*
- * Multi-Word DMA + DbDMA functions
- */
-#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
-        static int auide_build_sglist(ide_drive_t *drive,  struct request *rq);
-        static int auide_build_dmatable(ide_drive_t *drive);
-        static int auide_dma_end(ide_drive_t *drive);
-        ide_startstop_t auide_dma_intr (ide_drive_t *drive);
-        static void auide_dma_exec_cmd(ide_drive_t *drive, u8 command);
-        static int auide_dma_setup(ide_drive_t *drive);
-        static int auide_dma_check(ide_drive_t *drive);
-        static int auide_dma_test_irq(ide_drive_t *drive);
-        static int auide_dma_host_off(ide_drive_t *drive);
-        static int auide_dma_host_on(ide_drive_t *drive);
-        static int auide_dma_lostirq(ide_drive_t *drive);
-        static int auide_dma_on(ide_drive_t *drive);
-        static void auide_ddma_tx_callback(int irq, void *param);
-        static void auide_ddma_rx_callback(int irq, void *param);
-        static int auide_dma_off_quietly(ide_drive_t *drive);
-#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */
-
 /*******************************************************************************
 * PIO Mode timing calculation :                                                *
 *                                                                              *
#1 lore raw
Quoted 17 lines · Bartlomiej Zolnierkiewicz

to receive the following updates:

 b/drivers/ide/Kconfig                       |   48 -
 b/drivers/ide/Makefile                      |    1 
 b/drivers/ide/arm/icside.c                  |   13 
 b/drivers/ide/ide-dma.c                     |    2 
 b/drivers/ide/ide.c                         |    4 
 b/drivers/ide/mips/au1xxx-ide.c             |    3 
 b/drivers/ide/pci/Makefile                  |    1 
 b/drivers/ide/pci/cmd64x.c                  |   45 -
 b/drivers/ide/pci/jmicron.c                 |   29 
 b/drivers/ide/pci/scc_pata.c                |  858 ++++++++++++++++++++++++++++
 b/drivers/ide/setup-pci.c                   |    5 
 b/include/asm-mips/mach-au1x00/au1xxx_ide.h |   34 -
 drivers/ide/ppc/scc_pata.c                  |  858 ----------------------------
 13 files changed, 915 insertions(+), 986 deletions(-)

Please use

	git diff -M --stat --summary 

to generate the diffstat (where the "-M" is the important part). Your "scc_pata.c" change was a pure rename, but because you didn't ask for rename detection, it got shown as a file create/delete pair. It *should* have looked like this:

 drivers/ide/Kconfig                       |   48 +++++------------------------
 drivers/ide/Makefile                      |    1 -
 drivers/ide/arm/icside.c                  |   13 +-------
 drivers/ide/ide-dma.c                     |    2 +-
 drivers/ide/ide.c                         |    4 --
 drivers/ide/mips/au1xxx-ide.c             |    3 +-
 drivers/ide/pci/Makefile                  |    1 +
 drivers/ide/pci/cmd64x.c                  |   45 ++++++++++++---------------
 drivers/ide/pci/jmicron.c                 |   29 ++++++++++++++---
 drivers/ide/{ppc => pci}/scc_pata.c       |    0
 drivers/ide/setup-pci.c                   |    5 ---
 include/asm-mips/mach-au1x00/au1xxx_ide.h |   34 --------------------
 12 files changed, 57 insertions(+), 128 deletions(-)
 rename drivers/ide/{ppc => pci}/scc_pata.c (100%)

which is a lot more accurate than what you get by feeding a diff through "diffstat" that has no clue about renames (look at the summary for number of lines changed ;)

Linus

#2 lore raw
Quoted 44 lines · Linus Torvalds
Quoted 17 lines · Bartlomiej Zolnierkiewicz

to receive the following updates:

 b/drivers/ide/Kconfig                       |   48 -
 b/drivers/ide/Makefile                      |    1 
 b/drivers/ide/arm/icside.c                  |   13 
 b/drivers/ide/ide-dma.c                     |    2 
 b/drivers/ide/ide.c                         |    4 
 b/drivers/ide/mips/au1xxx-ide.c             |    3 
 b/drivers/ide/pci/Makefile                  |    1 
 b/drivers/ide/pci/cmd64x.c                  |   45 -
 b/drivers/ide/pci/jmicron.c                 |   29 
 b/drivers/ide/pci/scc_pata.c                |  858 ++++++++++++++++++++++++++++
 b/drivers/ide/setup-pci.c                   |    5 
 b/include/asm-mips/mach-au1x00/au1xxx_ide.h |   34 -
 drivers/ide/ppc/scc_pata.c                  |  858 ----------------------------
 13 files changed, 915 insertions(+), 986 deletions(-)

Please use

	git diff -M --stat --summary 

to generate the diffstat (where the "-M" is the important part). Your "scc_pata.c" change was a pure rename, but because you didn't ask for rename detection, it got shown as a file create/delete pair. It *should* have looked like this:

 drivers/ide/Kconfig                       |   48 +++++------------------------
 drivers/ide/Makefile                      |    1 -
 drivers/ide/arm/icside.c                  |   13 +-------
 drivers/ide/ide-dma.c                     |    2 +-
 drivers/ide/ide.c                         |    4 --
 drivers/ide/mips/au1xxx-ide.c             |    3 +-
 drivers/ide/pci/Makefile                  |    1 +
 drivers/ide/pci/cmd64x.c                  |   45 ++++++++++++---------------
 drivers/ide/pci/jmicron.c                 |   29 ++++++++++++++---
 drivers/ide/{ppc => pci}/scc_pata.c       |    0
 drivers/ide/setup-pci.c                   |    5 ---
 include/asm-mips/mach-au1x00/au1xxx_ide.h |   34 --------------------
 12 files changed, 57 insertions(+), 128 deletions(-)
 rename drivers/ide/{ppc => pci}/scc_pata.c (100%)
Quoted 3 lines

which is a lot more accurate than what you get by feeding a diff through "diffstat" that has no clue about renames (look at the summary for number of lines changed ;)

Thanks, I updated my scripts and also a git version installed while at it.

[ I was feeling that I was missing something but these options were
undocumented in git-1.4.4.2, no longer a case in git-1.5.0.3. :-) ]

Bart