linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: antoine.tenart@free-electrons.com (Antoine Ténart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9 3/7] ata: libahci: allow to use multiple PHYs
Date: Tue, 8 Jul 2014 19:49:00 +0200	[thread overview]
Message-ID: <20140708174900.GC16148@kwain> (raw)
In-Reply-To: <20140708171817.GH4979@htj.dyndns.org>

On Tue, Jul 08, 2014 at 01:18:17PM -0400, Tejun Heo wrote:
> Hello,
> 
> On Tue, Jul 08, 2014 at 07:03:53PM +0200, Antoine T?nart wrote:
> > > So, hpriv->port is both input and output?  This is messy and can lead
> > > to confusing failures and there now are multiple ways to modify
> > > port_map.  If carrying this information through ahci_host_priv is
> > > necessary, let's remove the direct params and introduce new input
> > > fields to the struct.
> > 
> > We just use hpriv->port_map to check port_map is valid and describes
> > available ports there.
> > 
> > hpriv->port_map is filed by the generic ahci_platform_get_resources()
> > function when using the new bindings and not by the drivers. port_map is
> > the input from the drivers.
> 
> So, yeah, it's being used both as input and output and we also have
> the arguments which affect port_map, right?  It does seem confusing.

I do see priv->port_map as being automatically set and then restricted
if needed by the port_map input here. I don't see how that's confusing.
The only modification is we restrict the port_map parameter to the set
of available ports. The port_map argument affected priv->port_map before
this patch.

> 
> > Well, a had a review a week ago about in the PHY driver saying I should
> > avoid using fixed sized arrays... And it was in a driver were we know
> > the maximum number of PHY available.
> > 
> > I think in this case were the number of PHYs depends on the h/w, we should
> > use a dynamically allocated array.
> 
> Well, so does clk.  Let's say clk is more restricted and phy can be
> one or more per port and thus needs to be dynamic.  If so, shouldn't
> we at least have some correlation between phys and ports?  It bothers
> me that now libahci is carrying random number of resources that it has
> no idea how to associate with the ports it manages.  What if later we
> want to involve phy driver in power managing unoccupied ports?

I see. This is a first (working) attempt to have a one node per port. I
agree that would be nice to have a correlation between ports and PHYs.
This can definitively be added when needed without changing the dt
bindings as only the internal representation changes. This would also
require to get all phys from the port nodes, which is again internal
stuff.

Don't you think we can go by steps, and have a following up series for
this when needed (like in a power managing series for unoccupied ports)?


Antoine

-- 
Antoine T?nart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-07-08 17:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-07 10:16 [PATCH v9 0/7] ARM: berlin: add AHCI support Antoine Ténart
2014-07-07 10:16 ` [PATCH v9 1/7] phy: add a driver for the Berlin SATA PHY Antoine Ténart
2014-07-08 12:29   ` Kishon Vijay Abraham I
2014-07-08 12:36     ` Antoine Ténart
2014-07-08 13:00     ` Sebastian Hesselbarth
2014-07-08 13:13       ` Kishon Vijay Abraham I
2014-07-07 10:16 ` [PATCH v9 2/7] Documentation: bindings: add " Antoine Ténart
2014-07-07 10:16 ` [PATCH v9 3/7] ata: libahci: allow to use multiple PHYs Antoine Ténart
2014-07-08 13:40   ` Tejun Heo
2014-07-08 17:03     ` Antoine Ténart
2014-07-08 17:18       ` Tejun Heo
2014-07-08 17:49         ` Antoine Ténart [this message]
2014-07-08 21:40           ` Tejun Heo
2014-07-09  8:23             ` Antoine Ténart
2014-07-09 13:59               ` Tejun Heo
2014-07-09 14:02                 ` Hans de Goede
2014-07-09 15:24                 ` Alexandre Belloni
2014-07-09 15:42                   ` Tejun Heo
2014-07-09  7:22     ` Hans de Goede
2014-07-08 13:42   ` Tejun Heo
2014-07-08 17:05     ` Antoine Ténart
2014-07-07 10:16 ` [PATCH v9 4/7] ata: ahci_platform: add a generic AHCI compatible Antoine Ténart
2014-07-07 10:16 ` [PATCH v9 5/7] Documentation: bindings: document the sub-nodes AHCI bindings Antoine Ténart
2014-07-07 10:16 ` [PATCH v9 6/7] ARM: berlin: add the AHCI node for the BG2Q Antoine Ténart
2014-07-07 10:16 ` [PATCH v9 7/7] ARM: berlin: enable the eSATA interface on the BG2Q DMP Antoine Ténart

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=20140708174900.GC16148@kwain \
    --to=antoine.tenart@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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).