Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: make legacy IDE VLB modules check for the "probe" kernel params (v2)
  ide: remove some obsoleted kernel params (v2)
  ide/pci/delkin_cb.c: pci_module_init to pci_register_driver
  scc_pata: bugfix for checking DMA IRQ status
  ide: remove a ton of pointless #undef REALLY_SLOW_IO
  siimage: DRAC4 note
  adjust legacy IDE resource setting (v2)
  ide: fix pmac breakage
  ide-cs: Update device table
  ide: ide_get_best_pio_mode() returns incorrect IORDY setting (take 2)
  piix/slc90e66: more tuneproc() fixing (take 2)
  ide: fix drive side 80c cable check, take 2
  cmd64x: fix PIO mode setup (take 3)
  alim15x3: fix PIO mode setup
  • Loading branch information
Linus Torvalds committed Mar 4, 2007
2 parents 70077f2 + 8491388 commit 20b0f65
Show file tree
Hide file tree
Showing 29 changed files with 306 additions and 224 deletions.
29 changes: 12 additions & 17 deletions Documentation/ide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ Summary of ide driver parameters for kernel command line

"hdx=remap63" : remap the drive: add 63 to all sector numbers
(for DM OnTrack)


"idex=noautotune" : driver will NOT attempt to tune interface speed

"hdx=autotune" : driver will attempt to tune interface speed
to the fastest PIO mode supported,
if possible for this drive only.
Expand Down Expand Up @@ -267,17 +269,6 @@ Summary of ide driver parameters for kernel command line
"idex=base,ctl" : specify both base and ctl

"idex=base,ctl,irq" : specify base, ctl, and irq number

"idex=autotune" : driver will attempt to tune interface speed
to the fastest PIO mode supported,
for all drives on this interface.
Not fully supported by all chipset types,
and quite likely to cause trouble with
older/odd IDE drives.

"idex=noautotune" : driver will NOT attempt to tune interface speed
This is the default for most chipsets,
except the cmd640.

"idex=serialize" : do not overlap operations on idex. Please note
that you will have to specify this option for
Expand All @@ -303,20 +294,24 @@ 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

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
Expand Down
10 changes: 5 additions & 5 deletions drivers/ide/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -1051,15 +1051,15 @@ 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.

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
Expand Down
2 changes: 0 additions & 2 deletions drivers/ide/cris/ide-cris.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* device can't do DMA handshaking for some stupid reason. We don't need to do that.
*/

#undef REALLY_SLOW_IO /* most systems can safely undef this */

#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/timer.h>
Expand Down
2 changes: 0 additions & 2 deletions drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@

#define IDEDISK_VERSION "1.18"

#undef REALLY_SLOW_IO /* most systems can safely undef this */

//#define DEBUG

#include <linux/module.h>
Expand Down
2 changes: 2 additions & 0 deletions drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,8 @@ u8 eighty_ninty_three (ide_drive_t *drive)
if(!(drive->id->hw_config & 0x4000))
return 0;
#endif /* CONFIG_IDEDMA_IVB */
if (!(drive->id->hw_config & 0x2000))
return 0;
return 1;
}

Expand Down
18 changes: 6 additions & 12 deletions drivers/ide/ide-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,16 +345,16 @@ static int ide_scan_pio_blacklist (char *model)

/**
* ide_get_best_pio_mode - get PIO mode from drive
* @driver: drive to consider
* @drive: drive to consider
* @mode_wanted: preferred mode
* @max_mode: highest allowed
* @d: pio data
* @max_mode: highest allowed mode
* @d: PIO data
*
* This routine returns the recommended PIO settings for a given drive,
* based on the drive->id information and the ide_pio_blacklist[].
* This is used by most chipset support modules when "auto-tuning".
*
* Drive PIO mode auto selection
* Drive PIO mode is auto-selected if 255 is passed as mode_wanted.
* This is used by most chipset support modules when "auto-tuning".
*/

u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d)
Expand All @@ -367,6 +367,7 @@ u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_p

if (mode_wanted != 255) {
pio_mode = mode_wanted;
use_iordy = (pio_mode > 2);
} else if (!drive->id) {
pio_mode = 0;
} else if ((pio_mode = ide_scan_pio_blacklist(id->model)) != -1) {
Expand Down Expand Up @@ -396,19 +397,12 @@ u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_p
}
}

#if 0
if (drive->id->major_rev_num & 0x0004) printk("ATA-2 ");
#endif

/*
* Conservative "downgrade" for all pre-ATA2 drives
*/
if (pio_mode && pio_mode < 4) {
pio_mode--;
overridden = 1;
#if 0
use_iordy = (pio_mode > 2);
#endif
if (cycle_time && cycle_time < ide_pio_timings[pio_mode].cycle_time)
cycle_time = 0; /* use standard timing */
}
Expand Down
2 changes: 0 additions & 2 deletions drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
* valid after probe time even with noprobe
*/

#undef REALLY_SLOW_IO /* most systems can safely undef this */

