* [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled
@ 2008-08-09 21:32 Rafael J. Wysocki
2008-08-10 6:57 ` Stephen Hemminger
0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2008-08-09 21:32 UTC (permalink / raw)
To: netdev; +Cc: Jeff Garzik, Stephen Hemminger, Andrew Morton, LKML
sky2: Fix suspend/hibernation/shutdown regression with WOL enabled
On my test box with the Asus M3A32-MVP main board there is a
regression from 2.6.26 related to suspend, hibernation and
shutdown. Namely, if Wake-on-LAN is enabled with
'ethtool -s eth0 wol g', the box hangs solid during all of these
operations, while executing either sky2_suspend(), or
sky2_shutdown(). This patch fixes it for me.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
drivers/net/sky2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6/drivers/net/sky2.c
===================================================================
--- linux-2.6.orig/drivers/net/sky2.c
+++ linux-2.6/drivers/net/sky2.c
@@ -665,7 +665,8 @@ static void sky2_phy_power_down(struct s
GM_GPCR_FL_PASS | GM_GPCR_SPEED_100 | GM_GPCR_AU_ALL_DIS);
if (hw->chip_id != CHIP_ID_YUKON_EC) {
- if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
+ if (hw->chip_id == CHIP_ID_YUKON_EC_U
+ && hw->chip_rev != CHIP_REV_YU_EC_U_B0) {
ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
/* enable Power Down */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled
2008-08-09 21:32 [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled Rafael J. Wysocki
@ 2008-08-10 6:57 ` Stephen Hemminger
2008-08-10 12:14 ` Rafael J. Wysocki
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2008-08-10 6:57 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: netdev, Jeff Garzik, Stephen Hemminger, Andrew Morton, LKML
On Sat, 9 Aug 2008 23:32:28 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> sky2: Fix suspend/hibernation/shutdown regression with WOL enabled
>
> On my test box with the Asus M3A32-MVP main board there is a
> regression from 2.6.26 related to suspend, hibernation and
> shutdown. Namely, if Wake-on-LAN is enabled with
> 'ethtool -s eth0 wol g', the box hangs solid during all of these
> operations, while executing either sky2_suspend(), or
> sky2_shutdown(). This patch fixes it for me.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> drivers/net/sky2.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Index: linux-2.6/drivers/net/sky2.c
> ===================================================================
> --- linux-2.6.orig/drivers/net/sky2.c
> +++ linux-2.6/drivers/net/sky2.c
> @@ -665,7 +665,8 @@ static void sky2_phy_power_down(struct s
> GM_GPCR_FL_PASS | GM_GPCR_SPEED_100 | GM_GPCR_AU_ALL_DIS);
>
> if (hw->chip_id != CHIP_ID_YUKON_EC) {
> - if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
> + if (hw->chip_id == CHIP_ID_YUKON_EC_U
> + && hw->chip_rev != CHIP_REV_YU_EC_U_B0) {
> ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
>
> /* enable Power Down */
The problem is not unique to your chip version, so patching out
the power down is not the correct solution.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled
2008-08-10 6:57 ` Stephen Hemminger
@ 2008-08-10 12:14 ` Rafael J. Wysocki
2008-08-10 17:30 ` [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled (rev. 2) Rafael J. Wysocki
0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2008-08-10 12:14 UTC (permalink / raw)
To: Stephen Hemminger
Cc: netdev, Jeff Garzik, Stephen Hemminger, Andrew Morton, LKML
On Sunday, 10 of August 2008, Stephen Hemminger wrote:
> On Sat, 9 Aug 2008 23:32:28 +0200
> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
>
> > sky2: Fix suspend/hibernation/shutdown regression with WOL enabled
> >
> > On my test box with the Asus M3A32-MVP main board there is a
> > regression from 2.6.26 related to suspend, hibernation and
> > shutdown. Namely, if Wake-on-LAN is enabled with
> > 'ethtool -s eth0 wol g', the box hangs solid during all of these
> > operations, while executing either sky2_suspend(), or
> > sky2_shutdown(). This patch fixes it for me.
> >
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > ---
> > drivers/net/sky2.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > Index: linux-2.6/drivers/net/sky2.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/net/sky2.c
> > +++ linux-2.6/drivers/net/sky2.c
> > @@ -665,7 +665,8 @@ static void sky2_phy_power_down(struct s
> > GM_GPCR_FL_PASS | GM_GPCR_SPEED_100 | GM_GPCR_AU_ALL_DIS);
> >
> > if (hw->chip_id != CHIP_ID_YUKON_EC) {
> > - if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
> > + if (hw->chip_id == CHIP_ID_YUKON_EC_U
> > + && hw->chip_rev != CHIP_REV_YU_EC_U_B0) {
> > ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
> >
> > /* enable Power Down */
>
> The problem is not unique to your chip version,
Well, that's the part I wasn't sure of.
> so patching out the power down is not the correct solution.
Sure.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled (rev. 2)
2008-08-10 12:14 ` Rafael J. Wysocki
@ 2008-08-10 17:30 ` Rafael J. Wysocki
2008-08-12 2:57 ` Stephen Hemminger
2008-08-14 8:29 ` Jeff Garzik
0 siblings, 2 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2008-08-10 17:30 UTC (permalink / raw)
To: Stephen Hemminger
Cc: netdev, Jeff Garzik, Stephen Hemminger, Andrew Morton, LKML
On Sunday, 10 of August 2008, Rafael J. Wysocki wrote:
> On Sunday, 10 of August 2008, Stephen Hemminger wrote:
> > On Sat, 9 Aug 2008 23:32:28 +0200
> > "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> >
[--snip--]
> >
> > The problem is not unique to your chip version,
>
> Well, that's the part I wasn't sure of.
>
> > so patching out the power down is not the correct solution.
>
> Sure.
But, shouldn't we switch to page 2 before selecting PHY_MARV_PHY_CTRL? Things
work correctly if this is done (patch below).
Thanks,
Rafael
---
On my test box with the Asus M3A32-MVP main board there is a
regression from 2.6.26 related to suspend, hibernation and
shutdown. Namely, if Wake-on-LAN is enabled with
'ethtool -s eth0 wol g', the box hangs solid during all of these
operations, while executing either sky2_suspend(), or
sky2_shutdown(). This patch fixes it for me.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
drivers/net/sky2.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: linux-2.6/drivers/net/sky2.c
===================================================================
--- linux-2.6.orig/drivers/net/sky2.c
+++ linux-2.6/drivers/net/sky2.c
@@ -666,11 +666,16 @@ static void sky2_phy_power_down(struct s
if (hw->chip_id != CHIP_ID_YUKON_EC) {
if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
- ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
+ /* select page 2 to access MAC control register */
+ gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 2);
+ ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
/* enable Power Down */
ctrl |= PHY_M_PC_POW_D_ENA;
gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl);
+
+ /* set page register back to 0 */
+ gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 0);
}
/* set IEEE compatible Power Down Mode (dev. #4.99) */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled (rev. 2)
2008-08-10 17:30 ` [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled (rev. 2) Rafael J. Wysocki
@ 2008-08-12 2:57 ` Stephen Hemminger
2008-08-14 8:29 ` Jeff Garzik
1 sibling, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2008-08-12 2:57 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: netdev, Jeff Garzik, Stephen Hemminger, Andrew Morton, LKML
On Sun, 10 Aug 2008 19:30:28 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> On Sunday, 10 of August 2008, Rafael J. Wysocki wrote:
> > On Sunday, 10 of August 2008, Stephen Hemminger wrote:
> > > On Sat, 9 Aug 2008 23:32:28 +0200
> > > "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> > >
> [--snip--]
> > >
> > > The problem is not unique to your chip version,
> >
> > Well, that's the part I wasn't sure of.
> >
> > > so patching out the power down is not the correct solution.
> >
> > Sure.
>
> But, shouldn't we switch to page 2 before selecting PHY_MARV_PHY_CTRL? Things
> work correctly if this is done (patch below).
>
> Thanks,
> Rafael
>
>
> ---
> On my test box with the Asus M3A32-MVP main board there is a
> regression from 2.6.26 related to suspend, hibernation and
> shutdown. Namely, if Wake-on-LAN is enabled with
> 'ethtool -s eth0 wol g', the box hangs solid during all of these
> operations, while executing either sky2_suspend(), or
> sky2_shutdown(). This patch fixes it for me.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> drivers/net/sky2.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> Index: linux-2.6/drivers/net/sky2.c
> ===================================================================
> --- linux-2.6.orig/drivers/net/sky2.c
> +++ linux-2.6/drivers/net/sky2.c
> @@ -666,11 +666,16 @@ static void sky2_phy_power_down(struct s
>
> if (hw->chip_id != CHIP_ID_YUKON_EC) {
> if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
> - ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
> + /* select page 2 to access MAC control register */
> + gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 2);
>
> + ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
> /* enable Power Down */
> ctrl |= PHY_M_PC_POW_D_ENA;
> gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl);
> +
> + /* set page register back to 0 */
> + gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 0);
> }
>
> /* set IEEE compatible Power Down Mode (dev. #4.99) */
Yes, that's better.
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled (rev. 2)
2008-08-10 17:30 ` [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled (rev. 2) Rafael J. Wysocki
2008-08-12 2:57 ` Stephen Hemminger
@ 2008-08-14 8:29 ` Jeff Garzik
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2008-08-14 8:29 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Stephen Hemminger, netdev, Stephen Hemminger, Andrew Morton, LKML
Rafael J. Wysocki wrote:
> On Sunday, 10 of August 2008, Rafael J. Wysocki wrote:
>> On Sunday, 10 of August 2008, Stephen Hemminger wrote:
>>> On Sat, 9 Aug 2008 23:32:28 +0200
>>> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
>>>
> [--snip--]
>>> The problem is not unique to your chip version,
>> Well, that's the part I wasn't sure of.
>>
>>> so patching out the power down is not the correct solution.
>> Sure.
>
> But, shouldn't we switch to page 2 before selecting PHY_MARV_PHY_CTRL? Things
> work correctly if this is done (patch below).
>
> Thanks,
> Rafael
>
>
> ---
> On my test box with the Asus M3A32-MVP main board there is a
> regression from 2.6.26 related to suspend, hibernation and
> shutdown. Namely, if Wake-on-LAN is enabled with
> 'ethtool -s eth0 wol g', the box hangs solid during all of these
> operations, while executing either sky2_suspend(), or
> sky2_shutdown(). This patch fixes it for me.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> drivers/net/sky2.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> Index: linux-2.6/drivers/net/sky2.c
> ===================================================================
> --- linux-2.6.orig/drivers/net/sky2.c
> +++ linux-2.6/drivers/net/sky2.c
> @@ -666,11 +666,16 @@ static void sky2_phy_power_down(struct s
>
> if (hw->chip_id != CHIP_ID_YUKON_EC) {
> if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
> - ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
> + /* select page 2 to access MAC control register */
> + gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 2);
>
> + ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
> /* enable Power Down */
> ctrl |= PHY_M_PC_POW_D_ENA;
> gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl);
> +
> + /* set page register back to 0 */
> + gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 0);
> }
applied
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-08-14 8:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-09 21:32 [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled Rafael J. Wysocki
2008-08-10 6:57 ` Stephen Hemminger
2008-08-10 12:14 ` Rafael J. Wysocki
2008-08-10 17:30 ` [PATCH] sky2: Fix suspend/hibernation/shutdown regression with WOL enabled (rev. 2) Rafael J. Wysocki
2008-08-12 2:57 ` Stephen Hemminger
2008-08-14 8:29 ` Jeff Garzik
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).