linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/12] ide: remove ide_default_io_ctl() macro
@ 2008-02-16 16:38 Bartlomiej Zolnierkiewicz
  2008-02-16 16:39 ` [PATCH 02/12] ide: remove ppc ifdef from init_ide_data() Bartlomiej Zolnierkiewicz
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:38 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

It is always == '((base) + 0x206)' if CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y
and it is not needed otherwise (arm, blackfin, parisc, ppc64, sh, sparc[64]).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide.c                   |    2 +-
 include/asm-alpha/ide.h             |    2 --
 include/asm-arm/ide.h               |    8 --------
 include/asm-blackfin/ide.h          |    4 ----
 include/asm-ia64/ide.h              |    2 --
 include/asm-m32r/ide.h              |    2 --
 include/asm-mips/mach-generic/ide.h |    2 --
 include/asm-parisc/ide.h            |    2 --
 include/asm-powerpc/ide.h           |    2 --
 include/asm-sh/ide.h                |    3 ---
 include/asm-sparc/ide.h             |    2 --
 include/asm-sparc64/ide.h           |    2 --
 include/asm-x86/ide.h               |    2 --
 13 files changed, 1 insertion(+), 34 deletions(-)

Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -205,7 +205,7 @@ static void __init init_ide_data (void)
 	for (index = 0; index < MAX_HWIFS; ++index) {
 		ide_hwif_t *hwif = &ide_hwifs[index];
 		unsigned long io_addr = ide_default_io_base(index);
-		unsigned long ctl_addr = ide_default_io_ctl(io_addr);
+		unsigned long ctl_addr = io_addr + 0x206;
 
 		ide_init_port_data(hwif, index);
 
Index: b/include/asm-alpha/ide.h
===================================================================
--- a/include/asm-alpha/ide.h
+++ b/include/asm-alpha/ide.h
@@ -37,8 +37,6 @@ static inline unsigned long ide_default_
 	}
 }
 
-#define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-
 #ifdef CONFIG_PCI
 #define ide_init_default_irq(base)	(0)
 #else
Index: b/include/asm-arm/ide.h
===================================================================
--- a/include/asm-arm/ide.h
+++ b/include/asm-arm/ide.h
@@ -17,14 +17,6 @@
 #define MAX_HWIFS	4
 #endif
 
-#if !defined(CONFIG_ARCH_L7200)
-# ifdef CONFIG_ARCH_CLPS7500
-#  define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-# else
-#  define ide_default_io_ctl(base)	(0)
-# endif
-#endif /* !ARCH_L7200 */
-
 #define __ide_mm_insw(port,addr,len)	readsw(port,addr,len)
 #define __ide_mm_insl(port,addr,len)	readsl(port,addr,len)
 #define __ide_mm_outsw(port,addr,len)	writesw(port,addr,len)
Index: b/include/asm-blackfin/ide.h
===================================================================
--- a/include/asm-blackfin/ide.h
+++ b/include/asm-blackfin/ide.h
@@ -19,10 +19,6 @@
 
 #define MAX_HWIFS	1
 
-/* Legacy ... BLK_DEV_IDECS */
-#define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-
-
 #include <asm-generic/ide_iops.h>
 
 /****************************************************************************/
Index: b/include/asm-ia64/ide.h
===================================================================
--- a/include/asm-ia64/ide.h
+++ b/include/asm-ia64/ide.h
@@ -44,8 +44,6 @@ static inline unsigned long ide_default_
 	}
 }
 
-#define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-
 #ifdef CONFIG_PCI
 #define ide_init_default_irq(base)	(0)
 #else
Index: b/include/asm-m32r/ide.h
===================================================================
--- a/include/asm-m32r/ide.h
+++ b/include/asm-m32r/ide.h
@@ -63,8 +63,6 @@ static __inline__ unsigned long ide_defa
 	}
 }
 
-#define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-
 #ifdef CONFIG_BLK_DEV_IDEPCI
 #define ide_init_default_irq(base)     (0)
 #else
Index: b/include/asm-mips/mach-generic/ide.h
===================================================================
--- a/include/asm-mips/mach-generic/ide.h
+++ b/include/asm-mips/mach-generic/ide.h
@@ -96,8 +96,6 @@ static __inline__ unsigned long ide_defa
 	}
 }
 
-#define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-
 #ifdef CONFIG_BLK_DEV_IDEPCI
 #define ide_init_default_irq(base)	(0)
 #else
Index: b/include/asm-parisc/ide.h
===================================================================
--- a/include/asm-parisc/ide.h
+++ b/include/asm-parisc/ide.h
@@ -17,8 +17,6 @@
 #define MAX_HWIFS	2
 #endif
 
-#define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-
 #define ide_request_irq(irq,hand,flg,dev,id)	request_irq((irq),(hand),(flg),(dev),(id))
 #define ide_free_irq(irq,dev_id)		free_irq((irq), (dev_id))
 #define ide_request_region(from,extent,name)	request_region((from), (extent), (name))
Index: b/include/asm-powerpc/ide.h
===================================================================
--- a/include/asm-powerpc/ide.h
+++ b/include/asm-powerpc/ide.h
@@ -86,8 +86,6 @@ static __inline__ unsigned long ide_defa
 
 #endif /* __powerpc64__ */
 
-#define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-
 #endif /* __KERNEL__ */
 
 #endif /* _ASM_POWERPC_IDE_H */
Index: b/include/asm-sh/ide.h
===================================================================
--- a/include/asm-sh/ide.h
+++ b/include/asm-sh/ide.h
@@ -14,9 +14,6 @@
 
 #ifdef __KERNEL__
 
-
-#define ide_default_io_ctl(base)	(0)
-
 #include <asm-generic/ide_iops.h>
 
 #endif /* __KERNEL__ */
Index: b/include/asm-sparc/ide.h
===================================================================
--- a/include/asm-sparc/ide.h
+++ b/include/asm-sparc/ide.h
@@ -17,8 +17,6 @@
 #undef  MAX_HWIFS
 #define MAX_HWIFS	2
 
-#define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-
 #define __ide_insl(data_reg, buffer, wcount) \
 	__ide_insw(data_reg, buffer, (wcount)<<1)
 #define __ide_outsl(data_reg, buffer, wcount) \
Index: b/include/asm-sparc64/ide.h
===================================================================
--- a/include/asm-sparc64/ide.h
+++ b/include/asm-sparc64/ide.h
@@ -24,8 +24,6 @@
 # endif
 #endif
 
-#define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-
 #define __ide_insl(data_reg, buffer, wcount) \
 	__ide_insw(data_reg, buffer, (wcount)<<1)
 #define __ide_outsl(data_reg, buffer, wcount) \
Index: b/include/asm-x86/ide.h
===================================================================
--- a/include/asm-x86/ide.h
+++ b/include/asm-x86/ide.h
@@ -58,8 +58,6 @@ static __inline__ unsigned long ide_defa
 	}
 }
 
-#define ide_default_io_ctl(base)	((base) + 0x206) /* obsolete */
-
 #ifdef CONFIG_BLK_DEV_IDEPCI
 #define ide_init_default_irq(base)	(0)
 #else

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 02/12] ide: remove ppc ifdef from init_ide_data()
  2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
@ 2008-02-16 16:39 ` Bartlomiej Zolnierkiewicz
  2008-02-16 16:39 ` [PATCH 03/12] ide: add ide-4drives host driver Bartlomiej Zolnierkiewicz
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:39 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

On PPC32 ide_init_default_irq() is non-zero only for PPLUS and PPC_PREP
(the latter marked as BROKEN currently) so this ifdef can be removed.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide.c |    2 --
 1 file changed, 2 deletions(-)

Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -214,11 +214,9 @@ static void __init init_ide_data (void)
 		ide_std_init_ports(&hw, io_addr, ctl_addr);
 		memcpy(hwif->io_ports, hw.io_ports, sizeof(hw.io_ports));
 		hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
-#if !defined(CONFIG_PPC32) || defined(CONFIG_PPLUS) || !defined(CONFIG_PCI)
 		hwif->irq =
 			ide_init_default_irq(hwif->io_ports[IDE_DATA_OFFSET]);
 #endif
-#endif
 	}
 }
 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 03/12] ide: add ide-4drives host driver
  2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
  2008-02-16 16:39 ` [PATCH 02/12] ide: remove ppc ifdef from init_ide_data() Bartlomiej Zolnierkiewicz
