Commit 51d6ac70 authored by Ian Campbell's avatar Ian Campbell Committed by Bartlomiej Zolnierkiewicz

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: default avatarIan Campbell <ian.campbell@citrix.com>
[bart: remove leftover hwif->present clearing + update patch description]
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 9a100f4b
...@@ -1549,7 +1549,8 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d, ...@@ -1549,7 +1549,8 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d,
if (hwif_init(hwif) == 0) { if (hwif_init(hwif) == 0) {
printk(KERN_INFO "%s: failed to initialize IDE " printk(KERN_INFO "%s: failed to initialize IDE "
"interface\n", hwif->name); "interface\n", hwif->name);
hwif->present = 0; device_unregister(&hwif->gendev);
ide_disable_port(hwif);
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment