提交 fb21f0d0 编写于 作者: T Tejun Heo 提交者: Jeff Garzik

[PATCH] libata: check Word 88 validity in ata_id_xfer_mask()

Check bit 2 of Word 53 for Word 88 validity before using Word 88 to
determine UDMA mask.  Note that the original xfer mask implementation
using ata_get_mode_mask() didn't consider bit 2 of Word 53.  This
patch introduces different (correct) behavior.
Signed-off-by: NTejun Heo <htejun@gmail.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 2044470c
......@@ -819,7 +819,10 @@ static unsigned int ata_id_xfermask(const u16 *id)
}
mwdma_mask = id[ATA_ID_MWDMA_MODES] & 0x07;
udma_mask = id[ATA_ID_UDMA_MODES] & 0xff;
udma_mask = 0;
if (id[ATA_ID_FIELD_VALID] & (1 << 2))
udma_mask = id[ATA_ID_UDMA_MODES] & 0xff;
return ata_pack_xfermask(pio_mask, mwdma_mask, udma_mask);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册