|
@@ -2325,24 +2325,28 @@ int ata_dev_configure(struct ata_device *dev)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /* check and mark DevSlp capability */
|
|
|
- if (ata_id_has_devslp(dev->id))
|
|
|
- dev->flags |= ATA_DFLAG_DEVSLP;
|
|
|
-
|
|
|
- /* Obtain SATA Settings page from Identify Device Data Log,
|
|
|
- * which contains DevSlp timing variables etc.
|
|
|
- * Exclude old devices with ata_id_has_ncq()
|
|
|
+ /* Check and mark DevSlp capability. Get DevSlp timing variables
|
|
|
+ * from SATA Settings page of Identify Device Data Log.
|
|
|
*/
|
|
|
- if (ata_id_has_ncq(dev->id)) {
|
|
|
+ if (ata_id_has_devslp(dev->id)) {
|
|
|
+ u8 sata_setting[ATA_SECT_SIZE];
|
|
|
+ int i, j;
|
|
|
+
|
|
|
+ dev->flags |= ATA_DFLAG_DEVSLP;
|
|
|
err_mask = ata_read_log_page(dev,
|
|
|
ATA_LOG_SATA_ID_DEV_DATA,
|
|
|
ATA_LOG_SATA_SETTINGS,
|
|
|
- dev->sata_settings,
|
|
|
+ sata_setting,
|
|
|
1);
|
|
|
if (err_mask)
|
|
|
ata_dev_dbg(dev,
|
|
|
"failed to get Identify Device Data, Emask 0x%x\n",
|
|
|
err_mask);
|
|
|
+ else
|
|
|
+ for (i = 0; i < ATA_LOG_DEVSLP_SIZE; i++) {
|
|
|
+ j = ATA_LOG_DEVSLP_OFFSET + i;
|
|
|
+ dev->devslp_timing[i] = sata_setting[j];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
dev->cdb_len = 16;
|