]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ide: make legacy IDE VLB modules check for the "probe" kernel params (v2)
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sat, 3 Mar 2007 16:48:55 +0000 (17:48 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sat, 3 Mar 2007 16:48:55 +0000 (17:48 +0100)
Legacy IDE VLB host drivers didn't check for "probe" options when compiled
as modules, which was obviously wrong as we don't want module to poke at
random I/O ports by simply loading it.  Fix it by adding "probe" module param
to legacy IDE VLB host drivers.

v2:
* don't obsolete old "ide0=dtc2278/ht6560b/qd65xx/ali14xx/umc8672"
  IDE driver options yet (per Alan Cox's request) and enhance documentation

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Documentation/ide.txt
drivers/ide/Kconfig
drivers/ide/ide.c
drivers/ide/legacy/ali14xx.c
drivers/ide/legacy/dtc2278.c
drivers/ide/legacy/ht6560b.c
drivers/ide/legacy/qd65xx.c
drivers/ide/legacy/umc8672.c

index 82349f5cd3d7552e8e9571e50fe7a6dfc7d8ba5e..3bb9f9c986113d4f2f31d1d56f461645bb84d917 100644 (file)
@@ -294,13 +294,8 @@ The following are valid ONLY on ide0, which usually corresponds
 to the first ATA interface found on the particular host, and the defaults for
 the base,ctl ports must not be altered.
 
- "ide0=dtc2278"                : probe/support DTC2278 interface
- "ide0=ht6560b"                : probe/support HT6560B interface
  "ide0=cmd640_vlb"     : *REQUIRED* for VLB cards with the CMD640 chip
                          (not for PCI -- automatically detected)
- "ide0=qd65xx"         : probe/support qd65xx interface
- "ide0=ali14xx"                : probe/support ali14xx chipsets (ALI M1439/M1443/M1445)
- "ide0=umc8672"                : probe/support umc8672 chipsets
 
  "ide=doubler"         : probe/support IDE doublers on Amiga
 
@@ -308,6 +303,15 @@ There may be more options than shown -- use the source, Luke!
 
 Everything else is rejected with a "BAD OPTION" message.
 
+For legacy IDE VLB host drivers (ali14xx/dtc2278/ht6560b/qd65xx/umc8672)
+you need to explicitly enable probing by using "probe" kernel parameter,
+i.e. to enable probing for ALI M14xx chipsets (ali14xx host driver) use:
+
+* "ali14xx.probe" boot option when ali14xx driver is built-in the kernel
+
+* "probe" module parameter when ali14xx driver is compiled as module
+  ("modprobe ali14xx probe")
+
 ================================================================================
 
 IDE ATAPI streaming tape driver
index 49234e32fd167f0de6591584048568d582349bc7..5d134bb75ba16f107c223871e7ef6ee53525ec85 100644 (file)
@@ -1023,7 +1023,7 @@ config BLK_DEV_4DRIVES
 config BLK_DEV_ALI14XX
        tristate "ALI M14xx support"
        help
-         This driver is enabled at runtime using the "ide0=ali14xx" kernel
+         This driver is enabled at runtime using the "ali14xx.probe" kernel
          boot parameter.  It enables support for the secondary IDE interface
          of the ALI M1439/1443/1445/1487/1489 chipsets, and permits faster
          I/O speeds to be set as well.  See the files
@@ -1033,7 +1033,7 @@ config BLK_DEV_ALI14XX
 config BLK_DEV_DTC2278
        tristate "DTC-2278 support"
        help
-         This driver is enabled at runtime using the "ide0=dtc2278" kernel
+         This driver is enabled at runtime using the "dtc2278.probe" kernel
          boot parameter. It enables support for the secondary IDE interface
          of the DTC-2278 card, and permits faster I/O speeds to be set as
          well. See the <file:Documentation/ide.txt> and
@@ -1042,7 +1042,7 @@ config BLK_DEV_DTC2278
 config BLK_DEV_HT6560B
        tristate "Holtek HT6560B support"
        help
-         This driver is enabled at runtime using the "ide0=ht6560b" kernel
+         This driver is enabled at runtime using the "ht6560b.probe" kernel
          boot parameter. It enables support for the secondary IDE interface
          of the Holtek card, and permits faster I/O speeds to be set as well.
          See the <file:Documentation/ide.txt> and
@@ -1051,7 +1051,7 @@ config BLK_DEV_HT6560B
 config BLK_DEV_QD65XX
        tristate "QDI QD65xx support"
        help
-         This driver is enabled at runtime using the "ide0=qd65xx" kernel
+         This driver is enabled at runtime using the "qd65xx.probe" kernel
          boot parameter.  It permits faster I/O speeds to be set.  See the
          <file:Documentation/ide.txt> and <file:drivers/ide/legacy/qd65xx.c> for
          more info.
@@ -1059,7 +1059,7 @@ config BLK_DEV_QD65XX
 config BLK_DEV_UMC8672
        tristate "UMC-8672 support"
        help
-         This driver is enabled at runtime using the "ide0=umc8672" kernel
+         This driver is enabled at runtime using the "umc8672.probe" kernel
          boot parameter. It enables support for the secondary IDE interface
          of the UMC-8672, and permits faster I/O speeds to be set as well.
          See the files <file:Documentation/ide.txt> and
index ac1a720f182ab0fb2e0607875c4912a936fccaa3..dfbd7445852234dff93f9e30534cac343afb72db 100644 (file)
@@ -1484,23 +1484,23 @@ static int __init match_parm (char *s, const char *keywords[], int vals[], int m
 }
 
 #ifdef CONFIG_BLK_DEV_ALI14XX
-static int __initdata probe_ali14xx;
+extern int probe_ali14xx;
 extern int ali14xx_init(void);
 #endif
 #ifdef CONFIG_BLK_DEV_UMC8672
-static int __initdata probe_umc8672;
+extern int probe_umc8672;
 extern int umc8672_init(void);
 #endif
 #ifdef CONFIG_BLK_DEV_DTC2278
-static int __initdata probe_dtc2278;
+extern int probe_dtc2278;
 extern int dtc2278_init(void);
 #endif
 #ifdef CONFIG_BLK_DEV_HT6560B
-static int __initdata probe_ht6560b;
+extern int probe_ht6560b;
 extern int ht6560b_init(void);
 #endif
 #ifdef CONFIG_BLK_DEV_QD65XX
-static int __initdata probe_qd65xx;
+extern int probe_qd65xx;
 extern int qd65xx_init(void);
 #endif
 
index f9f5b8d54d6d799ff4f346553c1c288f6feadac8..91961aa030474fa02057f8ed2e8dd270b69f87d3 100644 (file)
@@ -228,9 +228,17 @@ static int __init ali14xx_probe(void)
        return 0;
 }
 
+int probe_ali14xx = 0;
+
+module_param_named(probe, probe_ali14xx, bool, 0);
+MODULE_PARM_DESC(probe, "probe for ALI M14xx chipsets");
+
 /* Can be called directly from ide.c. */
 int __init ali14xx_init(void)
 {
+       if (probe_ali14xx == 0)
+               goto out;
+
        /* auto-detect IDE controller port */
        if (findPort()) {
                if (ali14xx_probe())
@@ -238,6 +246,7 @@ int __init ali14xx_init(void)
                return 0;
        }
        printk(KERN_ERR "ali14xx: not found.\n");
+out:
        return -ENODEV;
 }
 
index f2903b6e43c02e5567af8f2c9771cfa72d1671ac..0219ffa64db663fae60e8bc3e994e1d76bd048c7 100644 (file)
@@ -92,7 +92,7 @@ static void tune_dtc2278 (ide_drive_t *drive, u8 pio)
        HWIF(drive)->drives[!drive->select.b.unit].io_32bit = 1;
 }
 
