* [PATCH] trm290: do hook dma_host_{on,off} methods
@ 2007-12-26 19:47 Sergei Shtylyov
2007-12-26 19:50 ` Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2007-12-26 19:47 UTC (permalink / raw)
To: bzolnier; +Cc: linux-ide
Those two methods were reading/writing TRM-290 config. register; luckily (?)
the writes only tried to change undefined bits. While fixing this, also
- get rid of the 'ide_' prefixes in several functions for which the prefix has
been ectomized before;
- align the code initializing methods in init_hwif_trm290()...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
drivers/ide/pci/trm290.c | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
Index: linux-2.6/drivers/ide/pci/trm290.c
===================================================================
--- linux-2.6.orig/drivers/ide/pci/trm290.c
+++ linux-2.6/drivers/ide/pci/trm290.c
@@ -177,7 +177,7 @@ static void trm290_selectproc (ide_drive
trm290_prepare_drive(drive, drive->using_dma);
}
-static void trm290_ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
+static void trm290_dma_exec_cmd(ide_drive_t *drive, u8 command)
{
BUG_ON(HWGROUP(drive)->handler != NULL); /* paranoia check */
ide_set_handler(drive, &ide_dma_intr, WAIT_CMD, NULL);
@@ -185,7 +185,7 @@ static void trm290_ide_dma_exec_cmd(ide_
outb(command, IDE_COMMAND_REG);
}
-static int trm290_ide_dma_setup(ide_drive_t *drive)
+static int trm290_dma_setup(ide_drive_t *drive)
{
ide_hwif_t *hwif = drive->hwif;
struct request *rq = hwif->hwgroup->rq;
@@ -215,7 +215,7 @@ static int trm290_ide_dma_setup(ide_driv
return 0;
}
-static void trm290_ide_dma_start(ide_drive_t *drive)
+static void trm290_dma_start(ide_drive_t *drive)
{
}
@@ -240,6 +240,14 @@ static int trm290_ide_dma_test_irq (ide_
return (status == 0x00ff);
}
+void trm290_dma_host_on (ide_drive_t *drive)
+{
+}
+
+void trm290_dma_host_off(ide_drive_t *drive)
+{
+}
+
static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
{
unsigned int cfgbase = 0;
@@ -280,11 +288,13 @@ static void __devinit init_hwif_trm290(i
ide_setup_dma(hwif, (hwif->config_data + 4) ^ (hwif->channel ? 0x0080 : 0x0000), 3);
- hwif->dma_setup = &trm290_ide_dma_setup;
- hwif->dma_exec_cmd = &trm290_ide_dma_exec_cmd;
- hwif->dma_start = &trm290_ide_dma_start;
- hwif->ide_dma_end = &trm290_ide_dma_end;
- hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq;
+ hwif->dma_host_off = &trm290_dma_host_off;
+ hwif->dma_host_on = &trm290_dma_host_on;
+ hwif->dma_setup = &trm290_dma_setup;
+ hwif->dma_exec_cmd = &trm290_dma_exec_cmd;
+ hwif->dma_start = &trm290_dma_start;
+ hwif->ide_dma_end = &trm290_ide_dma_end;
+ hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq;
hwif->selectproc = &trm290_selectproc;
#if 1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] trm290: do hook dma_host_{on,off} methods
2007-12-26 19:47 [PATCH] trm290: do hook dma_host_{on,off} methods Sergei Shtylyov
@ 2007-12-26 19:50 ` Sergei Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2007-12-26 19:50 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: bzolnier, linux-ide
Hello, I wrote:
> Those two methods were reading/writing TRM-290 config. register; luckily (?)
> the writes only tried to change undefined bits.
Actually, the writes were falling at the PRD address register. Well,
nobody noticed anyway... :-)
MBR, Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-26 19:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-26 19:47 [PATCH] trm290: do hook dma_host_{on,off} methods Sergei Shtylyov
2007-12-26 19:50 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).