* [PATCH 3.3.0] phy:icplus:fix Auto Power Saving in ip101a_config_init.
@ 2012-04-02 10:02 Srinivas KANDAGATLA
2012-04-03 22:49 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Srinivas KANDAGATLA @ 2012-04-02 10:02 UTC (permalink / raw)
To: netdev; +Cc: davem, peppe.cavallaro, srinivas.kandagatla
From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
This patch fixes Auto Power Saving configuration in ip101a_config_init
which was broken as there is no phy register write followed after
setting IP101A_APS_ON flag.
This patch also fixes the return value of ip101a_config_init.
Without this patch ip101a_config_init returns 2 which is not an error
accroding to IS_ERR and the mac driver will continue accessing 2 as
valid pointer to phy_dev resulting in memory fault.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
---
Hi All,
This patch fixes broken ip101a_config_init in icplus.c.
Thanks,
srini
drivers/net/phy/icplus.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
index 0856e1b..f08c85a 100644
--- a/drivers/net/phy/icplus.c
+++ b/drivers/net/phy/icplus.c
@@ -162,7 +162,8 @@ static int ip101a_g_config_init(struct phy_device *phydev)
/* Enable Auto Power Saving mode */
c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS);
c |= IP101A_G_APS_ON;
- return c;
+
+ return phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c);
}
static int ip175c_read_status(struct phy_device *phydev)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3.3.0] phy:icplus:fix Auto Power Saving in ip101a_config_init.
2012-04-02 10:02 [PATCH 3.3.0] phy:icplus:fix Auto Power Saving in ip101a_config_init Srinivas KANDAGATLA
@ 2012-04-03 22:49 ` David Miller
2012-05-09 7:25 ` Jonathan Nieder
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2012-04-03 22:49 UTC (permalink / raw)
To: srinivas.kandagatla; +Cc: netdev, peppe.cavallaro
From: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
Date: Mon, 2 Apr 2012 11:02:09 +0100
> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>
> This patch fixes Auto Power Saving configuration in ip101a_config_init
> which was broken as there is no phy register write followed after
> setting IP101A_APS_ON flag.
>
> This patch also fixes the return value of ip101a_config_init.
>
> Without this patch ip101a_config_init returns 2 which is not an error
> accroding to IS_ERR and the mac driver will continue accessing 2 as
> valid pointer to phy_dev resulting in memory fault.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3.3.0] phy:icplus:fix Auto Power Saving in ip101a_config_init.
2012-04-03 22:49 ` David Miller
@ 2012-05-09 7:25 ` Jonathan Nieder
2012-05-09 15:57 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Nieder @ 2012-05-09 7:25 UTC (permalink / raw)
To: David Miller; +Cc: srinivas.kandagatla, netdev, peppe.cavallaro
Hi Dave,
David Miller wrote:
> From: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
>> This patch fixes Auto Power Saving configuration in ip101a_config_init
>> which was broken as there is no phy register write followed after
>> setting IP101A_APS_ON flag.
>>
>> This patch also fixes the return value of ip101a_config_init.
>>
>> Without this patch ip101a_config_init returns 2 which is not an error
>> accroding to IS_ERR and the mac driver will continue accessing 2 as
>> valid pointer to phy_dev resulting in memory fault.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>
> Applied and queued up for -stable, thanks.
I'm guessing 3.2.y needs this, too, since it also includes
v3.2-rc1~129^2~247 ("net/phy: add IC+ IP101A and support APS").
Here's a quick backport made by adjusting the context line to
use IP101A_APS_ON instead of IP101A_G_APS_ON.
Please include it in some later stable update if appropriate.
Thanks,
Jonathan
-- >8 --
From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Date: Mon, 2 Apr 2012 00:02:09 +0000
[ Upstream commit b3300146aa8efc5d3937fd33f3cfdc580a3843bc ]
This patch fixes Auto Power Saving configuration in ip101a_config_init
which was broken as there is no phy register write followed after
setting IP101A_APS_ON flag.
This patch also fixes the return value of ip101a_config_init.
Without this patch ip101a_config_init returns 2 which is not an error
accroding to IS_ERR and the mac driver will continue accessing 2 as
valid pointer to phy_dev resulting in memory fault.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/net/phy/icplus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
index c81f136ae670..b14230016d9b 100644
--- a/drivers/net/phy/icplus.c
+++ b/drivers/net/phy/icplus.c
@@ -150,7 +150,8 @@ static int ip101a_config_init(struct phy_device *phydev)
/* Enable Auto Power Saving mode */
c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS);
c |= IP101A_APS_ON;
- return c;
+
+ return phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c);
}
static int ip175c_read_status(struct phy_device *phydev)
--
1.7.10.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3.3.0] phy:icplus:fix Auto Power Saving in ip101a_config_init.
2012-05-09 7:25 ` Jonathan Nieder
@ 2012-05-09 15:57 ` David Miller
2012-05-09 17:18 ` [3.2.y] " Jonathan Nieder
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2012-05-09 15:57 UTC (permalink / raw)
To: jrnieder; +Cc: srinivas.kandagatla, netdev, peppe.cavallaro
From: Jonathan Nieder <jrnieder@gmail.com>
Date: Wed, 9 May 2012 02:25:37 -0500
> Hi Dave,
>
> David Miller wrote:
>> From: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
>
>>> This patch fixes Auto Power Saving configuration in ip101a_config_init
>>> which was broken as there is no phy register write followed after
>>> setting IP101A_APS_ON flag.
>>>
>>> This patch also fixes the return value of ip101a_config_init.
>>>
>>> Without this patch ip101a_config_init returns 2 which is not an error
>>> accroding to IS_ERR and the mac driver will continue accessing 2 as
>>> valid pointer to phy_dev resulting in memory fault.
>>>
>>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>>
>> Applied and queued up for -stable, thanks.
>
> I'm guessing 3.2.y needs this, too, since it also includes
> v3.2-rc1~129^2~247 ("net/phy: add IC+ IP101A and support APS").
>
> Here's a quick backport made by adjusting the context line to
> use IP101A_APS_ON instead of IP101A_G_APS_ON.
>
> Please include it in some later stable update if appropriate.
Please submit this directly to the stable list.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [3.2.y] phy:icplus:fix Auto Power Saving in ip101a_config_init.
2012-05-09 15:57 ` David Miller
@ 2012-05-09 17:18 ` Jonathan Nieder
2012-05-12 0:57 ` Ben Hutchings
0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Nieder @ 2012-05-09 17:18 UTC (permalink / raw)
To: stable
Cc: David Miller, srinivas.kandagatla, netdev, peppe.cavallaro,
Ben Hutchings
From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Date: Mon, 2 Apr 2012 00:02:09 +0000
[ Upstream commit b3300146aa8efc5d3937fd33f3cfdc580a3843bc ]
This patch fixes Auto Power Saving configuration in ip101a_config_init
which was broken as there is no phy register write followed after
setting IP101A_APS_ON flag.
This patch also fixes the return value of ip101a_config_init.
Without this patch ip101a_config_init returns 2 which is not an error
accroding to IS_ERR and the mac driver will continue accessing 2 as
valid pointer to phy_dev resulting in memory fault.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
David Miller wrote:
> From: Jonathan Nieder <jrnieder@gmail.com>
>> I'm guessing 3.2.y needs this, too, since it also includes
>> v3.2-rc1~129^2~247 ("net/phy: add IC+ IP101A and support APS").
>>
>> Here's a quick backport made by adjusting the context line to
>> use IP101A_APS_ON instead of IP101A_G_APS_ON.
>>
>> Please include it in some later stable update if appropriate.
>
> Please submit this directly to the stable list.
Thanks for looking it over. Doing so.
drivers/net/phy/icplus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
index c81f136ae670..b14230016d9b 100644
--- a/drivers/net/phy/icplus.c
+++ b/drivers/net/phy/icplus.c
@@ -150,7 +150,8 @@ static int ip101a_config_init(struct phy_device *phydev)
/* Enable Auto Power Saving mode */
c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS);
c |= IP101A_APS_ON;
- return c;
+
+ return phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c);
}
static int ip175c_read_status(struct phy_device *phydev)
--
1.7.10.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [3.2.y] phy:icplus:fix Auto Power Saving in ip101a_config_init.
2012-05-09 17:18 ` [3.2.y] " Jonathan Nieder
@ 2012-05-12 0:57 ` Ben Hutchings
0 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2012-05-12 0:57 UTC (permalink / raw)
To: Jonathan Nieder
Cc: stable, David Miller, srinivas.kandagatla, netdev,
peppe.cavallaro
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
On Wed, 2012-05-09 at 12:18 -0500, Jonathan Nieder wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
> Date: Mon, 2 Apr 2012 00:02:09 +0000
>
> [ Upstream commit b3300146aa8efc5d3937fd33f3cfdc580a3843bc ]
[...]
> David Miller wrote:
> > From: Jonathan Nieder <jrnieder@gmail.com>
>
> >> I'm guessing 3.2.y needs this, too, since it also includes
> >> v3.2-rc1~129^2~247 ("net/phy: add IC+ IP101A and support APS").
> >>
> >> Here's a quick backport made by adjusting the context line to
> >> use IP101A_APS_ON instead of IP101A_G_APS_ON.
> >>
> >> Please include it in some later stable update if appropriate.
> >
> > Please submit this directly to the stable list.
>
> Thanks for looking it over. Doing so.
[...]
I've queued this up, thanks.
Ben.
--
Ben Hutchings
Experience is directly proportional to the value of equipment destroyed.
- Carolyn Scheppner
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-05-12 0:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-02 10:02 [PATCH 3.3.0] phy:icplus:fix Auto Power Saving in ip101a_config_init Srinivas KANDAGATLA
2012-04-03 22:49 ` David Miller
2012-05-09 7:25 ` Jonathan Nieder
2012-05-09 15:57 ` David Miller
2012-05-09 17:18 ` [3.2.y] " Jonathan Nieder
2012-05-12 0:57 ` Ben Hutchings
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).