Skip to contentSkip to conversation

pata_cs5520: use ATA_DMA_* constants

PATCH Applied Sergei Shtylyov 3 participants 3 messages Dec 4, 2009 – Dec 17, 2009 libata

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 pata_cs5520: use ATA_DMA_* constants

Use ATA_DMA_* constants instead of the bare numbers for the BMIDE registers.

---
The patch is against the recent Linus' tree.

 drivers/ata/pata_cs5520.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/ata/pata_cs5520.c +3 -3
Index: linux-2.6/drivers/ata/pata_cs5520.c
===================================================================
@@ -99,9 +99,9 @@ static void cs5520_set_timings(struct at
 static void cs5520_enable_dma(struct ata_port *ap, struct ata_device *adev)
 {
 	/* Set the DMA enable/disable flag */
-	u8 reg = ioread8(ap->ioaddr.bmdma_addr + 0x02);
-	reg |= 1<<(adev->devno + 5);
-	iowrite8(reg, ap->ioaddr.bmdma_addr + 0x02);
+	u8 reg = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
+	reg |= 1 << (adev->devno + 5);
+	iowrite8(reg, ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
 }
 
 /**
#1 lore raw
Quoted 3 lines · On Sat, 5 Dec 2009 00:39:00 +0400 Sergei Shtylyov <[email protected]>…

Use ATA_DMA_* constants instead of the bare numbers for the BMIDE registers.

If we are dropping out the virtual DMA support as Bartlomiej proposed that bit can go completely.

Alan

#2 lore raw
In reply to Sergei Shtylyov
Quoted 15 lines · Sergei Shtylyov

Use ATA_DMA_* constants instead of the bare numbers for the BMIDE registers.

---
The patch is against the recent Linus' tree.

  drivers/ata/pata_cs5520.c |    6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/ata/pata_cs5520.c
===================================================================

drivers/ata/pata_cs5520.c static void cs5520_set_timings(struct at · line 105

Quoted 10 lines
drivers/ata/pata_cs5520.c +3 -3
@@ -99,9 +99,9 @@ static void cs5520_set_timings(struct at
  static void cs5520_enable_dma(struct ata_port *ap, struct ata_device *adev)
  {
  	/* Set the DMA enable/disable flag */
-	u8 reg = ioread8(ap->ioaddr.bmdma_addr + 0x02);
-	reg |= 1<<(adev->devno + 5);
-	iowrite8(reg, ap->ioaddr.bmdma_addr + 0x02);
+	u8 reg = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
+	reg |= 1<<  (adev->devno + 5);
+	iowrite8(reg, ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
  }

skipped -- Bart's patch (940a68de56c1952c29d9f3c1a769a82b1bdd2b67) superceded this