diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index a388a8d..cf70702 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1037,7 +1037,7 @@ static unsigned int ata_id_xfermask(cons
* the PIO timing number for the maximum. Turn it into
* a mask.
*/
- u8 mode = id[ATA_ID_OLD_PIO_MODES] & 0xFF;
+ u8 mode = (id[ATA_ID_OLD_PIO_MODES] >> 8) & 0xFF;
if (mode < 5) /* Valid PIO range */
pio_mask = (2 << mode) - 1;
else
There are 55 per cent chances that this is a hardware problem and
45 % that this is a software bug.
9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 2207
Error 6 occurred at disk power-on lifetime: 2202 hours (91 days + 18 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 bc 0c 02 e0 Error: UNC at LBA = 0x00020cbc = 134332
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
c8 00 00 2f 0c 02 e0 00 00:01:07.193 READ DMA
ec 03 46 00 00 00 a0 02 00:01:07.192 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 00 00:01:07.180 SET FEATURES [Set transfer mode]
ec 00 00 bc 0c 02 a0 02 00:01:05.100 IDENTIFY DEVICE
c8 00 00 2f 0c 02 e0 00 00:01:05.096 READ DMA