aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 19f9947bd96..183eaf466d4 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1799,12 +1799,18 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
1799 } 1799 }
1800 1800
1801 if (rc == 0) { 1801 if (rc == 0) {
1802 u32 sstatus;
1803
1802 /* After the reset, the device state is PIO 0 and the 1804 /* After the reset, the device state is PIO 0 and the
1803 * controller state is undefined. Record the mode. 1805 * controller state is undefined. Record the mode.
1804 */ 1806 */
1805 for (i = 0; i < ATA_MAX_DEVICES; i++) 1807 for (i = 0; i < ATA_MAX_DEVICES; i++)
1806 ap->device[i].pio_mode = XFER_PIO_0; 1808 ap->device[i].pio_mode = XFER_PIO_0;
1807 1809
1810 /* record current link speed */
1811 if (sata_scr_read(ap, SCR_STATUS, &sstatus) == 0)
1812 ap->sata_spd = (sstatus >> 4) & 0xf;
1813
1808 if (postreset) 1814 if (postreset)
1809 postreset(ap, classes); 1815 postreset(ap, classes);
1810 1816