]> Git Repo - linux.git/commitdiff
pata_radisys: fix checking of DMA state
authorReimar Döffinger <[email protected]>
Tue, 12 Oct 2021 06:27:49 +0000 (08:27 +0200)
committerDamien Le Moal <[email protected]>
Tue, 12 Oct 2021 08:47:02 +0000 (17:47 +0900)
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]>
drivers/ata/pata_radisys.c

index 8fde4a86401b9c62474de9baf1154b498b11397d..3aca8fe3fdb67bbb6697b1c342d55c0baa7bb261 100644 (file)
@@ -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);
This page took 0.056828 seconds and 4 git commands to generate.