linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-ide@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, tj@kernel.org
Subject: Re: [PATCH 5/5] libata/drivers: Add pata_macio, driver Apple PowerMac/PowerBook IDE controller
Date: Thu, 03 Dec 2009 03:12:00 -0500	[thread overview]
Message-ID: <4B1772D0.5030303@garzik.org> (raw)
In-Reply-To: <20091202003630.29919100851@ozlabs.org>

On 12/01/2009 07:36 PM, Benjamin Herrenschmidt wrote:
> This is a libata driver for the "macio" IDE controller used on most Apple
> PowerMac and PowerBooks. It's a libata equivalent of drivers/ide/ppc/pmac.c
>
> It supports all the features of its predecessor, including mediabay hotplug
> and suspend/resume. It should also support module load/unload.
>
> The timing calculations have been simplified to use pre-calculated tables
> compared to drivers/ide/pmac.c and it uses the new mediabay interface
> provided by a previous patch.
>
> Signed-off-by: Benjamin Herrenschmidt<benh@kernel.crashing.org>
> ---
>
> v2. Better tested now, seems to be reasonably solid.
>
> Addressed Tejun comments and made remove more robust vs. media-bay,
> should also fix Andreas problem.
>
>
>   drivers/ata/Kconfig      |   10
>   drivers/ata/Makefile     |    1
>   drivers/ata/pata_macio.c | 1427 +++++++++++++++++++++++++++++++++++++++++++++++
>   3 files changed, 1438 insertions(+)

Looks fine to me.  Two minor comments, which might perhaps be ignored if 
that is your taste:

* prefer enums to #define's, for constants

* prefer direct function call to "ap->ops->foo_bar()", because 
ap->ops->foo_bar() is guaranteed to be a constant value known to the 
driver.  The driver is the entity responsible for the function pointer.

Maybe saves a cycle or two.  Not terribly important, but hey, calling 
ap->ops->sff_exec_command() from pata_macio_bmdma_setup() is a hot path.

	Jeff






  parent reply	other threads:[~2009-12-03  8:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02  0:36 [PATCH 5/5] libata/drivers: Add pata_macio, driver Apple PowerMac/PowerBook IDE controller Benjamin Herrenschmidt
2009-12-02  1:07 ` Tejun Heo
2009-12-02  1:51   ` Benjamin Herrenschmidt
2009-12-02  1:55     ` Tejun Heo
2009-12-02 11:44 ` Andreas Schwab
2009-12-03  8:12 ` Jeff Garzik [this message]
2009-12-03 23:55   ` Benjamin Herrenschmidt
2009-12-03 15:10 ` Mikael Pettersson
  -- strict thread matches above, loose matches on Subject: below --
2009-12-01  7:08 Benjamin Herrenschmidt
2009-12-01  8:00 ` Tejun Heo
2009-12-01 12:44   ` Holger Macht
2009-12-01 12:48     ` Tejun Heo
2009-12-01 23:19   ` Benjamin Herrenschmidt
2009-12-01 23:27     ` Tejun Heo
2009-12-01 23:35       ` Benjamin Herrenschmidt
2009-12-01 23:44         ` Tejun Heo
2009-12-02  0:00           ` Benjamin Herrenschmidt
2009-12-01 10:48 ` Mikael Pettersson
2009-12-01 10:53   ` Benjamin Herrenschmidt
2009-12-01 20:43 ` Andreas Schwab
2009-12-01 22:34   ` Benjamin Herrenschmidt
2009-12-01 22:58   ` 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=4B1772D0.5030303@garzik.org \
    --to=jeff@garzik.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=tj@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).