@ 2008-02-16 16:39 ` Bartlomiej Zolnierkiewicz
  2008-02-16 17:26   ` Randy Dunlap
  2008-02-19 13:03   ` Sergei Shtylyov
  2008-02-16 16:39 ` [PATCH 04/12] cmd640: cleanup setup_device_ptrs() Bartlomiej Zolnierkiewicz
                   ` (8 subsequent siblings)
  10 siblings, 2 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:39 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

CONFIG_BLK_DEV_4DRIVES deserves its own host driver:

* Add drivers/ide/legacy/ide-4drives.c and move "4drives" support there.

* Add ide-4drives.o in the link order after all other legacy host
  drivers enabled by "ide0=" options (they all are mutually exclusive).

* Make ide-4drives host driver probe itself for IDE devices instead of
  indirectly depending on ide_generic host driver.

* Add "probe" module parameter to ide-4drives and update documentation.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 Documentation/ide.txt            |    5 ++--
 drivers/ide/Kconfig              |    4 +--
 drivers/ide/ide.c                |   15 ++----------
 drivers/ide/legacy/Makefile      |    1 
 drivers/ide/legacy/ide-4drives.c |   46 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 55 insertions(+), 16 deletions(-)

Index: b/Documentation/ide.txt
===================================================================
--- a/Documentation/ide.txt
+++ b/Documentation/ide.txt
@@ -242,8 +242,6 @@ Summary of ide driver parameters for ker
 			  both the respective primary and secondary channel
 			  to take effect.
 
- "idex=four"		: four drives on idex and ide(x^1) share same ports
-			
  "idex=reset"		: reset interface after probe
 
  "idex=ata66"		: informs the interface that it has an 80c cable
@@ -276,6 +274,9 @@ Also for legacy CMD640 host driver (cmd6
 kernel paremeter to enable probing for VLB version of the chipset (PCI ones
 are detected automatically).
 
+You also need to use "probe" kernel paramater for ide-4drives driver
+(support for IDE generic chipset with four drives on one port).
+
 ================================================================================
 
 IDE ATAPI streaming tape driver
Index: b/drivers/ide/Kconfig
===================================================================
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -1042,8 +1042,8 @@ config BLK_DEV_4DRIVES
 	  Certain older chipsets, including the Tekram 690CD, use a single set
 	  of I/O ports at 0x1f0 to control up to four drives, instead of the
 	  customary two drives per port. Support for this can be enabled at
-	  runtime using the "ide0=four" kernel boot parameter if you say Y
-	  here.
+	  runtime using the "ide_4drives.probe" kernel boot parameter if you
+	  say Y here.
 
 config BLK_DEV_ALI14XX
 	tristate "ALI M14xx support"
Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -989,6 +989,7 @@ extern int probe_dtc2278;
 extern int probe_ht6560b;
 extern int probe_qd65xx;
 extern int cmd640_vlb;
+extern int probe_4drives;
 
 static int __initdata is_chipset_set[MAX_HWIFS];
 
@@ -1213,19 +1214,9 @@ static int __init ide_setup(char *s)
 #endif
 #ifdef CONFIG_BLK_DEV_4DRIVES
 			case -11: /* "four" drives on one set of ports */
-			{
-				ide_hwif_t *mate = &ide_hwifs[hw^1];
-				mate->drives[0].select.all ^= 0x20;
-				mate->drives[1].select.all ^= 0x20;
-				hwif->chipset = mate->chipset = ide_4drives;
-				mate->irq = hwif->irq;
-				memcpy(mate->io_ports, hwif->io_ports, sizeof(hwif->io_ports));
-				hwif->mate = mate;
-				mate->mate = hwif;
-				hwif->serialized = mate->serialized = 1;
+				probe_4drives = 1;
 				goto obsolete_option;
-			}
-#endif /* CONFIG_BLK_DEV_4DRIVES */
+#endif
 			case -10: /* minus10 */
 			case -9: /* minus9 */
 			case -8: /* minus8 */
Index: b/drivers/ide/legacy/Makefile
===================================================================
--- a/drivers/ide/legacy/Makefile
+++ b/drivers/ide/legacy/Makefile
@@ -6,6 +6,7 @@ obj-$(CONFIG_BLK_DEV_UMC8672)		+= umc867
 obj-$(CONFIG_BLK_DEV_DTC2278)		+= dtc2278.o
 obj-$(CONFIG_BLK_DEV_HT6560B)		+= ht6560b.o
 obj-$(CONFIG_BLK_DEV_QD65XX)		+= qd65xx.o
+obj-$(CONFIG_BLK_DEV_4DRIVES)		+= ide-4drives.o
 
 obj-$(CONFIG_BLK_DEV_GAYLE)		+= gayle.o
 obj-$(CONFIG_BLK_DEV_FALCON_IDE)	+= falconide.o
Index: b/drivers/ide/legacy/ide-4drives.c
===================================================================
--- /dev/null
+++ b/drivers/ide/legacy/ide-4drives.c
@@ -0,0 +1,46 @@
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/ide.h>
+
+int probe_4drives = 0;
+
+module_param_named(probe, probe_4drives, bool, 0);
+MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port");
+
+static int __init ide_4drives_init(void)
+{
+	ide_hwif_t *hwif, *mate;
+	u8 idx[4] = { 0, 1, 0xff, 0xff };
+
+	if (probe_4drives == 0)
+		return -ENODEV;
+
+	hwif = &ide_hwifs[0];
+	mate = &ide_hwifs[1];
+
+	memcpy(mate->io_ports, hwif->io_ports, sizeof(hwif->io_ports));
+
+	mate->irq = hwif->irq;
+
+	mate->chipset = hwif->chipset = ide_4drives;
+
+	mate->drives[0].select.all ^= 0x20;
+	mate->drives[1].select.all ^= 0x20;
+
+	hwif->mate = mate;
+	mate->mate = hwif;
+
+	hwif->serialized = mate->serialized = 1;
+
+	ide_device_add(idx, NULL);
+
+	return 0;
+}
+
+module_init(ide_4drives_init);
+
+MODULE_AUTHOR("Bartlomiej Zolnierkiewicz");
+MODULE_DESCRIPTION("generic IDE chipset with 4 drives/port support");
+MODULE_LICENSE("GPL");

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 04/12] cmd640: cleanup setup_device_ptrs()
  2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
  2008-02-16 16:39 ` [PATCH 02/12] ide: remove ppc ifdef from init_ide_data() Bartlomiej Zolnierkiewicz
  2008-02-16 16:39 ` [PATCH 03/12] ide: add ide-4drives host driver Bartlomiej Zolnierkiewicz
@ 2008-02-16 16:39 ` Bartlomiej Zolnierkiewicz
  2008-02-16 16:39 ` [PATCH 05/12] cmd640: init hwif->{io_ports,irq} explicitly Bartlomiej Zolnierkiewicz
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:39 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

This loop is no longer needed.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/pci/cmd640.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

Index: b/drivers/ide/pci/cmd640.c
===================================================================
--- a/drivers/ide/pci/cmd640.c
+++ b/drivers/ide/pci/cmd640.c
@@ -409,19 +409,9 @@ static void __init check_prefetch (unsig
  */
 static void __init setup_device_ptrs (void)
 {
-	unsigned int i;
+	cmd_hwif0 = &ide_hwifs[0];
+	cmd_hwif1 = &ide_hwifs[1];
 
-	cmd_hwif0 = &ide_hwifs[0]; /* default, if not found below */
-	cmd_hwif1 = &ide_hwifs[1]; /* default, if not found below */
-	for (i = 0; i < MAX_HWIFS; i++) {
-		ide_hwif_t *hwif = &ide_hwifs[i];
-		if (hwif->chipset == ide_unknown) {
-			if (hwif->io_ports[IDE_DATA_OFFSET] == 0x1f0)
-				cmd_hwif0 = hwif;
-			else if (hwif->io_ports[IDE_DATA_OFFSET] == 0x170)
-				cmd_hwif1 = hwif;
-		}
-	}
 	cmd_drives[0] = &cmd_hwif0->drives[0];
 	cmd_drives[1] = &cmd_hwif0->drives[1];
 	cmd_drives[2] = &cmd_hwif1->drives[0];

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 05/12] cmd640: init hwif->{io_ports,irq} explicitly
  2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
                   ` (2 preceding siblings ...)
  2008-02-16 16:39 ` [PATCH 04/12] cmd640: cleanup setup_device_ptrs() Bartlomiej Zolnierkiewicz
@ 2008-02-16 16:39 ` Bartlomiej Zolnierkiewicz
  2008-02-16 16:39 ` [PATCH 06/12] ide: limit legacy VLB host drivers to alpha, x86 and mips Bartlomiej Zolnierkiewicz
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:39 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

Do explicit port setup instead of depending on init_ide_data().

This way hwif->io_ports[] and hwif->irq are always correctly set
regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI.

[ Remember to not break "idex=noprobe" parameter. ]

While at it fix printk().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/pci/cmd640.c |   23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

Index: b/drivers/ide/pci/cmd640.c
===================================================================
--- a/drivers/ide/pci/cmd640.c
+++ b/drivers/ide/pci/cmd640.c
@@ -712,8 +712,9 @@ static int __init cmd640x_init(void)
 	int second_port_cmd640 = 0;
 	const char *bus_type, *port2;
 	unsigned int index;
-	u8 b, cfr;
+	u8 b, cfr, oldnoprobe;
 	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
+	hw_regs_t hw[2];
 
 	if (cmd640_vlb && probe_for_cmd640_vlb()) {
 		bus_type = "VLB";
@@ -752,12 +753,25 @@ static int __init cmd640x_init(void)
 		return 0;
 	}
 
+	memset(&hw, 0, sizeof(hw));
+
+	ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
+	hw[0].irq = 14;
+
+	ide_std_init_ports(&hw[1], 0x170, 0x376);
+	hw[1].irq = 15;
+
+	printk(KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x"
+			 "\n", 'a' + cmd640_chip_version - 1, bus_type, cfr);
+
 	/*
 	 * Initialize data for primary port
 	 */
 	setup_device_ptrs ();
-	printk("%s: buggy cmd640%c interface on %s, config=0x%02x\n",
-	       cmd_hwif0->name, 'a' + cmd640_chip_version - 1, bus_type, cfr);
+
+	oldnoprobe = cmd_hwif0->noprobe;
+	ide_init_port_hw(cmd_hwif0, &hw[0]);
+	cmd_hwif0->noprobe = oldnoprobe;
 #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
 	cmd_hwif0->set_pio_mode = &cmd640_set_pio_mode;
 #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
@@ -809,6 +823,9 @@ static int __init cmd640x_init(void)
 	 * Initialize data for secondary cmd640 port, if enabled
 	 */
 	if (second_port_cmd640) {
+		oldnoprobe = cmd_hwif1->noprobe;
+		ide_init_port_hw(cmd_hwif1, &hw[1]);
+		cmd_hwif1->noprobe = oldnoprobe;
 #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
 		cmd_hwif1->set_pio_mode = &cmd640_set_pio_mode;
 #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 06/12] ide: limit legacy VLB host drivers to alpha, x86 and mips
  2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
                   ` (3 preceding siblings ...)
  2008-02-16 16:39 ` [PATCH 05/12] cmd640: init hwif->{io_ports,irq} explicitly Bartlomiej Zolnierkiewicz
@ 2008-02-16 16:39 ` Bartlomiej Zolnierkiewicz
  2008-02-16 16:39 ` [PATCH 07/12] ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers Bartlomiej Zolnierkiewicz
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:39 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

These host drivers indirectly depend on CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y
which is defined only on alpha, x86, ia64, m32r, mips and ppc32.

Moreover:

- on ia64 there is no ISA

- m32r is too new for VLB

- on ppc32 ISA is available only on PPC_CHRP (no default IDE ports)
  and PPC_PREP (marked as BROKEN)

[ the common sense tells me that VLB was only used on x86 but there
  are urban legends that one of these host drivers was needed on some
  other arch - thus the extra care ]

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/ide/Kconfig
===================================================================
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -1031,7 +1031,7 @@ config IDE_EXT_DIRECT
 endchoice
 
 # no isa -> no vlb
-if ISA
+if ISA && (ALPHA || X86 || MIPS)
 
 comment "Other IDE chipsets support"
 comment "Note: most of these also require special kernel boot parameters"

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 07/12] ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers
  2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
                   ` (4 preceding siblings ...)
  2008-02-16 16:39 ` [PATCH 06/12] ide: limit legacy VLB host drivers to alpha, x86 and mips Bartlomiej Zolnierkiewicz
@ 2008-02-16 16:39 ` Bartlomiej Zolnierkiewicz
  2008-02-16 16:39 ` [PATCH 08/12] ide: remove needless hwif->irq check from ide_hwif_configure() Bartlomiej Zolnierkiewicz
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:39 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

Do explicit port setup in legacy VLB host drivers instead of depending
on init_ide_data().  This way hwif->io_ports[] and hwif->irq are always
correctly set regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI.

[ No need to care about "idex=noprobe" parameter for these drivers
  as they need to be explicitly enabled with "probe" parameter. ]

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/legacy/ali14xx.c     |   12 ++++++++++++
 drivers/ide/legacy/dtc2278.c     |   12 ++++++++++++
 drivers/ide/legacy/ht6560b.c     |   12 ++++++++++++
 drivers/ide/legacy/ide-4drives.c |   10 +++++++---
 drivers/ide/legacy/qd65xx.c      |   19 +++++++++++++++++--
 drivers/ide/legacy/umc8672.c     |   12 ++++++++++++
 6 files changed, 72 insertions(+), 5 deletions(-)

Index: b/drivers/ide/legacy/ali14xx.c
===================================================================
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -200,6 +200,7 @@ static const struct ide_port_info ali14x
 static int __init ali14xx_probe(void)
 {
 	static u8 idx[4] = { 0, 1, 0xff, 0xff };
+	hw_regs_t hw[2];
 
 	printk(KERN_DEBUG "ali14xx: base=0x%03x, regOn=0x%02x.\n",
 			  basePort, regOn);
@@ -210,6 +211,17 @@ static int __init ali14xx_probe(void)
 		return 1;
 	}
 
+	memset(&hw, 0, sizeof(hw));
+
+	ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
+	hw[0].irq = 14;
+
+	ide_std_init_ports(&hw[1], 0x170, 0x376);
+	hw[1].irq = 15;
+
+	ide_init_port_hw(&ide_hwifs[0], &hw[0]);
+	ide_init_port_hw(&ide_hwifs[1], &hw[1]);
+
 	ide_hwifs[0].set_pio_mode = &ali14xx_set_pio_mode;
 	ide_hwifs[1].set_pio_mode = &ali14xx_set_pio_mode;
 
Index: b/drivers/ide/legacy/dtc2278.c
===================================================================
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -103,6 +103,7 @@ static int __init dtc2278_probe(void)
 	unsigned long flags;
 	ide_hwif_t *hwif, *mate;
 	static u8 idx[4] = { 0, 1, 0xff, 0xff };
+	hw_regs_t hw[2];
 
 	hwif = &ide_hwifs[0];
 	mate = &ide_hwifs[1];
@@ -128,6 +129,17 @@ static int __init dtc2278_probe(void)
 #endif
 	local_irq_restore(flags);
 
+	memset(&hw, 0, sizeof(hw));
+
+	ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
+	hw[0].irq = 14;
+
+	ide_std_init_ports(&hw[1], 0x170, 0x376);
+	hw[1].irq = 15;
+
+	ide_init_port_hw(hwif, &hw[0]);
+	ide_init_port_hw(mate, &hw[1]);
+
 	hwif->set_pio_mode = &dtc2278_set_pio_mode;
 
 	ide_device_add(idx, &dtc2278_port_info);
Index: b/drivers/ide/legacy/ht6560b.c
===================================================================
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -331,6 +331,7 @@ static int __init ht6560b_init(void)
 {
 	ide_hwif_t *hwif, *mate;
 	static u8 idx[4] = { 0, 1, 0xff, 0xff };
+	hw_regs_t hw[2];
 
 	if (probe_ht6560b == 0)
 		return -ENODEV;
@@ -349,6 +350,17 @@ static int __init ht6560b_init(void)
 		goto release_region;
 	}
 
+	memset(&hw, 0, sizeof(hw));
+
+	ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
+	hw[0].irq = 14;
+
+	ide_std_init_ports(&hw[1], 0x170, 0x376);
+	hw[1].irq = 15;
+
+	ide_init_port_hw(hwif, &hw[0]);
+	ide_init_port_hw(mate, &hw[1]);
+
 	hwif->selectproc = &ht6560b_selectproc;
 	hwif->set_pio_mode = &ht6560b_set_pio_mode;
 
Index: b/drivers/ide/legacy/ide-4drives.c
===================================================================
--- a/drivers/ide/legacy/ide-4drives.c
+++ b/drivers/ide/legacy/ide-4drives.c
@@ -13,6 +13,7 @@ static int __init ide_4drives_init(void)
 {
 	ide_hwif_t *hwif, *mate;
 	u8 idx[4] = { 0, 1, 0xff, 0xff };
+	hw_regs_t hw;
 
 	if (probe_4drives == 0)
 		return -ENODEV;
@@ -20,11 +21,14 @@ static int __init ide_4drives_init(void)
 	hwif = &ide_hwifs[0];
 	mate = &ide_hwifs[1];
 
-	memcpy(mate->io_ports, hwif->io_ports, sizeof(hwif->io_ports));
+	memset(&hw, 0, sizeof(hw));
 
-	mate->irq = hwif->irq;
+	ide_std_init_ports(&hw, 0x1f0, 0x3f6);
+	hw.irq = 14;
+	hw.chipset = ide_4drives;
 
-	mate->chipset = hwif->chipset = ide_4drives;
+	ide_init_port_hw(hwif, &hw);
+	ide_init_port_hw(mate, &hw);
 
 	mate->drives[0].select.all ^= 0x20;
 	mate->drives[1].select.all ^= 0x20;
Index: b/drivers/ide/legacy/qd65xx.c
===================================================================
--- a/drivers/ide/legacy/qd65xx.c
+++ b/drivers/ide/legacy/qd65xx.c
@@ -389,9 +389,9 @@ static const struct ide_port_info qd65xx
 static int __init qd_probe(int base)
 {
 	ide_hwif_t *hwif;
+	u8 config, unit;
 	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
-	u8 config;
-	u8 unit;
+	hw_regs_t hw[2];
 
 	config = inb(QD_CONFIG_PORT);
 
@@ -400,6 +400,14 @@ static int __init qd_probe(int base)
 
 	unit = ! (config & QD_CONFIG_IDE_BASEPORT);
 
+	memset(&hw, 0, sizeof(hw));
+
+	ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
+	hw[0].irq = 14;
+
+	ide_std_init_ports(&hw[1], 0x170, 0x376);
+	hw[1].irq = 15;
+
 	if ((config & 0xf0) == QD_CONFIG_QD6500) {
 
 		if (qd_testreg(base)) return 1;		/* bad register */
@@ -416,6 +424,8 @@ static int __init qd_probe(int base)
 			return 1;
 		}
 
+		ide_init_port_hw(hwif, &hw[unit]);
+
 		qd_setup(hwif, base, config);
 
 		hwif->port_init_devs = qd6500_port_init_devs;
@@ -451,6 +461,8 @@ static int __init qd_probe(int base)
 			printk(KERN_INFO "%s: qd6580: single IDE board\n",
 					 hwif->name);
 
+			ide_init_port_hw(hwif, &hw[unit]);
+
 			qd_setup(hwif, base, config | (control << 8));
 
 			hwif->port_init_devs = qd6580_port_init_devs;
@@ -472,6 +484,9 @@ static int __init qd_probe(int base)
 			printk(KERN_INFO "%s&%s: qd6580: dual IDE board\n",
 					hwif->name, mate->name);
 
+			ide_init_port_hw(hwif, &hw[0]);
+			ide_init_port_hw(mate, &hw[1]);
+
 			qd_setup(hwif, base, config | (control << 8));
 
 			hwif->port_init_devs = qd6580_port_init_devs;
Index: b/drivers/ide/legacy/umc8672.c
===================================================================
--- a/drivers/ide/legacy/umc8672.c
+++ b/drivers/ide/legacy/umc8672.c
@@ -130,6 +130,7 @@ static int __init umc8672_probe(void)
 {
 	unsigned long flags;
 	static u8 idx[4] = { 0, 1, 0xff, 0xff };
+	hw_regs_t hw[2];
 
 	if (!request_region(0x108, 2, "umc8672")) {
 		printk(KERN_ERR "umc8672: ports 0x108-0x109 already in use.\n");
@@ -148,6 +149,17 @@ static int __init umc8672_probe(void)
 	umc_set_speeds (current_speeds);
 	local_irq_restore(flags);
 
+	memset(&hw, 0, sizeof(hw));
+
+	ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
+	hw[0].irq = 14;
+
+	ide_std_init_ports(&hw[1], 0x170, 0x376);
+	hw[1].irq = 15;
+
+	ide_init_port_hw(&ide_hwifs[0], &hw[0]);
+	ide_init_port_hw(&ide_hwifs[1], &hw[1]);
+
 	ide_hwifs[0].set_pio_mode = &umc_set_pio_mode;
 	ide_hwifs[1].set_pio_mode = &umc_set_pio_mode;
 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 08/12] ide: remove needless hwif->irq check from ide_hwif_configure()
  2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
                   ` (5 preceding siblings ...)
  2008-02-16 16:39 ` [PATCH 07/12] ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers Bartlomiej Zolnierkiewicz
@ 2008-02-16 16:39 ` Bartlomiej Zolnierkiewicz
  2008-02-16 16:39 ` [PATCH 09/12] ide: move default IDE ports setup to ide_generic host driver Bartlomiej Zolnierkiewicz
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:39 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

ide_init_default_irq() is always zero for CONFIG_PCI=y so hwif->irq
check in ide_hwif_configure() can be safely removed.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/setup-pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/ide/setup-pci.c
===================================================================
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -371,7 +371,7 @@ static ide_hwif_t *ide_hwif_configure(st
 		return NULL;	/* no room in ide_hwifs[] */
 
 	memset(&hw, 0, sizeof(hw));
-	hw.irq = hwif->irq ? hwif->irq : irq;
+	hw.irq = irq;
 	hw.dev = &dev->dev;
 	hw.chipset = d->chipset ? d->chipset : ide_pci;
 	ide_std_init_ports(&hw, base, ctl | 2);

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 09/12] ide: move default IDE ports setup to ide_generic host driver
  2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
                   ` (6 preceding siblings ...)
  2008-02-16 16:39 ` [PATCH 08/12] ide: remove needless hwif->irq check from ide_hwif_configure() Bartlomiej Zolnierkiewicz
@ 2008-02-16 16:39 ` Bartlomiej Zolnierkiewicz
  2008-02-16 16:40 ` [PATCH 10/12] ide: remove ide_init_default_irq() macro Bartlomiej Zolnierkiewicz
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:39 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

* Make CONFIG_IDE_GENERIC depended on CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS.

* Move default IDE ports setup from init_ide_data() to ide_generic
  host driver (remembering to not break "idex=noprobe" parameter).

* Use ide_init_port_hw() in ide_generic host driver.

* Remove no longer needed CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/Kconfig       |    4 +---
 drivers/ide/ide-generic.c |   16 +++++++++++++---
 drivers/ide/ide.c         |   18 ------------------
 3 files changed, 14 insertions(+), 24 deletions(-)

Index: b/drivers/ide/Kconfig
===================================================================
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -307,6 +307,7 @@ comment "IDE chipset support/bugfixes"
 
 config IDE_GENERIC
 	tristate "generic/default IDE chipset support"
+	depends on ALPHA || X86 || IA64 || M32R || MIPS || PPC32
 	help
 	  If unsure, say N.
 
@@ -1096,9 +1097,6 @@ config BLK_DEV_IDEDMA
 	def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \
 		 BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
 
-config IDE_ARCH_OBSOLETE_DEFAULTS
-	def_bool ALPHA || X86 || IA64 || M32R || MIPS || PPC32
-
 endif
 
 config BLK_DEV_HD_ONLY
Index: b/drivers/ide/ide-generic.c
===================================================================
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -94,11 +94,21 @@ static int __init ide_generic_init(void)
 
 	for (i = 0; i < MAX_HWIFS; i++) {
 		ide_hwif_t *hwif = &ide_hwifs[i];
+		unsigned long io_addr = ide_default_io_base(i);
+		hw_regs_t hw;
+
+		if (hwif->chipset == ide_unknown && io_addr) {
+			u8 oldnoprobe = hwif->noprobe;
+
+			memset(&hw, 0, sizeof(hw));
+			ide_std_init_ports(&hw, io_addr, io_addr + 0x206);
+			hw.irq = ide_init_default_irq(io_addr);
+			ide_init_port_hw(hwif, &hw);
+
+			hwif->noprobe = oldnoprobe;
 
-		if (hwif->io_ports[IDE_DATA_OFFSET] &&
-		    hwif->chipset == ide_unknown)
 			idx[i] = i;
-		else
+		} else
 			idx[i] = 0xff;
 	}
 
Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -167,12 +167,6 @@ static void ide_port_init_devices_data(i
 	}
 }
 
-#ifndef CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS
-# define ide_default_io_base(index)	(0)
-# define ide_default_irq(base)		(0)
-# define ide_init_default_irq(base)	(0)
-#endif
-
 /*
  * init_ide_data() sets reasonable default values into all fields
  * of all instances of the hwifs and drives, but only on the first call.
@@ -195,7 +189,6 @@ static void __init init_ide_data (void)
 {
 	unsigned int index;
 	static unsigned long magic_cookie = MAGIC_COOKIE;
-	hw_regs_t hw;
 
 	if (magic_cookie != MAGIC_COOKIE)
 		return;		/* already initialized */
@@ -204,19 +197,8 @@ static void __init init_ide_data (void)
 	/* Initialise all interface structures */
 	for (index = 0; index < MAX_HWIFS; ++index) {
 		ide_hwif_t *hwif = &ide_hwifs[index];
-		unsigned long io_addr = ide_default_io_base(index);
-		unsigned long ctl_addr = io_addr + 0x206;
 
 		ide_init_port_data(hwif, index);
-
-#ifdef CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS
-		memset(&hw, 0, sizeof(hw));
-		ide_std_init_ports(&hw, io_addr, ctl_addr);
-		memcpy(hwif->io_ports, hw.io_ports, sizeof(hw.io_ports));
-		hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
-		hwif->irq =
-			ide_init_default_irq(hwif->io_ports[IDE_DATA_OFFSET]);
-#endif
 	}
 }
 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 10/12] ide: remove ide_init_default_irq() macro
  2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
                   ` (7 preceding siblings ...)
  2008-02-16 16:39 ` [PATCH 09/12] ide: move default IDE ports setup to ide_generic host driver Bartlomiej Zolnierkiewicz
@ 2008-02-16 16:40 ` Bartlomiej Zolnierkiewicz
  2008-02-16 16:40 ` [PATCH 11/12] ide: cleanup ide_match_hwif() Bartlomiej Zolnierkiewicz
  2008-02-16 16:40 ` [PATCH 12/12] ide: cleanup ide_find_port() Bartlomiej Zolnierkiewicz
  10 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:40 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

