If word 53 bit 1 isn't set, the maximum PIO mode is indicated by
the upper 8 bits of word 51, not the lower 8 bits.  Fixes PIO mode
detection on old Compact Flash cards.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Lennert Buytenhek 2007-01-29 13:28:47 +01:00 коммит произвёл Jeff Garzik
Родитель 5dcade90db
Коммит 7a0f1c8a4b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1037,7 +1037,7 @@ static unsigned int ata_id_xfermask(const u16 *id)
* 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