diff options
| -rw-r--r-- | drivers/scsi/libata-core.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 6420062f2c1e..f37179623efa 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
| @@ -2369,12 +2369,16 @@ void ata_std_probeinit(struct ata_port *ap) | |||
| 2369 | if ((ap->flags & ATA_FLAG_SATA) && ap->ops->scr_read) { | 2369 | if ((ap->flags & ATA_FLAG_SATA) && ap->ops->scr_read) { |
| 2370 | u32 spd; | 2370 | u32 spd; |
| 2371 | 2371 | ||
| 2372 | /* set cable type and resume link */ | ||
| 2373 | ap->cbl = ATA_CBL_SATA; | ||
| 2372 | sata_phy_resume(ap); | 2374 | sata_phy_resume(ap); |
| 2373 | 2375 | ||
| 2376 | /* init sata_spd_limit to the current value */ | ||
| 2374 | spd = (scr_read(ap, SCR_CONTROL) & 0xf0) >> 4; | 2377 | spd = (scr_read(ap, SCR_CONTROL) & 0xf0) >> 4; |
| 2375 | if (spd) | 2378 | if (spd) |
| 2376 | ap->sata_spd_limit &= (1 << spd) - 1; | 2379 | ap->sata_spd_limit &= (1 << spd) - 1; |
| 2377 | 2380 | ||
| 2381 | /* wait for device */ | ||
| 2378 | if (sata_dev_present(ap)) | 2382 | if (sata_dev_present(ap)) |
| 2379 | ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT); | 2383 | ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT); |
| 2380 | } | 2384 | } |
| @@ -2531,10 +2535,6 @@ void ata_std_postreset(struct ata_port *ap, unsigned int *classes) | |||
| 2531 | { | 2535 | { |
| 2532 | DPRINTK("ENTER\n"); | 2536 | DPRINTK("ENTER\n"); |
| 2533 | 2537 | ||
| 2534 | /* set cable type if it isn't already set */ | ||
| 2535 | if (ap->cbl == ATA_CBL_NONE && ap->flags & ATA_FLAG_SATA) | ||
| 2536 | ap->cbl = ATA_CBL_SATA; | ||
| 2537 | |||
| 2538 | /* print link status */ | 2538 | /* print link status */ |
| 2539 | if (ap->cbl == ATA_CBL_SATA) | 2539 | if (ap->cbl == ATA_CBL_SATA) |
| 2540 | sata_print_link_status(ap); | 2540 | sata_print_link_status(ap); |
| @@ -2584,7 +2584,7 @@ int ata_std_probe_reset(struct ata_port *ap, unsigned int *classes) | |||
| 2584 | ata_reset_fn_t hardreset; | 2584 | ata_reset_fn_t hardreset; |
| 2585 | 2585 | ||
| 2586 | hardreset = NULL; | 2586 | hardreset = NULL; |
| 2587 | if (ap->flags & ATA_FLAG_SATA && ap->ops->scr_read) | 2587 | if (ap->cbl == ATA_CBL_SATA && ap->ops->scr_read) |
| 2588 | hardreset = sata_std_hardreset; | 2588 | hardreset = sata_std_hardreset; |
| 2589 | 2589 | ||
| 2590 | return ata_drive_probe_reset(ap, ata_std_probeinit, | 2590 | return ata_drive_probe_reset(ap, ata_std_probeinit, |