* Use ide_default_irq() instead of ide_init_default_irq() in
  ide_generic host driver (so the correct IRQ is always set
  regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI).

* Remove no longer needed ide_init_default_irq() macro.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-generic.c           |    2 +-
 include/asm-alpha/ide.h             |    6 ------
 include/asm-ia64/ide.h              |    6 ------
 include/asm-m32r/ide.h              |    6 ------
 include/asm-mips/mach-generic/ide.h |    6 ------
 include/asm-powerpc/ide.h           |    6 ------
 include/asm-x86/ide.h               |    6 ------
 7 files changed, 1 insertion(+), 37 deletions(-)

Index: b/drivers/ide/ide-generic.c
===================================================================
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -102,7 +102,7 @@ static int __init ide_generic_init(void)
 
 			memset(&hw, 0, sizeof(hw));
 			ide_std_init_ports(&hw, io_addr, io_addr + 0x206);
-			hw.irq = ide_init_default_irq(io_addr);
+			hw.irq = ide_default_irq(io_addr);
 			ide_init_port_hw(hwif, &hw);
 
 			hwif->noprobe = oldnoprobe;
Index: b/include/asm-alpha/ide.h
===================================================================
--- a/include/asm-alpha/ide.h
+++ b/include/asm-alpha/ide.h
@@ -37,12 +37,6 @@ static inline unsigned long ide_default_
 	}
 }
 
