linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <n0-1@freewrt.org>
To: linux-ide@vger.kernel.org
Subject: Re: [PATCH] include old-style rb532 CompactFlash support
Date: Wed, 29 Oct 2008 20:59:12 +0100	[thread overview]
Message-ID: <20081029195911.GB17108@nuty> (raw)
In-Reply-To: <200810292025.53762.bzolnier@gmail.com>

On Wed, Oct 29, 2008 at 08:25:53PM +0100, Bartlomiej Zolnierkiewicz wrote:
> On Wednesday 29 October 2008, Phil Sutter wrote:
> > I copied the driver from the OpenWrt project to FreeWRT at Thu, 16 Nov
> > 2006 and since then maintain it. As the current kernel for rb532 in
> > FreeWRT is 2.6.19.1, intense testing has only been done basing on the
> > local patches for the board support. After porting it to the linux-mips
> > git tree, I could verify the functionality by mounting an ext2
> > filesystem on the disk and reading/writing files in it.
> 
> Hmm, I thought that the old driver is an IDE driver not a stand-alone one
> so I'm not much in favor of merging it as it is.  However it still should
> be useful in figuring out why pata_rb532_cf doesn't work correctly.

I doubt having a non-working pata driver _only_ mainstream makes sense.
But porting it around just to drop it afterwards in favour of a new
shiny pata driver doesn't make sense, either. :)

> > +static irqreturn_t cf_irq_handler(int irq, void *dev_id)
> > +{
> > +	/* While tasklet has not disabled irq, irq will be retried all the time
> > +	 * because of ILEVEL matching GPIO pin status => deadlock.
> > +	 * To avoid this, we change ILEVEL to 0.
> > +	 */
> > +	struct cf_mips_dev *dev = dev_id;
> > +
> > +	rb532_gpio_set_ilevel(0, dev->pin);
> > +	rb532_gpio_set_istat(0, dev->pin);
> 
> I cannot find the corresponding functionality in the new driver or arch code?

Right, that somehow was left out. As I originally wasn't involved in it's
development, I can't tell why this happened. But this will be my
starting point when I continue with it, now that I have functions I can
depend on.

> [ It seems that ->set_int_{level,status} methods from arch/mips/rb532/gpio.c
>   are not used anywhere in the kernel? ]

Yeah, well. Not anywhere else. rb532_gpio_init() at the bottom of gpio.c
calls them, but in fact this is also code taken over from the cf driver
(see prepare_cf_irq() in ata.c).

Greetings, Phil

      reply	other threads:[~2008-10-29 19:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27 14:01 [PATCH] irq handler must disable the handled irq Phil Sutter
2008-10-27 14:15 ` Alan Cox
2008-10-27 15:41   ` Phil Sutter
2008-10-27 19:38     ` Bartlomiej Zolnierkiewicz
2008-10-27 20:51       ` Phil Sutter
2008-10-29 18:19         ` [PATCH] include old-style rb532 CompactFlash support Phil Sutter
2008-10-29 18:56           ` Phil Sutter
2008-10-29 19:25           ` Bartlomiej Zolnierkiewicz
2008-10-29 19:59             ` Phil Sutter [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=20081029195911.GB17108@nuty \
    --to=n0-1@freewrt.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).