LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jeff Garzik <jeff@garzik.org>, Tim Ellis <tim@ngndg.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Work around breakage introduced in pata_sil680 by switching it to MMIO
Date: Wed, 26 Mar 2008 00:31:19 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0803260023030.1539@axis700.grange> (raw)
In-Reply-To: <1203987502.15052.71.camel@pasglop>

pata_sil680 is broken on Linkstation amd Kurobox HG machines since 2.6.24. 
Work around the breakage until a real fix is found.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

---

On Tue, 26 Feb 2008, Benjamin Herrenschmidt wrote:

> > Yes.
> > 
> > Alan loves to complain about lack of MMIO flush, but in practice this is 
> > rarely the source of problems such as the one you describe.
> > 
> > But if its broken its broken, and we need to revert.  Any luck getting 
> > benh access to the device?
> > 
> 
> Especially since reverting it will break a whole bunch of cell blades,
> which wouldn't be nice (those cannot do PIO and have that controller).
> 
> In the meantime, we might "workaround" with a hack to only enable MMIO
> on those cell
> blades, something like:
> 
> #ifdef CONFIG_PPC64
> 	if (machine_is(cell))
> 		mmio = 1;
> #endif
> 
> That might get us out of the regression until we find the proper
> solution ?

How about the one below? I'd really like to get it in for 2.6.25 to avoid 
a second broken stable kernel on these machines.

Ben, please verify that your cell machines still work.

Thanks
Guennadi

diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index 503245a..75179ff 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -335,9 +335,12 @@ static int __devinit sil680_init_one(struct pci_dev *pdev,
 	};
 	const struct ata_port_info *ppi[] = { &info, NULL };
 	static int printed_version;
+#ifdef CONFIG_PPC64
 	struct ata_host *host;
 	void __iomem *mmio_base;
-	int rc, try_mmio;
+	int rc;
+#endif
+	int try_mmio;
 
 	if (!printed_version++)
 		dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
@@ -350,7 +353,8 @@ static int __devinit sil680_init_one(struct pci_dev *pdev,
 			return -ENODEV;
 	}
 
-	if (!try_mmio)
+#ifdef CONFIG_PPC64
+	if (!try_mmio || !machine_is(cell))
 		goto use_ioports;
 
 	/* Try to acquire MMIO resources and fallback to PIO if
@@ -396,6 +400,7 @@ static int __devinit sil680_init_one(struct pci_dev *pdev,
 				 &sil680_sht);
 
 use_ioports:
+#endif
 	return ata_pci_init_one(pdev, ppi);
 }
 

  reply	other threads:[~2008-03-25 23:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12 15:58 [PATCH] libata: Add MMIO support to pata_sil680 Tim Ellis
2008-02-12 21:02 ` Benjamin Herrenschmidt
2008-02-12 21:42   ` Alan Cox
2008-02-15 15:52   ` Guennadi Liakhovetski
2008-02-15 15:53     ` Alan Cox
2008-02-15 21:45       ` Benjamin Herrenschmidt
2008-02-15 22:27         ` Alan Cox
2008-02-15 22:55           ` Benjamin Herrenschmidt
2008-02-15 23:56         ` Tim Ellis
2008-02-25 22:57           ` Jeff Garzik
2008-02-25 23:06             ` Guennadi Liakhovetski
2008-02-26  0:58             ` Benjamin Herrenschmidt
2008-03-25 23:31               ` Guennadi Liakhovetski [this message]
2008-03-25 23:36                 ` [PATCH] Work around breakage introduced in pata_sil680 by switching it to MMIO Alan Cox
2008-03-26  8:20                   ` Benjamin Herrenschmidt
2008-02-15 21:36     ` [PATCH] libata: Add MMIO support to pata_sil680 Benjamin Herrenschmidt

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=Pine.LNX.4.64.0803260023030.1539@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=benh@kernel.crashing.org \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tim@ngndg.com \
    --subject='Re: [PATCH] Work around breakage introduced in pata_sil680 by switching it to MMIO' \
    /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

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).