From e805df95951a4f7b29573c542e595dda96380b8b Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Sat, 26 Apr 2008 22:25:17 +0200 Subject: [PATCH] --- yaml --- r: 93632 b: refs/heads/master c: eb716beb0aeb4b14489a64c51c63e6a4be2e13a0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/ide/ide-probe.c | 37 ++++++++++++++++------------------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/[refs] b/[refs] index 653360216e02..95c2d6f038c2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d703b79e56eb103b72ad1bceebe8ef4e8635fb1c +refs/heads/master: eb716beb0aeb4b14489a64c51c63e6a4be2e13a0 diff --git a/trunk/drivers/ide/ide-probe.c b/trunk/drivers/ide/ide-probe.c index ba16ade15c8c..d37a2680ceed 100644 --- a/trunk/drivers/ide/ide-probe.c +++ b/trunk/drivers/ide/ide-probe.c @@ -1537,18 +1537,15 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d) continue; } - if (ide_probe_port(hwif) < 0) { - ide_hwif_release_regions(hwif); - continue; - } - - hwif->present = 1; + if (ide_probe_port(hwif) == 0) + hwif->present = 1; if (hwif->chipset != ide_4drives || !hwif->mate || !hwif->mate->present) ide_register_port(hwif); - ide_port_tune_devices(hwif); + if (hwif->present) + ide_port_tune_devices(hwif); } for (i = 0; i < MAX_HWIFS; i++) { @@ -1557,9 +1554,6 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d) hwif = &ide_hwifs[idx[i]]; - if (!hwif->present) - continue; - if (hwif_init(hwif) == 0) { printk(KERN_INFO "%s: failed to initialize IDE " "interface\n", hwif->name); @@ -1568,10 +1562,13 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d) continue; } - ide_port_setup_devices(hwif); + if (hwif->present) + ide_port_setup_devices(hwif); ide_acpi_init(hwif); - ide_acpi_port_init_devices(hwif); + + if (hwif->present) + ide_acpi_port_init_devices(hwif); } for (i = 0; i < MAX_HWIFS; i++) { @@ -1580,11 +1577,11 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d) hwif = &ide_hwifs[idx[i]]; - if (hwif->present) { - if (hwif->chipset == ide_unknown) - hwif->chipset = ide_generic; + if (hwif->chipset == ide_unknown) + hwif->chipset = ide_generic; + + if (hwif->present) hwif_register_devices(hwif); - } } for (i = 0; i < MAX_HWIFS; i++) { @@ -1593,11 +1590,11 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d) hwif = &ide_hwifs[idx[i]]; - if (hwif->present) { - ide_sysfs_register_port(hwif); - ide_proc_register_port(hwif); + ide_sysfs_register_port(hwif); + ide_proc_register_port(hwif); + + if (hwif->present) ide_proc_port_register_devices(hwif); - } } return rc;