diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-27 15:38:23 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-27 15:38:23 +0200 |
commit | 9fd91d959f1a19d1bfa46d97cbbbb55641ce26a6 (patch) | |
tree | 9938cfef8cce9dd87f48fe40b6bca51a1c737fc5 /drivers/ide/ide-probe.c | |
parent | 9c391bae6a65bd39962877ad7dc000b600757bbe (diff) | |
download | lwn-9fd91d959f1a19d1bfa46d97cbbbb55641ce26a6.tar.gz lwn-9fd91d959f1a19d1bfa46d97cbbbb55641ce26a6.zip |
ide: add "ignore_cable" parameter (take 2)
Add "ignore_cable" parameter:
* "ide_core.ignore_cable=[interface_number]" boot option if IDE is built-in
(i.e. "ide_core.ignore_cable=1" to force ignoring cable for "ide1")
* "ignore_cable=[interface_number]" module parameter (for ide_core module)
if IDE is compiled as module
v2:
* Add ide_port_apply_params() helper
- use it in ide_device_add_all() and ide_scan_port().
* Make it possible to later disable ignoring cable detection by passing
"[interface_number]:0" to /sys/module/ide_core/parameters/ignore_cable
(however sysfs interface is not enabled yet since it needs some other
IDE changes to make it work reliable).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index a4b65b321f51..4a33100a2314 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -1518,13 +1518,20 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d) int i, rc = 0; for (i = 0; i < MAX_HWIFS; i++) { - if (d == NULL || idx[i] == 0xff) { + if (idx[i] == 0xff) { mate = NULL; continue; } hwif = &ide_hwifs[idx[i]]; + ide_port_apply_params(hwif); + + if (d == NULL) { + mate = NULL; + continue; + } + if (d->chipset != ide_etrax100 && (i & 1) && mate) { hwif->mate = mate; mate->mate = hwif; @@ -1621,6 +1628,7 @@ EXPORT_SYMBOL_GPL(ide_device_add); void ide_port_scan(ide_hwif_t *hwif) { + ide_port_apply_params(hwif); ide_port_cable_detect(hwif); ide_port_init_devices(hwif); |