-#ifdef CONFIG_PCI
-#define ide_init_default_irq(base)	(0)
-#else
-#define ide_init_default_irq(base)	ide_default_irq(base)
-#endif
-
 #include <asm-generic/ide_iops.h>
 
 #endif /* __KERNEL__ */
Index: b/include/asm-ia64/ide.h
===================================================================
--- a/include/asm-ia64/ide.h
+++ b/include/asm-ia64/ide.h
@@ -44,12 +44,6 @@ static inline unsigned long ide_default_
 	}
 }
 
-#ifdef CONFIG_PCI
-#define ide_init_default_irq(base)	(0)
-#else
-#define ide_init_default_irq(base)	ide_default_irq(base)
-#endif
-
 #include <asm-generic/ide_iops.h>
 
 #endif /* __KERNEL__ */
Index: b/include/asm-m32r/ide.h
===================================================================
--- a/include/asm-m32r/ide.h
+++ b/include/asm-m32r/ide.h
@@ -63,12 +63,6 @@ static __inline__ unsigned long ide_defa
 	}
 }
 
-#ifdef CONFIG_BLK_DEV_IDEPCI
-#define ide_init_default_irq(base)     (0)
-#else
-#define ide_init_default_irq(base)     ide_default_irq(base)
-#endif
-
 #include <asm-generic/ide_iops.h>
 
 #endif /* __KERNEL__ */
