diff options
-rw-r--r-- | drivers/ata/libata-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index a388a8df0043..cf707029352e 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1037,7 +1037,7 @@ static unsigned int ata_id_xfermask(const u16 *id) | |||
1037 | * the PIO timing number for the maximum. Turn it into | 1037 | * the PIO timing number for the maximum. Turn it into |
1038 | * a mask. | 1038 | * a mask. |
1039 | */ | 1039 | */ |
1040 | u8 mode = id[ATA_ID_OLD_PIO_MODES] & 0xFF; | 1040 | u8 mode = (id[ATA_ID_OLD_PIO_MODES] >> 8) & 0xFF; |
1041 | if (mode < 5) /* Valid PIO range */ | 1041 | if (mode < 5) /* Valid PIO range */ |
1042 | pio_mask = (2 << mode) - 1; | 1042 | pio_mask = (2 << mode) - 1; |
1043 | else | 1043 | else |