Skip to content

Commit

Permalink
IDE: Unregister and disable devices if initialization fails.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ian Campbell authored and Bartlomiej Zolnierkiewicz committed Feb 2, 2009
1 parent 9a100f4 commit 51d6ac7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 51d6ac7

Please sign in to comment.