Index: b/include/asm-mips/mach-generic/ide.h
===================================================================
--- a/include/asm-mips/mach-generic/ide.h
+++ b/include/asm-mips/mach-generic/ide.h
@@ -96,12 +96,6 @@ static __inline__ unsigned long ide_defa
 	}
 }
 
-#ifdef CONFIG_BLK_DEV_IDEPCI
-#define ide_init_default_irq(base)	(0)
-#else
-#define ide_init_default_irq(base)	ide_default_irq(base)
-#endif
-
 /* MIPS port and memory-mapped I/O string operations.  */
 static inline void __ide_flush_prologue(void)
 {
Index: b/include/asm-powerpc/ide.h
===================================================================
--- a/include/asm-powerpc/ide.h
+++ b/include/asm-powerpc/ide.h
@@ -73,12 +73,6 @@ static __inline__ unsigned long ide_defa
 	return 0;
 }
 
-#ifdef CONFIG_PCI
-#define ide_init_default_irq(base)	(0)
-#else
-#define ide_init_default_irq(base)	ide_default_irq(base)
-#endif
-
 #ifdef CONFIG_BLK_DEV_MPC8xx_IDE
 #define IDE_ARCH_ACK_INTR  1
 #define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
Index: b/include/asm-x86/ide.h
===================================================================
--- a/include/asm-x86/ide.h
+++ b/include/asm-x86/ide.h
@@ -58,12 +58,6 @@ static __inline__ unsigned long ide_defa
 	}
 }
 
