aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-probe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 47a114927c31..9db8978ad394 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1366,7 +1366,10 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
1366 /* call chipset specific routine for each enabled port */ 1366 /* call chipset specific routine for each enabled port */
1367 if (d->init_hwif) 1367 if (d->init_hwif)
1368 d->init_hwif(hwif); 1368 d->init_hwif(hwif);
1369}
1369 1370
1371static void ide_port_cable_detect(ide_hwif_t *hwif)
1372{
1370 if (hwif->cable_detect && (hwif->ultra_mask & 0x78)) { 1373 if (hwif->cable_detect && (hwif->ultra_mask & 0x78)) {
1371 if (hwif->cbl != ATA_CBL_PATA40_SHORT) 1374 if (hwif->cbl != ATA_CBL_PATA40_SHORT)
1372 hwif->cbl = hwif->cable_detect(hwif); 1375 hwif->cbl = hwif->cable_detect(hwif);
@@ -1394,6 +1397,7 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
1394 mate = (i & 1) ? NULL : hwif; 1397 mate = (i & 1) ? NULL : hwif;
1395 1398
1396 ide_init_port(hwif, i & 1, d); 1399 ide_init_port(hwif, i & 1, d);
1400 ide_port_cable_detect(hwif);
1397 ide_port_init_devices(hwif); 1401 ide_port_init_devices(hwif);
1398 } 1402 }
1399 1403