aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libata-core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index ba1eb8b38e00..bb604dfbdef6 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1570,11 +1570,13 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
1570 1570
1571 /* 1571 /*
1572 * Find the mode. 1572 * Find the mode.
1573 */ 1573 */
1574 1574
1575 if (!(s = ata_timing_find_mode(speed))) 1575 if (!(s = ata_timing_find_mode(speed)))
1576 return -EINVAL; 1576 return -EINVAL;
1577 1577
1578 memcpy(t, s, sizeof(*s));
1579
1578 /* 1580 /*
1579 * If the drive is an EIDE drive, it can tell us it needs extended 1581 * If the drive is an EIDE drive, it can tell us it needs extended
1580 * PIO/MW_DMA cycle timing. 1582 * PIO/MW_DMA cycle timing.
@@ -1595,7 +1597,7 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
1595 * Convert the timing to bus clock counts. 1597 * Convert the timing to bus clock counts.
1596 */ 1598 */
1597 1599
1598 ata_timing_quantize(s, t, T, UT); 1600 ata_timing_quantize(t, t, T, UT);
1599 1601
1600 /* 1602 /*
1601 * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T 1603 * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T