-#ifdef CONFIG_BLK_DEV_IDEPCI
-#define ide_init_default_irq(base)	(0)
-#else
-#define ide_init_default_irq(base)	ide_default_irq(base)
-#endif
-
 #include <asm-generic/ide_iops.h>
 
 #endif /* __KERNEL__ */

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 11/12] ide: cleanup ide_match_hwif()
  2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
                   ` (8 preceding siblings ...)
  2008-02-16 16:40 ` [PATCH 10/12] ide: remove ide_init_default_irq() macro Bartlomiej Zolnierkiewicz
@ 2008-02-16 16:40 ` Bartlomiej Zolnierkiewicz
  2008-02-16 16:40 ` [PATCH 12/12] ide: cleanup ide_find_port() Bartlomiej Zolnierkiewicz
  10 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:40 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

* Remove no longer needed matching against I/O base and 'io_base' argument.

* Move printk() to the caller and remove 'name' argument.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/setup-pci.c |   47 +++++++++++++++--------------------------------
 1 file changed, 15 insertions(+), 32 deletions(-)

Index: b/drivers/ide/setup-pci.c
===================================================================
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -22,42 +22,20 @@
 
 
 /**
- *	ide_match_hwif	-	match a PCI IDE against an ide_hwif
- *	@io_base: I/O base of device
- *	@bootable: set if its bootable
- *	@name: name of device
+ *	ide_match_hwif	-	find free ide_hwifs[] slot
+ *	@bootable: bootable flag
  *
- *	Match a PCI IDE port against an entry in ide_hwifs[],
- *	based on io_base port if possible. Return the matching hwif,
- *	or a new hwif. If we find an error (clashing, out of devices, etc)
- *	return NULL
- *
- *	FIXME: we need to handle mmio matches here too
+ *	Return the new hwif.  If we are out of free slots return NULL.
  */
 
-static ide_hwif_t *ide_match_hwif(unsigned long io_base, u8 bootable, const char *name)
+static ide_hwif_t *ide_match_hwif(u8 bootable)
 {
-	int h;
 	ide_hwif_t *hwif;
+	int h;
 
 	/*
-	 * Look for a hwif with matching io_base default value.
-	 * If chipset is "ide_unknown", then claim that hwif slot.
-	 * Otherwise, some other chipset has already claimed it..  :(
-	 */
-	for (h = 0; h < MAX_HWIFS; ++h) {
-		hwif = &ide_hwifs[h];
-		if (hwif->io_ports[IDE_DATA_OFFSET] == io_base) {
-			if (hwif->chipset == ide_unknown)
-				return hwif; /* match */
-			printk(KERN_ERR "%s: port 0x%04lx already claimed by %s\n",
-				name, io_base, hwif->name);
-			return NULL;	/* already claimed */
-		}
-	}
-	/*
-	 * Okay, there is no hwif matching our io_base,
-	 * so we'll just claim an unassigned slot.
+	 * Claim an unassigned slot.
+	 *
 	 * Give preference to claiming other slots before claiming ide0/ide1,
 	 * just in case there's another interface yet-to-be-scanned
 	 * which uses ports 1f0/170 (the ide0/ide1 defaults).
@@ -83,7 +61,7 @@ static ide_hwif_t *ide_match_hwif(unsign
 		if (hwif->chipset == ide_unknown)
 			return hwif;	/* pick an unused entry */
 	}
-	printk(KERN_ERR "%s: too many IDE interfaces, no room in table\n", name);
+
 	return NULL;
 }
 
@@ -367,8 +345,13 @@ static ide_hwif_t *ide_hwif_configure(st
 		ctl = port ? 0x374 : 0x3f4;
 		base = port ? 0x170 : 0x1f0;
 	}
-	if ((hwif = ide_match_hwif(base, bootable, d->name)) == NULL)
-		return NULL;	/* no room in ide_hwifs[] */
+
+	hwif = ide_match_hwif(bootable);
+	if (hwif == NULL) {
+		printk(KERN_ERR "%s: too many IDE interfaces, no room in "
+				"table\n", d->name);
+		return NULL;
+	}
 
 	memset(&hw, 0, sizeof(hw));
 	hw.irq = irq;

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 12/12] ide: cleanup ide_find_port()
  2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
                   ` (9 preceding siblings ...)
  2008-02-16 16:40 ` [PATCH 11/12] ide: cleanup ide_match_hwif() Bartlomiej Zolnierkiewicz