-static int __init probe_dtc2278(void)
+static int __init dtc2278_probe(void)
 {
        unsigned long flags;
        ide_hwif_t *hwif, *mate;
@@ -143,10 +143,18 @@ static int __init probe_dtc2278(void)
        return 0;
 }
 
+int probe_dtc2278 = 0;
+
+module_param_named(probe, probe_dtc2278, bool, 0);
+MODULE_PARM_DESC(probe, "probe for DTC2278xx chipsets");
+
 /* Can be called directly from ide.c. */
 int __init dtc2278_init(void)
 {
-       if (probe_dtc2278()) {
+       if (probe_dtc2278 == 0)
+               return -ENODEV;
+
+       if (dtc2278_probe()) {
                printk(KERN_ERR "dtc2278: ide interfaces already in use!\n");
                return -EBUSY;
        }
index 02d5e20791e3d509af3df0d93d1457514c3309c4..a2832643c522f0cc6805ca497cde92e32fb5fbbc 100644 (file)
@@ -301,12 +301,20 @@ static void tune_ht6560b (ide_drive_t *drive, u8 pio)
 #endif
 }
 
+int probe_ht6560b = 0;
+
+module_param_named(probe, probe_ht6560b, bool, 0);
+MODULE_PARM_DESC(probe, "probe for HT6560B chipset");
+
 /* Can be called directly from ide.c. */
 int __init ht6560b_init(void)
 {
        ide_hwif_t *hwif, *mate;
        int t;
 
+       if (probe_ht6560b == 0)
+               return -ENODEV;
+
        hwif = &ide_hwifs[0];
        mate = &ide_hwifs[1];
 
index ab482c85e41554293e5e95f6b5331fd7b9d45841..2fb8f50f1293e66df0008c9d0d44b4d6f39e43f4 100644 (file)
@@ -488,9 +488,17 @@ static int __init qd_probe(int base)
        return 1;
 }
 
+int probe_qd65xx = 0;
+
+module_param_named(probe, probe_qd65xx, bool, 0);
+MODULE_PARM_DESC(probe, "probe for QD65xx chipsets");
+
 /* Can be called directly from ide.c. */
 int __init qd65xx_init(void)
 {
+       if (probe_qd65xx == 0)
+               return -ENODEV;
+
        if (qd_probe(0x30))
                qd_probe(0xb0);
        if (ide_hwifs[0].chipset != ide_qd65xx &&
index 6e2c58c5f6a2f8ff5e6304f83fd1d3f009c53c2d..ca7974455578005242b4ec79bdcbffae174835c7 100644 (file)
@@ -165,12 +165,21 @@ static int __init umc8672_probe(void)
        return 0;
 }
 
+int probe_umc8672 = 0;
+
+module_param_named(probe, probe_umc8672, bool, 0);
+MODULE_PARM_DESC(probe, "probe for UMC8672 chipset");
+
 /* Can be called directly from ide.c. */
 int __init umc8672_init(void)
 {
-       if (umc8672_probe())
-               return -ENODEV;
-       return 0;
+       if (probe_umc8672 == 0)
+               goto out;
+
+       if (umc8672_probe() == 0)
+               return 0;;
+out:
+       return -ENODEV;;
 }
 
 #ifdef MODULE