linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: olof@lixom.net (Olof Johansson)
To: jgarzik@pobox.com
Cc: lethal@linux-sh.org, linux-ide@vger.kernel.org
Subject: [PATCH] pata_platform: don't use generic ata_port_start
Date: Wed, 9 May 2007 23:00:20 -0500	[thread overview]
Message-ID: <20070510040020.GA17530@lixom.net> (raw)

Hi,

I have a system where I have a simple IDE controller that sits on a
local bus without bus master dma capability, and thus no dma_mapping
ops defined for the device/bus.

pata_platform works great for me, with the exception of using the generic
ata_port_start which tries to do a dmam_alloc_coherent.

Looks like it doesn't need to allocate a prd table at all, so replace it
with a dummy function instead.


Signed-off-by: Olof Johansson <olof@lixom.net>

diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index 4b82a54..a0aede1 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -48,6 +48,8 @@ static int pata_platform_set_mode(struct ata_port *ap, struct ata_device **unuse
 	return 0;
 }
 
+static int ata_dummy_ret0(struct ata_port *ap)	{ return 0; }
+
 static struct scsi_host_template pata_platform_sht = {
 	.module			= THIS_MODULE,
 	.name			= DRV_NAME,
@@ -91,7 +93,7 @@ static struct ata_port_operations pata_platform_port_ops = {
 	.irq_on			= ata_irq_on,
 	.irq_ack		= ata_irq_ack,
 
-	.port_start		= ata_port_start,
+	.port_start		= ata_dummy_ret0,
 };
 
 static void pata_platform_setup_port(struct ata_ioports *ioaddr,

             reply	other threads:[~2007-05-10  4:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10  4:00 Olof Johansson [this message]
2007-05-10  4:22 ` [PATCH] pata_platform: don't use generic ata_port_start Paul Mundt
2007-05-11 22:19 ` Jeff Garzik

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=20070510040020.GA17530@lixom.net \
    --to=olof@lixom.net \
    --cc=jgarzik@pobox.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-ide@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 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).