@ 2008-02-16 16:40 ` Bartlomiej Zolnierkiewicz
  10 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 16:40 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

Remove no longer needed matching against I/O base and 'base' argument.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/arm/bast-ide.c        |    2 +-
 drivers/ide/arm/icside.c          |    2 +-
 drivers/ide/arm/ide_arm.c         |    2 +-
 drivers/ide/arm/palm_bk3710.c     |    2 +-
 drivers/ide/arm/rapide.c          |    2 +-
 drivers/ide/cris/ide-cris.c       |    2 +-
 drivers/ide/h8300/ide-h8300.c     |    3 +--
 drivers/ide/ide-generic.c         |    2 +-
 drivers/ide/ide-pnp.c             |    2 +-
 drivers/ide/ide.c                 |   15 +++------------
 drivers/ide/legacy/buddha.c       |    2 +-
 drivers/ide/legacy/falconide.c    |    2 +-
 drivers/ide/legacy/gayle.c        |    2 +-
 drivers/ide/legacy/ide-cs.c       |    2 +-
 drivers/ide/legacy/ide_platform.c |    2 +-
 drivers/ide/legacy/macide.c       |    2 +-
 drivers/ide/legacy/q40ide.c       |    2 +-
 drivers/ide/pci/delkin_cb.c       |    2 +-
 include/linux/ide.h               |    2 +-
 19 files changed, 21 insertions(+), 31 deletions(-)

Index: b/drivers/ide/arm/bast-ide.c
===================================================================
--- a/drivers/ide/arm/bast-ide.c
+++ b/drivers/ide/arm/bast-ide.c
@@ -41,7 +41,7 @@ static int __init bastide_register(unsig
 	hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20);
 	hw.irq = irq;
 
-	hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+	hwif = ide_find_port();
 	if (hwif == NULL)
 		goto out;
 
Index: b/drivers/ide/arm/icside.c
===================================================================
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -400,7 +400,7 @@ icside_setup(void __iomem *base, struct 
 	unsigned long port = (unsigned long)base + info->dataoffset;
 	ide_hwif_t *hwif;
 
-	hwif = ide_find_port(port);
+	hwif = ide_find_port();
 	if (hwif) {
 		int i;
 
Index: b/drivers/ide/arm/ide_arm.c
===================================================================
--- a/drivers/ide/arm/ide_arm.c
+++ b/drivers/ide/arm/ide_arm.c
@@ -34,7 +34,7 @@ static int __init ide_arm_init(void)
 	ide_std_init_ports(&hw, IDE_ARM_IO, IDE_ARM_IO + 0x206);
 	hw.irq = IDE_ARM_IRQ;
 
-	hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+	hwif = ide_find_port();
 	if (hwif) {
 		ide_init_port_hw(hwif, &hw);
 		idx[0] = hwif->index;
Index: b/drivers/ide/arm/palm_bk3710.c
===================================================================
--- a/drivers/ide/arm/palm_bk3710.c
+++ b/drivers/ide/arm/palm_bk3710.c
@@ -378,7 +378,7 @@ static int __devinit palm_bk3710_probe(s
 	hw.irq = irq->start;
 	hw.chipset = ide_palm3710;
 
-	hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+	hwif = ide_find_port();
 	if (hwif == NULL)
 		goto out;
 
Index: b/drivers/ide/arm/rapide.c
===================================================================
--- a/drivers/ide/arm/rapide.c
+++ b/drivers/ide/arm/rapide.c
@@ -44,7 +44,7 @@ rapide_probe(struct expansion_card *ec, 
 		goto release;
 	}
 
-	hwif = ide_find_port((unsigned long)base);
+	hwif = ide_find_port();
 	if (hwif) {
 		memset(&hw, 0, sizeof(hw));
 		rapide_setup_ports(&hw, base, base + 0x818, 1 << 6, ec->irq);
Index: b/drivers/ide/cris/ide-cris.c
===================================================================
--- a/drivers/ide/cris/ide-cris.c
+++ b/drivers/ide/cris/ide-cris.c
@@ -804,7 +804,7 @@ static int __init init_e100_ide(void)
 
 		cris_setup_ports(&hw, cris_ide_base_address(h));
 
-		hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+		hwif = ide_find_port();
 		if (hwif == NULL)
 			continue;
 		ide_init_port_data(hwif, hwif->index);
Index: b/drivers/ide/h8300/ide-h8300.c
===================================================================
--- a/drivers/ide/h8300/ide-h8300.c
+++ b/drivers/ide/h8300/ide-h8300.c
@@ -99,8 +99,7 @@ static int __init h8300_ide_init(void)
 
 	hw_setup(&hw);
 
-	/* register if */
-	hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+	hwif = ide_find_port();
 	if (hwif == NULL) {
 		printk(KERN_ERR "ide-h8300: IDE I/F register failed\n");
 		return -ENOENT;
Index: b/drivers/ide/ide-generic.c
===================================================================
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -33,7 +33,7 @@ static ssize_t store_add(struct class *c
 	if (sscanf(buf, "%x:%x:%d", &base, &ctl, &irq) != 3)
 		return -EINVAL;
 
-	hwif = ide_find_port(base);
+	hwif = ide_find_port();
 	if (hwif == NULL)
 		return -ENOENT;
 
Index: b/drivers/ide/ide-pnp.c
===================================================================
--- a/drivers/ide/ide-pnp.c
+++ b/drivers/ide/ide-pnp.c
@@ -38,7 +38,7 @@ static int idepnp_probe(struct pnp_dev *
 				pnp_port_start(dev, 1));
 	hw.irq = pnp_irq(dev, 0);
 
-	hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+	hwif = ide_find_port();
 	if (hwif) {
 		u8 index = hwif->index;
 		u8 idx[4] = { index, 0xff, 0xff, 0xff };
Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -234,28 +234,19 @@ static int ide_system_bus_speed(void)
 	return pci_dev_present(pci_default) ? 33 : 50;
 }
 
-ide_hwif_t * ide_find_port(unsigned long base)
+ide_hwif_t *ide_find_port(void)
 {
 	ide_hwif_t *hwif;
 	int i;
 
 	for (i = 0; i < MAX_HWIFS; i++) {
 		hwif = &ide_hwifs[i];
-		if (hwif->io_ports[IDE_DATA_OFFSET] == base)
-			goto found;
-	}
-
-	for (i = 0; i < MAX_HWIFS; i++) {
-		hwif = &ide_hwifs[i];
 		if (hwif->chipset == ide_unknown)
-			goto found;
+			return hwif;
 	}
 
-	hwif = NULL;
-found:
-	return hwif;
+	return NULL;
 }
-
 EXPORT_SYMBOL_GPL(ide_find_port);
 
 static struct resource* hwif_request_region(ide_hwif_t *hwif,
Index: b/drivers/ide/legacy/buddha.c
===================================================================
--- a/drivers/ide/legacy/buddha.c
+++ b/drivers/ide/legacy/buddha.c
@@ -221,7 +221,7 @@ fail_base2:
 
 			buddha_setup_ports(&hw, base, ctl, irq_port, ack_intr);
 
-			hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+			hwif = ide_find_port();
 			if (hwif) {
 				u8 index = hwif->index;
 
Index: b/drivers/ide/legacy/falconide.c
===================================================================
--- a/drivers/ide/legacy/falconide.c
+++ b/drivers/ide/legacy/falconide.c
@@ -76,7 +76,7 @@ static int __init falconide_init(void)
 
 	falconide_setup_ports(&hw);
 
-	hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+	hwif = ide_find_port();
 	if (hwif) {
 		u8 index = hwif->index;
 		u8 idx[4] = { index, 0xff, 0xff, 0xff };
Index: b/drivers/ide/legacy/gayle.c
===================================================================
--- a/drivers/ide/legacy/gayle.c
+++ b/drivers/ide/legacy/gayle.c
@@ -175,7 +175,7 @@ found:
 
 	gayle_setup_ports(&hw, base, ctrlport, irqport, ack_intr);
 
-	hwif = ide_find_port(base);
+	hwif = ide_find_port();
 	if (hwif) {
 	    u8 index = hwif->index;
 
Index: b/drivers/ide/legacy/ide-cs.c
===================================================================
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -156,7 +156,7 @@ static int idecs_register(unsigned long 
     hw.chipset = ide_pci;
     hw.dev = &handle->dev;
 
-    hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+    hwif = ide_find_port();
     if (hwif == NULL)
 	return -1;
 
Index: b/drivers/ide/legacy/ide_platform.c
===================================================================
--- a/drivers/ide/legacy/ide_platform.c
+++ b/drivers/ide/legacy/ide_platform.c
@@ -89,7 +89,7 @@ static int __devinit plat_ide_probe(stru
 			res_alt->start, res_alt->end - res_alt->start + 1);
 	}
 
-	hwif = ide_find_port((unsigned long)base);
+	hwif = ide_find_port();
 	if (!hwif) {
 		ret = -ENODEV;
 		goto out;
Index: b/drivers/ide/legacy/macide.c
===================================================================
--- a/drivers/ide/legacy/macide.c
+++ b/drivers/ide/legacy/macide.c
@@ -120,7 +120,7 @@ static int __init macide_init(void)
 
 	macide_setup_ports(&hw, base, irq, ack_intr);
 
-	hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+	hwif = ide_find_port();
 	if (hwif) {
 		u8 index = hwif->index;
 		u8 idx[4] = { index, 0xff, 0xff, 0xff };
Index: b/drivers/ide/legacy/q40ide.c
===================================================================
--- a/drivers/ide/legacy/q40ide.c
+++ b/drivers/ide/legacy/q40ide.c
@@ -137,7 +137,7 @@ static int __init q40ide_init(void)
 //			m68kide_iops,
 			q40ide_default_irq(pcide_bases[i]));
 
-	hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+	hwif = ide_find_port();
 	if (hwif) {
 		ide_init_port_data(hwif, hwif->index);
 		ide_init_port_hw(hwif, &hw);
Index: b/drivers/ide/pci/delkin_cb.c
===================================================================
--- a/drivers/ide/pci/delkin_cb.c
+++ b/drivers/ide/pci/delkin_cb.c
@@ -78,7 +78,7 @@ delkin_cb_probe (struct pci_dev *dev, co
 	hw.irq = dev->irq;
 	hw.chipset = ide_pci;		/* this enables IRQ sharing */
 
-	hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+	hwif = ide_find_port();
 	if (hwif == NULL)
 		goto out_disable;
 
Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -171,7 +171,7 @@ typedef struct hw_regs_s {
 	struct device	*dev;
 } hw_regs_t;
 
-struct hwif_s * ide_find_port(unsigned long);
+struct hwif_s *ide_find_port(void);
 void ide_init_port_data(struct hwif_s *, unsigned int);
 void ide_init_port_hw(struct hwif_s *, hw_regs_t *);
 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 03/12] ide: add ide-4drives host driver
  2008-02-16 16:39 ` [PATCH 03/12] ide: add ide-4drives host driver Bartlomiej Zolnierkiewicz