#include <linux/module.h>
#include <linux/types.h>
#include <linux/string.h>
Expand Down
39 changes: 15 additions & 24 deletions drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@
#define REVISION "Revision: 7.00alpha2"
#define VERSION "Id: ide.c 7.00a2 20020906"

#undef REALLY_SLOW_IO /* most systems can safely undef this */

#define _IDE_C /* Tell ide.h it's really us */

#include <linux/module.h>
Expand Down Expand Up @@ -1486,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

Expand Down Expand Up @@ -1580,7 +1578,7 @@ static int __init ide_setup(char *s)
*/
if (s[0] == 'h' && s[1] == 'd' && s[2] >= 'a' && s[2] <= max_drive) {
const char *hd_words[] = {
"none", "noprobe", "nowerr", "cdrom", "serialize",
"none", "noprobe", "nowerr", "cdrom", "minus5",
"autotune", "noautotune", "minus8", "swapdata", "bswap",
"noflush", "remap", "remap63", "scsi", NULL };
unit = s[2] - 'a';
Expand Down Expand Up @@ -1608,9 +1606,6 @@ static int __init ide_setup(char *s)
drive->ready_stat = 0;
hwif->noprobe = 0;
goto done;
case -5: /* "serialize" */
printk(" -- USE \"ide%d=serialize\" INSTEAD", hw);
goto do_serialize;
case -6: /* "autotune" */
drive->autotune = IDE_TUNE_AUTO;
goto obsolete_option;
Expand Down Expand Up @@ -1671,7 +1666,7 @@ static int __init ide_setup(char *s)
* (-8, -9, -10) are reserved to ease the hardcoding.
*/
static const char *ide_words[] = {
"noprobe", "serialize", "autotune", "noautotune",
"noprobe", "serialize", "minus3", "minus4",
"reset", "dma", "ata66", "minus8", "minus9",
"minus10", "four", "qd65xx", "ht6560b", "cmd640_vlb",
"dtc2278", "umc8672", "ali14xx", NULL };
Expand Down Expand Up @@ -1742,12 +1737,17 @@ static int __init ide_setup(char *s)
hwif->chipset = mate->chipset = ide_4drives;
mate->irq = hwif->irq;
memcpy(mate->io_ports, hwif->io_ports, sizeof(hwif->io_ports));
goto do_serialize;
hwif->mate = mate;
mate->mate = hwif;
hwif->serialized = mate->serialized = 1;
goto obsolete_option;
}
#endif /* CONFIG_BLK_DEV_4DRIVES */
case -10: /* minus10 */
case -9: /* minus9 */
case -8: /* minus8 */
case -4:
case -3:
goto bad_option;
case -7: /* ata66 */
#ifdef CONFIG_BLK_DEV_IDEPCI
Expand All @@ -1762,16 +1762,7 @@ static int __init ide_setup(char *s)
case -5: /* "reset" */
hwif->reset = 1;
goto obsolete_option;
case -4: /* "noautotune" */
hwif->drives[0].autotune = IDE_TUNE_NOAUTO;
hwif->drives[1].autotune = IDE_TUNE_NOAUTO;
goto obsolete_option;
case -3: /* "autotune" */
hwif->drives[0].autotune = IDE_TUNE_AUTO;
hwif->drives[1].autotune = IDE_TUNE_AUTO;
goto obsolete_option;
case -2: /* "serialize" */
do_serialize:
hwif->mate = &ide_hwifs[hw^1];
hwif->mate->mate = hwif;
hwif->serialized = hwif->mate->serialized = 1;
Expand Down Expand Up @@ -1840,8 +1831,8 @@ static void __init probe_for_hwifs (void)
#endif /* CONFIG_BLK_DEV_CMD640 */
#ifdef CONFIG_BLK_DEV_IDE_PMAC
{
extern void pmac_ide_probe(void);
pmac_ide_probe();
extern int pmac_ide_probe(void);
(void)pmac_ide_probe();
}
#endif /* CONFIG_BLK_DEV_IDE_PMAC */
#ifdef CONFIG_BLK_DEV_GAYLE
Expand Down
11 changes: 9 additions & 2 deletions drivers/ide/legacy/ali14xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
* mode 4 for a while now with no trouble.) -Derek
*/

#undef REALLY_SLOW_IO /* most systems can safely undef this */

#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
Expand Down Expand Up @@ -230,16 +228,25 @@ 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())
return -ENODEV;
return 0;
}
printk(KERN_ERR "ali14xx: not found.\n");
out:
return -ENODEV;
}

Expand Down
14 changes: 10 additions & 4 deletions drivers/ide/legacy/dtc2278.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (C) 1996 Linus Torvalds & author (see below)
*/

#undef REALLY_SLOW_IO /* most systems can safely undef this */

#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
Expand Down Expand Up @@ -94,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;
Expand Down Expand Up @@ -145,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;
}
Expand Down
Loading

0 comments on commit 20b0f65

Please sign in to comment.