All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>,
	Graeme Russ <graeme.russ@gmail.com>,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH] Add hook for custom xfer function in PATA Platform driver
Date: Thu, 13 May 2010 00:30:53 +0400	[thread overview]
Message-ID: <4BEB0FFD.1090701@ru.mvista.com> (raw)
In-Reply-To: <20100511105531.39670354@lxorguk.ukuu.org.uk>

Hello.

Alan Cox wrote:

>>    As I said, we *can't* implement the driver methods at the board 
>> level. Especially if they involve messing with timings -- that's the 
>> point where the ATA driver stops being generic, like pata_platform, and 
>> there arises a need for the dedicated driver. Also, your patch would 
>> bring in disparity with the ide-platfrom driver (which should be 
>> interchangeable with pata_platfrom). For me, the need of a separate 
>> driver is clear now, so I'll remain opposed to your patch. Of course, 
>> the maintainer (Jeff Garzik) will decide but if I could veto this patch 
>> I would.
>>     
>
> I don't think ide-platform matters in this case.

   You've just supported a patch restoring feature parity between 
pata_platform and ide-platfrom WRT IRQ flags. ;-)

> You can certainly add
> the same support to the old ide_platform driver, but the old code can't
> be allowed to block progress with newer stuff. It's also trivial to add
>
> 	if (we have an xfer method) {
> 		printk("Oh poo");
> 		return -ENODEV;
> 	}
>
> to the IDE one so it simply refuses to bind to more featureful
> implementatins.
>   

   Yes, but this needs to be *done* too, preferrably by the author of 
the original patch and simultaneously with it. We can't accept a single 
patch that only touches pata_platform.

> I also don't see a problem with the transfer function needing to do
> arbitration, byte stuffing and other magic - that's quite common on
> embedded weirdnesses.
>   

   Agreed.

> The point it ceases to make sense is where you need to do mode setting.
> If the GPIO frobbing is managing the platform bus requirements then it
> makes sense as a platform function. If it's going to grow into full ATA
> set xfer mode support it probably turns into a new driver at some point.
>   

   In this case I do suspect we have fully programmable bus timings, and 
hence should be able to do mode setting. Partly because of that, I'd 
still like to see this case handled with a separate driver.

> Either way it makes sense to support overriding the data_xfer operation,
> and we've done something analogous for years with 8250 serial and it has
> been a *huge* success and saved us having about thirty similar
> platform serial drivers.
>   

   Well, with 8250 we still don't allow for overriding things at the 
board level, via the platform data callbacks.

> Alan
>   

WBR, Sergei



  reply	other threads:[~2010-05-12 20:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-09  5:21 [PATCH] Add hook for custom xfer function in PATA Platform driver Graeme Russ
     [not found] ` <4BE6910D.9070504@ru.mvista.com>
2010-05-09 11:29   ` Graeme Russ
2010-05-09 13:36     ` Sergei Shtylyov
2010-05-10  0:10       ` Graeme Russ
2010-05-10  9:51         ` Sergei Shtylyov
2010-05-10 10:03           ` Sergei Shtylyov
2010-05-11  0:25           ` Robert Hancock
2010-05-12 20:58             ` Sergei Shtylyov
2010-05-13  4:00               ` Graeme Russ
2010-05-13 21:02                 ` Sergei Shtylyov
2010-05-14  4:04                   ` Graeme Russ
2010-05-26 14:05                     ` Sergei Shtylyov
2010-06-09 12:36                       ` Graeme Russ
2010-05-11  9:55           ` Alan Cox
2010-05-12 20:30             ` Sergei Shtylyov [this message]
2010-05-12 23:13               ` Alan Cox
2010-05-13  4:09                 ` Graeme Russ
2010-05-13 21:22                   ` Sergei Shtylyov
2010-05-13 22:30                     ` Alan Cox
2010-05-14  4:37                     ` Graeme Russ
2010-05-26 14:26                       ` 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=4BEB0FFD.1090701@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=graeme.russ@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=sshtylyov@mvista.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 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.