@ 2008-02-16 17:26   ` Randy Dunlap
  2008-02-17 17:12     ` Bartlomiej Zolnierkiewicz
  2008-02-19 13:03   ` Sergei Shtylyov
  1 sibling, 1 reply; 16+ messages in thread
From: Randy Dunlap @ 2008-02-16 17:26 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel

On Sat, 16 Feb 2008 17:39:11 +0100 Bartlomiej Zolnierkiewicz wrote:

> CONFIG_BLK_DEV_4DRIVES deserves its own host driver:
> 
> * Add drivers/ide/legacy/ide-4drives.c and move "4drives" support there.
> 
> * Add ide-4drives.o in the link order after all other legacy host
>   drivers enabled by "ide0=" options (they all are mutually exclusive).
> 
> * Make ide-4drives host driver probe itself for IDE devices instead of
>   indirectly depending on ide_generic host driver.
> 
> * Add "probe" module parameter to ide-4drives and update documentation.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
>  Documentation/ide.txt            |    5 ++--
>  drivers/ide/Kconfig              |    4 +--
>  drivers/ide/ide.c                |   15 ++----------
>  drivers/ide/legacy/Makefile      |    1 
>  drivers/ide/legacy/ide-4drives.c |   46 +++++++++++++++++++++++++++++++++++++++
>  5 files changed, 55 insertions(+), 16 deletions(-)
> 
> Index: b/Documentation/ide.txt
> ===================================================================
> --- a/Documentation/ide.txt
> +++ b/Documentation/ide.txt
> @@ -242,8 +242,6 @@ Summary of ide driver parameters for ker
>  			  both the respective primary and secondary channel
>  			  to take effect.
>  
> - "idex=four"		: four drives on idex and ide(x^1) share same ports
> -			
>   "idex=reset"		: reset interface after probe
>  
>   "idex=ata66"		: informs the interface that it has an 80c cable
> @@ -276,6 +274,9 @@ Also for legacy CMD640 host driver (cmd6
>  kernel paremeter to enable probing for VLB version of the chipset (PCI ones
>  are detected automatically).
>  
> +You also need to use "probe" kernel paramater for ide-4drives driver

                                       parameter

> +(support for IDE generic chipset with four drives on one port).
> +

---
~Randy

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 03/12] ide: add ide-4drives host driver
  2008-02-16 17:26   ` Randy Dunlap
@ 2008-02-17 17:12     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-17 17:12 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-ide, linux-kernel

On Saturday 16 February 2008, Randy Dunlap wrote:

[...]

> > +You also need to use "probe" kernel paramater for ide-4drives driver
> 
>                                        parameter

thanks, fixed in "take 2"

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 03/12] ide: add ide-4drives host driver
  2008-02-16 16:39 ` [PATCH 03/12] ide: add ide-4drives host driver Bartlomiej Zolnierkiewicz
  2008-02-16 17:26   ` Randy Dunlap
@ 2008-02-19 13:03   ` Sergei Shtylyov
  2008-02-19 21:24     ` Bartlomiej Zolnierkiewicz
  1 sibling, 1 reply; 16+ messages in thread
From: Sergei Shtylyov @ 2008-02-19 13:03 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel

Bartlomiej Zolnierkiewicz wrote:

> CONFIG_BLK_DEV_4DRIVES deserves its own host driver:

> * Add drivers/ide/legacy/ide-4drives.c and move "4drives" support there.

> * Add ide-4drives.o in the link order after all other legacy host
>   drivers enabled by "ide0=" options (they all are mutually exclusive).

> * Make ide-4drives host driver probe itself for IDE devices instead of
>   indirectly depending on ide_generic host driver.

> * Add "probe" module parameter to ide-4drives and update documentation.

> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

> Index: b/drivers/ide/Kconfig
> ===================================================================
> --- a/drivers/ide/Kconfig
> +++ b/drivers/ide/Kconfig
> @@ -1042,8 +1042,8 @@ config BLK_DEV_4DRIVES
>  	  Certain older chipsets, including the Tekram 690CD, use a single set
>  	  of I/O ports at 0x1f0 to control up to four drives, instead of the
>  	  customary two drives per port. Support for this can be enabled at
> -	  runtime using the "ide0=four" kernel boot parameter if you say Y
> -	  here.
> +	  runtime using the "ide_4drives.probe" kernel boot parameter if you

    Not "ide-4drives.probe?
    Looks correct otherwise.

MBR, Sergei

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 03/12] ide: add ide-4drives host driver
  2008-02-19 13:03   ` Sergei Shtylyov
@ 2008-02-19 21:24     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 16+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-19 21:24 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-ide, linux-kernel

On Tuesday 19 February 2008, Sergei Shtylyov wrote:
> Bartlomiej Zolnierkiewicz wrote:
> 
> > CONFIG_BLK_DEV_4DRIVES deserves its own host driver:
> 
> > * Add drivers/ide/legacy/ide-4drives.c and move "4drives" support there.
> 
> > * Add ide-4drives.o in the link order after all other legacy host
> >   drivers enabled by "ide0=" options (they all are mutually exclusive).
> 
> > * Make ide-4drives host driver probe itself for IDE devices instead of
> >   indirectly depending on ide_generic host driver.
> 
> > * Add "probe" module parameter to ide-4drives and update documentation.
> 
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> 
> > Index: b/drivers/ide/Kconfig
> > ===================================================================
> > --- a/drivers/ide/Kconfig
> > +++ b/drivers/ide/Kconfig
> > @@ -1042,8 +1042,8 @@ config BLK_DEV_4DRIVES
> >  	  Certain older chipsets, including the Tekram 690CD, use a single set
> >  	  of I/O ports at 0x1f0 to control up to four drives, instead of the
> >  	  customary two drives per port. Support for this can be enabled at
> > -	  runtime using the "ide0=four" kernel boot parameter if you say Y
> > -	  here.
> > +	  runtime using the "ide_4drives.probe" kernel boot parameter if you
> 
>     Not "ide-4drives.probe?
>     Looks correct otherwise.

I believe that both versions are correct but I fixed this in 'take 3' to
be on the safe side.

Thanks,
Bart

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-02-19 22:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 02/12] ide: remove ppc ifdef from init_ide_data() Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 03/12] ide: add ide-4drives host driver Bartlomiej Zolnierkiewicz
2008-02-16 17:26   ` Randy Dunlap
2008-02-17 17:12     ` Bartlomiej Zolnierkiewicz
2008-02-19 13:03   ` Sergei Shtylyov
2008-02-19 21:24     ` Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 04/12] cmd640: cleanup setup_device_ptrs() Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 05/12] cmd640: init hwif->{io_ports,irq} explicitly Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 06/12] ide: limit legacy VLB host drivers to alpha, x86 and mips Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 07/12] ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 08/12] ide: remove needless hwif->irq check from ide_hwif_configure() Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 09/12] ide: move default IDE ports setup to ide_generic host driver Bartlomiej Zolnierkiewicz
2008-02-16 16:40 ` [PATCH 10/12] ide: remove ide_init_default_irq() macro Bartlomiej Zolnierkiewicz
2008-02-16 16:40 ` [PATCH 11/12] ide: cleanup ide_match_hwif() Bartlomiej Zolnierkiewicz
2008-02-16 16:40 ` [PATCH 12/12] ide: cleanup ide_find_port() Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).