Skip to contentSkip to conversation

trm290: cannot call ide_setup_dma()

PATCH Applied Sergei Shtylyov 2 participants 2 messages Dec 30, 2007 – Jan 1, 2008 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 trm290: cannot call ide_setup_dma()

The TRM-290 chip is *not* SFF-8038i compatible and therefore can *not* call ide_setup_dma() -- fix this and also cleanup the code a bit...

 drivers/ide/ide-dma.c    |   13 ++++-----
 drivers/ide/pci/trm290.c |   62 ++++++++++++++++++++++++++++-------------------
 2 files changed, 43 insertions(+), 32 deletions(-)
drivers/ide/ide-dma.c +6 -7
Index: linux-2.6/drivers/ide/ide-dma.c
===================================================================
@@ -935,6 +935,8 @@ static int ide_dma_iobase(ide_hwif_t *hw
 
 void ide_setup_dma(ide_hwif_t *hwif, unsigned long base, unsigned num_ports)
 {
+	u8 dma_stat;
+
 	if (ide_dma_iobase(hwif, base, num_ports))
 		return;
 
@@ -973,13 +975,10 @@ void ide_setup_dma(ide_hwif_t *hwif, uns
 	if (!hwif->dma_lost_irq)
 		hwif->dma_lost_irq = &ide_dma_lost_irq;
 
-	if (hwif->chipset != ide_trm290) {
-		u8 dma_stat = hwif->INB(hwif->dma_status);
-		printk(", BIOS settings: %s:%s, %s:%s",
-		       hwif->drives[0].name, (dma_stat & 0x20) ? "DMA" : "pio",
-		       hwif->drives[1].name, (dma_stat & 0x40) ? "DMA" : "pio");
-	}
-	printk("\n");
+	dma_stat = hwif->INB(hwif->dma_status);
+	printk(KERN_CONT ", BIOS settings: %s:%s, %s:%s\n",
+	       hwif->drives[0].name, (dma_stat & 0x20) ? "DMA" : "PIO",
+	       hwif->drives[1].name, (dma_stat & 0x40) ? "DMA" : "PIO");
 }
 
 EXPORT_SYMBOL_GPL(ide_setup_dma);
drivers/ide/pci/trm290.c +37 -25

111 lines not on this page · raw message