Skip to content

Commit 1af5f7a

Browse files
rdoeffingerdamien-lemoal
authored andcommitted
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: Reimar Döffinger <[email protected]> Signed-off-by: Damien Le Moal <[email protected]>
1 parent 492402c commit 1af5f7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ata/pata_radisys.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ static unsigned int radisys_qc_issue(struct ata_queued_cmd *qc)
172172

173173
if (adev != ap->private_data) {
174174
/* UDMA timing is not shared */
175-
if (adev->dma_mode < XFER_UDMA_0) {
176-
if (adev->dma_mode)
175+
if (adev->dma_mode < XFER_UDMA_0 || !ata_dma_enabled(adev)) {
176+
if (ata_dma_enabled(adev))
177177
radisys_set_dmamode(ap, adev);
178178
else if (adev->pio_mode)
179179
radisys_set_piomode(ap, adev);

0 commit comments

Comments
 (0)