summaryrefslogtreecommitdiff
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
authorIan Campbell <Ian.Campbell@citrix.com>2009-02-02 20:12:22 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-02-02 20:12:22 +0100
commit51d6ac7011cc354eade4f1282857947930a905aa (patch)
treec74c7ff2c3dfb2ca28498326b7ade3ad3a35abfc /drivers/ide/ide-probe.c
parent9a100f4b78c4c59fdd1cc38c5fa6a1ec66f23d9a (diff)
IDE: Unregister and disable devices if initialization fails.
On reboot the loop in device_shutdown gets confused by these partially initialized devices and goes into an infinite loop. Therefore unregister and disable these devices. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> [bart: remove leftover hwif->present clearing + update patch description] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 6bab2ac1f5b9..ce0818a993f6 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1549,7 +1549,8 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d,
if (hwif_init(hwif) == 0) {
printk(KERN_INFO "%s: failed to initialize IDE "
"interface\n", hwif->name);
- hwif->present = 0;
+ device_unregister(&hwif->gendev);
+ ide_disable_port(hwif);
continue;
}