All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/8] ide: make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
Date: Tue, 02 Sep 2008 21:47:18 +0200	[thread overview]
Message-ID: <20080902194718.14564.27048.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080902194711.14564.63625.sendpatchset@localhost.localdomain>

Make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
and convert {ics,au1xxx-}ide.c to use it.

While at it:
- use EXPORT_SYMBOL_GPL() to match the rest of SFF DMA functions

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/arm/icside.c      |    7 +------
 drivers/ide/ide-dma.c         |    9 ++++-----
 drivers/ide/mips/au1xxx-ide.c |    7 +------
 include/linux/ide.h           |    3 ++-
 4 files changed, 8 insertions(+), 18 deletions(-)

Index: b/drivers/ide/arm/icside.c
===================================================================
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -386,11 +386,6 @@ static void icside_dma_timeout(ide_drive
 	icside_dma_end(drive);
 }
 
-static void icside_dma_lost_irq(ide_drive_t *drive)
-{
-	printk(KERN_ERR "%s: IRQ lost\n", drive->name);
-}
-
 static int icside_dma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
 {
 	hwif->dmatable_cpu	= NULL;
@@ -407,7 +402,7 @@ static const struct ide_dma_ops icside_v
 	.dma_end		= icside_dma_end,
 	.dma_test_irq		= icside_dma_test_irq,
 	.dma_timeout		= icside_dma_timeout,
-	.dma_lost_irq		= icside_dma_lost_irq,
+	.dma_lost_irq		= ide_dma_lost_irq,
 };
 #else
 #define icside_v6_dma_ops NULL
Index: b/drivers/ide/ide-dma.c
===================================================================
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -823,14 +823,13 @@ void ide_check_dma_crc(ide_drive_t *driv
 		ide_dma_on(drive);
 }
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_SFF
-void ide_dma_lost_irq (ide_drive_t *drive)
+void ide_dma_lost_irq(ide_drive_t *drive)
 {
-	printk("%s: DMA interrupt recovery\n", drive->name);
+	printk(KERN_ERR "%s: DMA interrupt recovery\n", drive->name);
 }
+EXPORT_SYMBOL_GPL(ide_dma_lost_irq);
 
-EXPORT_SYMBOL(ide_dma_lost_irq);
-
+#ifdef CONFIG_BLK_DEV_IDEDMA_SFF
 void ide_dma_timeout (ide_drive_t *drive)
 {
 	ide_hwif_t *hwif = HWIF(drive);
Index: b/drivers/ide/mips/au1xxx-ide.c
===================================================================
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -340,11 +340,6 @@ static void auide_dma_host_set(ide_drive
 {
 }
 
-static void auide_dma_lost_irq(ide_drive_t *drive)
-{
-	printk(KERN_ERR "%s: IRQ lost\n", drive->name);
-}
-
 static void auide_ddma_tx_callback(int irq, void *param)
 {
 	_auide_hwif *ahwif = (_auide_hwif*)param;
@@ -390,7 +385,7 @@ static const struct ide_dma_ops au1xxx_d
 	.dma_start		= auide_dma_start,
 	.dma_end		= auide_dma_end,
 	.dma_test_irq		= auide_dma_test_irq,
-	.dma_lost_irq		= auide_dma_lost_irq,
+	.dma_lost_irq		= ide_dma_lost_irq,
 	.dma_timeout		= auide_dma_timeout,
 };
 
Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1432,11 +1432,12 @@ void ide_dma_exec_cmd(ide_drive_t *, u8)
 extern void ide_dma_start(ide_drive_t *);
 int ide_dma_end(ide_drive_t *);
 int ide_dma_test_irq(ide_drive_t *);
-extern void ide_dma_lost_irq(ide_drive_t *);
 extern void ide_dma_timeout(ide_drive_t *);
 extern const struct ide_dma_ops sff_dma_ops;
 #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */
 
+void ide_dma_lost_irq(ide_drive_t *);
+
 #else
 static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; }
 static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; }

  reply	other threads:[~2008-09-02 19:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02 19:47 [PATCH 1/8] ide: __ide_dma_end() -> ide_dma_end() Bartlomiej Zolnierkiewicz
2008-09-02 19:47 ` Bartlomiej Zolnierkiewicz [this message]
2008-09-02 21:42   ` [PATCH 2/8] ide: make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n Sergei Shtylyov
2008-09-02 19:47 ` [PATCH 3/8] ide: make ide_dma_timeout() " Bartlomiej Zolnierkiewicz
2008-09-02 21:54   ` Sergei Shtylyov
2008-09-02 19:47 ` [PATCH 4/8] ide: switch to DMA-mapping API part 2 Bartlomiej Zolnierkiewicz
2008-09-02 19:47 ` [PATCH 5/8] ide: remove needless includes from ide-dma.c Bartlomiej Zolnierkiewicz
2008-09-02 19:47 ` [PATCH 6/8] ide: cleanup ide_build_dmatable() Bartlomiej Zolnierkiewicz
2008-09-02 19:47 ` [PATCH 7/8] ide: cleanup ide-dma.c Bartlomiej Zolnierkiewicz
2008-09-02 19:48 ` [PATCH 8/8] ide: move SFF DMA code to ide-dma-sff.c Bartlomiej Zolnierkiewicz
2008-09-02 21:38 ` [PATCH 1/8] ide: __ide_dma_end() -> ide_dma_end() Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080902194718.14564.27048.sendpatchset@localhost.localdomain \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.