From: Simon Guinot <simon.guinot@sequanux.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Jeff Garzik <jgarzik@redhat.com>, Tejun Heo <tj@kernel.org>,
linux-ide@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Lior Amsalem <alior@marvell.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Jason Cooper <jason@lakedaemon.net>,
Gregory Clement <gregory.clement@free-electrons.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] ata: sata_mv: setting PHY speed according to SControl speed
Date: Fri, 27 Dec 2013 18:37:43 +0100 [thread overview]
Message-ID: <20131227173743.GD5531@kw.sim.vm.gnt> (raw)
In-Reply-To: <20131226180157.GA6919@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 2798 bytes --]
On Thu, Dec 26, 2013 at 07:01:57PM +0100, Andrew Lunn wrote:
> On Mon, Dec 23, 2013 at 01:07:35PM +0100, Simon Guinot wrote:
> > From: Lior Amsalem <alior@marvell.com>
> >
> > From: Lior Amsalem <alior@marvell.com>
> >
> > This patch fixes a SATA hotplug issue on the Armada 370 and Armada XP
> > SoCs. Without it, if a disk is unplugged from a SATA port, then further
> > hotplug notification are now longer received on this port.
> >
> > This should be applied to every -stable kernel supporting Armada SoCs.
> >
> > Signed-off-by: Lior Amsalem <alior@marvell.com>
> > Signed-off-by: Nadav Haklai <nadavh@marvell.com>
> > Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Cc: Jason Cooper <jason@lakedaemon.net>
> > Cc: Andrew Lunn <andrew@lunn.ch>
> > Cc: Gregory Clement <gregory.clement@free-electrons.com>
> > Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> > Cc: stable@vger.kernel.org
>
> I tested this on Kirkwood, which does not have any issues to
> (re)hotplug. Still works O.K. with this patch.
Hi Andrew,
Thanks for the tests.
>
> My only reservation is that neither the Kirkwood nor Dove datasheet
> list the LP_PHY_CTL register. Are we now poking something which does
> not exist on these SoCs? Is that safe?
I will check that.
Simon
>
> Tested-by: Andrew Lunn <andrew@lunn.ch>
>
> Andrew
>
>
> > ---
> > drivers/ata/sata_mv.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
> > index 56be318..89ca472 100644
> > --- a/drivers/ata/sata_mv.c
> > +++ b/drivers/ata/sata_mv.c
> > @@ -304,6 +304,7 @@ enum {
> > MV5_LTMODE = 0x30,
> > MV5_PHY_CTL = 0x0C,
> > SATA_IFCFG = 0x050,
> > + LP_PHY_CTL = 0x058,
> >
> > MV_M2_PREAMP_MASK = 0x7e0,
> >
> > @@ -1358,6 +1359,7 @@ static int mv_scr_write(struct ata_link *link, unsigned int sc_reg_in, u32 val)
> >
> > if (ofs != 0xffffffffU) {
> > void __iomem *addr = mv_ap_base(link->ap) + ofs;
> > + void __iomem *lp_phy_addr = mv_ap_base(link->ap) + LP_PHY_CTL;
> > if (sc_reg_in == SCR_CONTROL) {
> > /*
> > * Workaround for 88SX60x1 FEr SATA#26:
> > @@ -1374,6 +1376,14 @@ static int mv_scr_write(struct ata_link *link, unsigned int sc_reg_in, u32 val)
> > */
> > if ((val & 0xf) == 1 || (readl(addr) & 0xf) == 1)
> > val |= 0xf000;
> > +
> > + /*
> > + * Setting PHY speed according to SControl speed
> > + */
> > + if ((val & 0xf0) == 0x10)
> > + writelfl(0x7, lp_phy_addr);
> > + else
> > + writelfl(0x227, lp_phy_addr);
> > }
> > writelfl(val, addr);
> > return 0;
> > --
> > 1.8.5.1
> >
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: simon.guinot@sequanux.org (Simon Guinot)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ata: sata_mv: setting PHY speed according to SControl speed
Date: Fri, 27 Dec 2013 18:37:43 +0100 [thread overview]
Message-ID: <20131227173743.GD5531@kw.sim.vm.gnt> (raw)
In-Reply-To: <20131226180157.GA6919@lunn.ch>
On Thu, Dec 26, 2013 at 07:01:57PM +0100, Andrew Lunn wrote:
> On Mon, Dec 23, 2013 at 01:07:35PM +0100, Simon Guinot wrote:
> > From: Lior Amsalem <alior@marvell.com>
> >
> > From: Lior Amsalem <alior@marvell.com>
> >
> > This patch fixes a SATA hotplug issue on the Armada 370 and Armada XP
> > SoCs. Without it, if a disk is unplugged from a SATA port, then further
> > hotplug notification are now longer received on this port.
> >
> > This should be applied to every -stable kernel supporting Armada SoCs.
> >
> > Signed-off-by: Lior Amsalem <alior@marvell.com>
> > Signed-off-by: Nadav Haklai <nadavh@marvell.com>
> > Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Cc: Jason Cooper <jason@lakedaemon.net>
> > Cc: Andrew Lunn <andrew@lunn.ch>
> > Cc: Gregory Clement <gregory.clement@free-electrons.com>
> > Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> > Cc: stable at vger.kernel.org
>
> I tested this on Kirkwood, which does not have any issues to
> (re)hotplug. Still works O.K. with this patch.
Hi Andrew,
Thanks for the tests.
>
> My only reservation is that neither the Kirkwood nor Dove datasheet
> list the LP_PHY_CTL register. Are we now poking something which does
> not exist on these SoCs? Is that safe?
I will check that.
Simon
>
> Tested-by: Andrew Lunn <andrew@lunn.ch>
>
> Andrew
>
>
> > ---
> > drivers/ata/sata_mv.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
> > index 56be318..89ca472 100644
> > --- a/drivers/ata/sata_mv.c
> > +++ b/drivers/ata/sata_mv.c
> > @@ -304,6 +304,7 @@ enum {
> > MV5_LTMODE = 0x30,
> > MV5_PHY_CTL = 0x0C,
> > SATA_IFCFG = 0x050,
> > + LP_PHY_CTL = 0x058,
> >
> > MV_M2_PREAMP_MASK = 0x7e0,
> >
> > @@ -1358,6 +1359,7 @@ static int mv_scr_write(struct ata_link *link, unsigned int sc_reg_in, u32 val)
> >
> > if (ofs != 0xffffffffU) {
> > void __iomem *addr = mv_ap_base(link->ap) + ofs;
> > + void __iomem *lp_phy_addr = mv_ap_base(link->ap) + LP_PHY_CTL;
> > if (sc_reg_in == SCR_CONTROL) {
> > /*
> > * Workaround for 88SX60x1 FEr SATA#26:
> > @@ -1374,6 +1376,14 @@ static int mv_scr_write(struct ata_link *link, unsigned int sc_reg_in, u32 val)
> > */
> > if ((val & 0xf) == 1 || (readl(addr) & 0xf) == 1)
> > val |= 0xf000;
> > +
> > + /*
> > + * Setting PHY speed according to SControl speed
> > + */
> > + if ((val & 0xf0) == 0x10)
> > + writelfl(0x7, lp_phy_addr);
> > + else
> > + writelfl(0x227, lp_phy_addr);
> > }
> > writelfl(val, addr);
> > return 0;
> > --
> > 1.8.5.1
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131227/3d5ce7c8/attachment.sig>
next prev parent reply other threads:[~2013-12-27 17:37 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-23 12:07 [PATCH] ata: sata_mv: setting PHY speed according to SControl speed Simon Guinot
2013-12-23 12:07 ` Simon Guinot
2013-12-24 19:46 ` Jason Cooper
2013-12-24 19:46 ` Jason Cooper
2013-12-25 16:41 ` Andrew Lunn
2013-12-25 16:41 ` Andrew Lunn
2013-12-25 22:40 ` Simon Guinot
2013-12-25 22:40 ` Simon Guinot
2013-12-26 7:53 ` Thomas Petazzoni
2013-12-26 7:53 ` Thomas Petazzoni
2013-12-26 11:54 ` Simon Guinot
2013-12-26 11:54 ` Simon Guinot
2013-12-26 13:34 ` Thomas Petazzoni
2013-12-26 13:34 ` Thomas Petazzoni
2013-12-27 15:49 ` Jason Cooper
2013-12-27 15:49 ` Jason Cooper
2013-12-26 18:01 ` Andrew Lunn
2013-12-26 18:01 ` Andrew Lunn
2013-12-27 17:37 ` Simon Guinot [this message]
2013-12-27 17:37 ` Simon Guinot
2013-12-31 12:12 ` Tejun Heo
2013-12-31 12:12 ` Tejun Heo
2013-12-31 17:05 ` Andrew Lunn
2013-12-31 17:05 ` Andrew Lunn
2014-01-08 13:45 ` Lior Amsalem
2014-01-08 13:45 ` Lior Amsalem
2014-01-10 17:44 ` Jason Cooper
2014-01-10 17:44 ` Jason Cooper
2014-01-10 23:55 ` Thomas Petazzoni
2014-01-10 23:55 ` Thomas Petazzoni
2014-01-13 14:36 ` Jason Cooper
2014-01-13 14:36 ` Jason Cooper
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=20131227173743.GD5531@kw.sim.vm.gnt \
--to=simon.guinot@sequanux.org \
--cc=alior@marvell.com \
--cc=andrew@lunn.ch \
--cc=gregory.clement@free-electrons.com \
--cc=jason@lakedaemon.net \
--cc=jgarzik@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=stable@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
--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 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.