From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Ryan Mallon <ryan@bluewatersys.com>,
linux-ide@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Sergei Shtylyov <sshtylyov@ru.montavista.com>,
Joao Ramos <joao.ramos@inov.pt>,
H Hartley Sweeten <hsweeten@visionengravers.com>
Subject: Re: [PATCH] add PATA host controller support for Cirrus Logic's EP93xx CPUs
Date: Tue, 5 Jan 2010 19:56:50 +0100 [thread overview]
Message-ID: <201001051956.50961.bzolnier@gmail.com> (raw)
In-Reply-To: <4B26B6EA.8050403@garzik.org>
On Monday 14 December 2009 11:06:34 pm Jeff Garzik wrote:
> On 12/14/2009 04:40 PM, Ryan Mallon wrote:
> > I have added some of my own debugging. The problem appears to be that
> > __pata_ep93xx_write gets called from probe (via ata_host_activate), but
> > ap->private_data (ata_timing) is still null. The timing private_data is
> > set by pata_ep93xx_set_piomode, but that needs adev->pio_mode set, but I
> > don't know where this happens. I assume the ATA core handles this. Do I
> > need to call pata_ep93xx_set_piomode from pata_ep93xx_probe before
> > ata_host_activate, or should the private_data timing be set to some
> > default in the probe?
>
>
> ap->private_data is traditionally initialized in the ->port_start() hook.
Ryan, this incremental patch should fix the OOPS (it adds ->port_start
implementation which sets the default 'port PIO mode' to PIO0 so we have
sane default setting before device probing takes place and ->set_piomode
takes over), please retest the driver once you have a minute..
[ Thanks for debugging the problem and sorry for the delay.. ]
---
drivers/ata/pata_ep93xx.c | 11 +++++++++++
1 file changed, 11 insertions(+)
Index: b/drivers/ata/pata_ep93xx.c
===================================================================
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -613,6 +613,15 @@ static void pata_ep93xx_postreset(struct
}
}
+static int pata_ep93xx_port_start(struct ata_port *ap)
+{
+ const struct ata_timing *cmd_t = ata_timing_find_mode(XFER_PIO_0);
+
+ ap->private_data = (void *)cmd_t;
+
+ return ata_sff_port_start(ap);
+}
+
static struct ata_port_operations pata_ep93xx_port_ops = {
.inherits = &ata_sff_port_ops,
@@ -631,6 +640,8 @@ static struct ata_port_operations pata_e
.freeze = pata_ep93xx_freeze,
.softreset = pata_ep93xx_softreset,
.postreset = pata_ep93xx_postreset,
+
+ .port_start = pata_ep93xx_port_start,
};
static int __init pata_ep93xx_probe(struct platform_device *pdev)
prev parent reply other threads:[~2010-01-05 19:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-26 15:51 [PATCH] add PATA host controller support for Cirrus Logic's EP93xx CPUs Bartlomiej Zolnierkiewicz
2009-11-26 17:03 ` Alan Cox
2009-11-26 19:46 ` Ryan Mallon
2009-12-02 0:53 ` Ryan Mallon
2009-12-02 1:06 ` Bartlomiej Zolnierkiewicz
2009-12-02 1:16 ` H Hartley Sweeten
2009-12-02 1:26 ` Ryan Mallon
2009-12-14 21:40 ` Ryan Mallon
2009-12-14 22:06 ` Jeff Garzik
2010-01-05 18:56 ` Bartlomiej Zolnierkiewicz [this message]
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=201001051956.50961.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=hsweeten@visionengravers.com \
--cc=jeff@garzik.org \
--cc=joao.ramos@inov.pt \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ryan@bluewatersys.com \
--cc=sshtylyov@ru.montavista.com \
/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