diff options
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index f371b0de314f..fdd04bcd5568 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1378,6 +1378,9 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d, | |||
1378 | 1378 | ||
1379 | ide_init_port(hwif, i & 1, d); | 1379 | ide_init_port(hwif, i & 1, d); |
1380 | ide_port_cable_detect(hwif); | 1380 | ide_port_cable_detect(hwif); |
1381 | |||
1382 | hwif->port_flags |= IDE_PFLAG_PROBING; | ||
1383 | |||
1381 | ide_port_init_devices(hwif); | 1384 | ide_port_init_devices(hwif); |
1382 | } | 1385 | } |
1383 | 1386 | ||
@@ -1388,6 +1391,8 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d, | |||
1388 | if (ide_probe_port(hwif) == 0) | 1391 | if (ide_probe_port(hwif) == 0) |
1389 | hwif->present = 1; | 1392 | hwif->present = 1; |
1390 | 1393 | ||
1394 | hwif->port_flags &= ~IDE_PFLAG_PROBING; | ||
1395 | |||
1391 | if ((hwif->host_flags & IDE_HFLAG_4DRIVES) == 0 || | 1396 | if ((hwif->host_flags & IDE_HFLAG_4DRIVES) == 0 || |
1392 | hwif->mate == NULL || hwif->mate->present == 0) { | 1397 | hwif->mate == NULL || hwif->mate->present == 0) { |
1393 | if (ide_register_port(hwif)) { | 1398 | if (ide_register_port(hwif)) { |
@@ -1569,11 +1574,20 @@ EXPORT_SYMBOL_GPL(ide_host_remove); | |||
1569 | 1574 | ||
1570 | void ide_port_scan(ide_hwif_t *hwif) | 1575 | void ide_port_scan(ide_hwif_t *hwif) |
1571 | { | 1576 | { |
1577 | int rc; | ||
1578 | |||
1572 | ide_port_apply_params(hwif); | 1579 | ide_port_apply_params(hwif); |
1573 | ide_port_cable_detect(hwif); | 1580 | ide_port_cable_detect(hwif); |
1581 | |||
1582 | hwif->port_flags |= IDE_PFLAG_PROBING; | ||
1583 | |||
1574 | ide_port_init_devices(hwif); | 1584 | ide_port_init_devices(hwif); |
1575 | 1585 | ||
1576 | if (ide_probe_port(hwif) < 0) | 1586 | rc = ide_probe_port(hwif); |
1587 | |||
1588 | hwif->port_flags &= ~IDE_PFLAG_PROBING; | ||
1589 | |||
1590 | if (rc < 0) | ||
1577 | return; | 1591 | return; |
1578 | 1592 | ||
1579 | hwif->present = 1; | 1593 | hwif->present = 1; |