diff options
| -rw-r--r-- | drivers/ide/ide-probe.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 7203d0e48161..298f398d0fd4 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
| @@ -794,6 +794,13 @@ static int ide_probe_port(ide_hwif_t *hwif) | |||
| 794 | if (!hwif->present) | 794 | if (!hwif->present) |
| 795 | return -ENODEV; | 795 | return -ENODEV; |
| 796 | 796 | ||
| 797 | return 0; | ||
| 798 | } | ||
| 799 | |||
| 800 | static void ide_port_tune_devices(ide_hwif_t *hwif) | ||
| 801 | { | ||
| 802 | int unit; | ||
| 803 | |||
| 797 | for (unit = 0; unit < MAX_DRIVES; unit++) { | 804 | for (unit = 0; unit < MAX_DRIVES; unit++) { |
| 798 | ide_drive_t *drive = &hwif->drives[unit]; | 805 | ide_drive_t *drive = &hwif->drives[unit]; |
| 799 | 806 | ||
| @@ -827,8 +834,6 @@ static int ide_probe_port(ide_hwif_t *hwif) | |||
| 827 | else | 834 | else |
| 828 | drive->no_io_32bit = drive->id->dword_io ? 1 : 0; | 835 | drive->no_io_32bit = drive->id->dword_io ? 1 : 0; |
| 829 | } | 836 | } |
| 830 | |||
| 831 | return 0; | ||
| 832 | } | 837 | } |
| 833 | 838 | ||
| 834 | #if MAX_HWIFS > 1 | 839 | #if MAX_HWIFS > 1 |
| @@ -1309,8 +1314,12 @@ int ide_device_add_all(u8 *idx) | |||
| 1309 | continue; | 1314 | continue; |
| 1310 | } | 1315 | } |
| 1311 | 1316 | ||
| 1312 | if (ide_probe_port(hwif) < 0) | 1317 | if (ide_probe_port(hwif) < 0) { |
| 1313 | ide_hwif_release_regions(hwif); | 1318 | ide_hwif_release_regions(hwif); |
| 1319 | continue; | ||
| 1320 | } | ||
| 1321 | |||
| 1322 | ide_port_tune_devices(hwif); | ||
| 1314 | } | 1323 | } |
| 1315 | 1324 | ||
| 1316 | for (i = 0; i < MAX_HWIFS; i++) { | 1325 | for (i = 0; i < MAX_HWIFS; i++) { |
