提交 1af5f7af 编写于 作者: R Reimar Döffinger 提交者: Damien Le Moal

pata_radisys: fix checking of DMA state

Checking if DMA is enabled should be done via the
ata_dma_enabled helper function, since the init state
0xff indicates disabled.
Change based on code review, not tested due to lack of hardware.
Signed-off-by: NReimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com>
上级 492402ce
......@@ -172,8 +172,8 @@ static unsigned int radisys_qc_issue(struct ata_queued_cmd *qc)
if (adev != ap->private_data) {
/* UDMA timing is not shared */
if (adev->dma_mode < XFER_UDMA_0) {
if (adev->dma_mode)
if (adev->dma_mode < XFER_UDMA_0 || !ata_dma_enabled(adev)) {
if (ata_dma_enabled(adev))
radisys_set_dmamode(ap, adev);
else if (adev->pio_mode)
radisys_set_piomode(ap, adev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册