From: "Antoine Ténart" <antoine.tenart@free-electrons.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Tejun Heo" <tj@kernel.org>,
"Antoine Ténart" <antoine.tenart@free-electrons.com>,
sebastian.hesselbarth@gmail.com, kishon@ti.com,
alexandre.belloni@free-electrons.com,
thomas.petazzoni@free-electrons.com, zmxu@marvell.com,
jszhang@marvell.com, linux-arm-kernel@lists.infradead.org,
linux-ide@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v10 0/8] ARM: berlin: add AHCI support
Date: Mon, 21 Jul 2014 11:09:53 +0200 [thread overview]
Message-ID: <20140721090953.GE32208@kwain> (raw)
In-Reply-To: <53CA48F7.5020405@redhat.com>
Hi Hans,
On Sat, Jul 19, 2014 at 12:31:19PM +0200, Hans de Goede wrote:
> On 07/19/2014 12:18 PM, Hans de Goede wrote:
>
> >The problem is that:
> >
> >1) We need to enable resources before we can do ahci_save_initial_config()
> >2) We must do ahci_save_initial_config() before we can do ata_host_alloc_pinfo()
> >3) Therefor we don't have port_info at enable_resources time, which is when we
> >want to enable the phys (and we cannot just enable the phys elsewhere as
> >enable_resouces gets used on e.g. resume too).
> >
> >So I think it is best to just make the phy pointers an array inside
> >ahci_host_priv, with a comment that the array indexes must match port
> >indexes.
>
> So looking at "[PATCH v10 4/8] ata: libahci: allow to use multiple PHYs"
> I see that currently the phy array indexes do not necessarily match the
> port indexes. Since you already allocate the phys array at nports size,
> I suggest simply making the array sparse, leaving in NULL entries for
> unused ports, and adjusting enable / disable_phys to check for NULL
> pointers. This way we still have a 1:1 way to map ports <-> phys if
> we want to do something with phys on a per port basis in the future.
>
> Note please also add a check that reg < nports so that we don't use
> the array out of bounds if there is an error in the dts.
Ok. I'll rework patch 4 along with the other modifications requested,
and I'll send a new version early this week.
Antoine
--
Antoine Ténart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: antoine.tenart@free-electrons.com (Antoine Ténart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v10 0/8] ARM: berlin: add AHCI support
Date: Mon, 21 Jul 2014 11:09:53 +0200 [thread overview]
Message-ID: <20140721090953.GE32208@kwain> (raw)
In-Reply-To: <53CA48F7.5020405@redhat.com>
Hi Hans,
On Sat, Jul 19, 2014 at 12:31:19PM +0200, Hans de Goede wrote:
> On 07/19/2014 12:18 PM, Hans de Goede wrote:
>
> >The problem is that:
> >
> >1) We need to enable resources before we can do ahci_save_initial_config()
> >2) We must do ahci_save_initial_config() before we can do ata_host_alloc_pinfo()
> >3) Therefor we don't have port_info at enable_resources time, which is when we
> >want to enable the phys (and we cannot just enable the phys elsewhere as
> >enable_resouces gets used on e.g. resume too).
> >
> >So I think it is best to just make the phy pointers an array inside
> >ahci_host_priv, with a comment that the array indexes must match port
> >indexes.
>
> So looking at "[PATCH v10 4/8] ata: libahci: allow to use multiple PHYs"
> I see that currently the phy array indexes do not necessarily match the
> port indexes. Since you already allocate the phys array at nports size,
> I suggest simply making the array sparse, leaving in NULL entries for
> unused ports, and adjusting enable / disable_phys to check for NULL
> pointers. This way we still have a 1:1 way to map ports <-> phys if
> we want to do something with phys on a per port basis in the future.
>
> Note please also add a check that reg < nports so that we don't use
> the array out of bounds if there is an error in the dts.
Ok. I'll rework patch 4 along with the other modifications requested,
and I'll send a new version early this week.
Antoine
--
Antoine T?nart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-07-21 9:09 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 12:29 [PATCH v10 0/8] ARM: berlin: add AHCI support Antoine Ténart
2014-07-18 12:29 ` Antoine Ténart
2014-07-18 12:30 ` [PATCH v10 1/8] phy: add a driver for the Berlin SATA PHY Antoine Ténart
2014-07-18 12:30 ` Antoine Ténart
2014-07-18 12:54 ` Varka Bhadram
2014-07-18 12:54 ` Varka Bhadram
2014-07-18 12:30 ` [PATCH v10 2/8] Documentation: bindings: add " Antoine Ténart
2014-07-18 12:30 ` Antoine Ténart
2014-07-18 17:27 ` Sergei Shtylyov
2014-07-18 17:27 ` Sergei Shtylyov
[not found] ` <53C95900.9050200-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-07-21 9:04 ` Antoine Ténart
2014-07-21 9:04 ` Antoine Ténart
2014-07-21 9:04 ` Antoine Ténart
2014-07-18 12:30 ` [PATCH v10 3/8] ata: libahci_platform: move port_map parameters into the AHCI structure Antoine Ténart
2014-07-18 12:30 ` Antoine Ténart
2014-07-18 12:30 ` Antoine Ténart
2014-07-18 13:47 ` Tejun Heo
2014-07-18 13:47 ` Tejun Heo
2014-07-21 9:02 ` Antoine Ténart
2014-07-21 9:02 ` Antoine Ténart
2014-07-18 12:30 ` [PATCH v10 4/8] ata: libahci: allow to use multiple PHYs Antoine Ténart
2014-07-18 12:30 ` Antoine Ténart
2014-07-18 12:30 ` Antoine Ténart
2014-07-18 13:17 ` Lothar Waßmann
2014-07-18 13:17 ` Lothar Waßmann
2014-07-18 13:17 ` Lothar Waßmann
2014-07-21 9:01 ` Antoine Ténart
2014-07-21 9:01 ` Antoine Ténart
2014-07-18 12:30 ` [PATCH v10 5/8] ata: ahci_platform: add a generic AHCI compatible Antoine Ténart
2014-07-18 12:30 ` Antoine Ténart
2014-07-18 12:30 ` Antoine Ténart
2014-07-18 14:30 ` Hans de Goede
2014-07-18 14:30 ` Hans de Goede
2014-07-18 12:30 ` [PATCH v10 6/8] Documentation: bindings: document the sub-nodes AHCI bindings Antoine Ténart
2014-07-18 12:30 ` Antoine Ténart
2014-07-18 12:30 ` [PATCH v10 7/8] ARM: berlin: add the AHCI node for the BG2Q Antoine Ténart
2014-07-18 12:30 ` Antoine Ténart
2014-07-18 12:30 ` [PATCH v10 8/8] ARM: berlin: enable the eSATA interface on the BG2Q DMP Antoine Ténart
2014-07-18 12:30 ` Antoine Ténart
2014-07-18 13:57 ` [PATCH v10 0/8] ARM: berlin: add AHCI support Tejun Heo
2014-07-18 13:57 ` Tejun Heo
2014-07-19 9:03 ` Sebastian Hesselbarth
2014-07-19 9:03 ` Sebastian Hesselbarth
2014-07-19 10:18 ` Hans de Goede
2014-07-19 10:18 ` Hans de Goede
2014-07-19 10:31 ` Hans de Goede
2014-07-19 10:31 ` Hans de Goede
2014-07-21 9:09 ` Antoine Ténart [this message]
2014-07-21 9:09 ` 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=20140721090953.GE32208@kwain \
--to=antoine.tenart@free-electrons.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=hdegoede@redhat.com \
--cc=jszhang@marvell.com \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=tj@kernel.org \
--cc=zmxu@marvell.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.