linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] alx: Reset phy speed after resume
@ 2013-11-14 16:16 hahnjo
  2013-11-14 16:19 ` Johannes Berg
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hahnjo @ 2013-11-14 16:16 UTC (permalink / raw)
  To: jcliburn, chris.snook, davem, johannes, wangyijing,
	maarten.lankhorst, netdev, linux-kernel

>From 27744b24f9291782c1342dbd6cac511e68da907c Mon Sep 17 00:00:00 2001
From: hahnjo <hahnjo@hahnjo.de>
Date: Tue, 12 Nov 2013 18:19:24 +0100
Subject: [PATCH] alx: Reset phy speed after resume

This fixes bug 62491 (https://bugzilla.kernel.org/show_bug.cgi?id=62491).
After resuming some users got the following error flooding the kernel log:
alx 0000:02:00.0: invalid PHY speed/duplex: 0xffff

Signed-off-by: Jonas Hahnfeld <linux@hahnjo.de>
---
 drivers/net/ethernet/atheros/alx/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index fc95b23..6305a5d 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1389,6 +1389,9 @@ static int alx_resume(struct device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
 	struct alx_priv *alx = pci_get_drvdata(pdev);
+	struct alx_hw *hw = &alx->hw;
+
+	alx_reset_phy(hw);
 
 	if (!netif_running(alx->dev))
 		return 0;
-- 
1.8.4.2




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] alx: Reset phy speed after resume
  2013-11-14 16:16 [PATCH] alx: Reset phy speed after resume hahnjo
@ 2013-11-14 16:19 ` Johannes Berg
  2013-11-14 16:57 ` Joe Perches
  2013-11-14 22:15 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2013-11-14 16:19 UTC (permalink / raw)
  To: hahnjo
  Cc: jcliburn, chris.snook, davem, wangyijing, maarten.lankhorst,
	netdev, linux-kernel

On Thu, 2013-11-14 at 17:16 +0100, hahnjo wrote:
> From 27744b24f9291782c1342dbd6cac511e68da907c Mon Sep 17 00:00:00 2001
> From: hahnjo <hahnjo@hahnjo.de>

You probably want that to be your full name for the commit log?

> Date: Tue, 12 Nov 2013 18:19:24 +0100
> Subject: [PATCH] alx: Reset phy speed after resume
> 
> This fixes bug 62491 (https://bugzilla.kernel.org/show_bug.cgi?id=62491).
> After resuming some users got the following error flooding the kernel log:
> alx 0000:02:00.0: invalid PHY speed/duplex: 0xffff

Acked-by: Johannes Berg <johannes@sipsolutions.net>

> Signed-off-by: Jonas Hahnfeld <linux@hahnjo.de>
> ---
>  drivers/net/ethernet/atheros/alx/main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
> index fc95b23..6305a5d 100644
> --- a/drivers/net/ethernet/atheros/alx/main.c
> +++ b/drivers/net/ethernet/atheros/alx/main.c
> @@ -1389,6 +1389,9 @@ static int alx_resume(struct device *dev)
>  {
>  	struct pci_dev *pdev = to_pci_dev(dev);
>  	struct alx_priv *alx = pci_get_drvdata(pdev);
> +	struct alx_hw *hw = &alx->hw;
> +
> +	alx_reset_phy(hw);
>  
>  	if (!netif_running(alx->dev))
>  		return 0;



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] alx: Reset phy speed after resume
  2013-11-14 16:16 [PATCH] alx: Reset phy speed after resume hahnjo
  2013-11-14 16:19 ` Johannes Berg
@ 2013-11-14 16:57 ` Joe Perches
  2013-11-14 22:15 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2013-11-14 16:57 UTC (permalink / raw)
  To: hahnjo
  Cc: jcliburn, chris.snook, davem, johannes, wangyijing,
	maarten.lankhorst, netdev, linux-kernel

On Thu, 2013-11-14 at 17:16 +0100, hahnjo wrote:
> From 27744b24f9291782c1342dbd6cac511e68da907c Mon Sep 17 00:00:00 2001
> From: hahnjo <hahnjo@hahnjo.de>
> Date: Tue, 12 Nov 2013 18:19:24 +0100
> Subject: [PATCH] alx: Reset phy speed after resume
> 
> This fixes bug 62491 (https://bugzilla.kernel.org/show_bug.cgi?id=62491).
> After resuming some users got the following error flooding the kernel log:
> alx 0000:02:00.0: invalid PHY speed/duplex: 0xffff
> 
> Signed-off-by: Jonas Hahnfeld <linux@hahnjo.de>
> ---
>  drivers/net/ethernet/atheros/alx/main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
> index fc95b23..6305a5d 100644
> --- a/drivers/net/ethernet/atheros/alx/main.c
> +++ b/drivers/net/ethernet/atheros/alx/main.c
> @@ -1389,6 +1389,9 @@ static int alx_resume(struct device *dev)
>  {
>  	struct pci_dev *pdev = to_pci_dev(dev);
>  	struct alx_priv *alx = pci_get_drvdata(pdev);
> +	struct alx_hw *hw = &alx->hw;
> +
> +	alx_reset_phy(hw);
>  
>  	if (!netif_running(alx->dev))
>  		return 0;

Perhaps this would help too:
---
 drivers/net/ethernet/atheros/alx/hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/atheros/alx/hw.c b/drivers/net/ethernet/atheros/alx/hw.c
index 1e8c24a..3396224 100644
--- a/drivers/net/ethernet/atheros/alx/hw.c
+++ b/drivers/net/ethernet/atheros/alx/hw.c
@@ -908,7 +908,8 @@ int alx_read_phy_link(struct alx_hw *hw)
 	return 0;
 
 wrong_speed:
-	dev_err(&pdev->dev, "invalid PHY speed/duplex: 0x%x\n", giga);
+	dev_err_ratelimited(&pdev->dev, "invalid PHY speed/duplex: 0x%x\n",
+			    giga);
 	return -EINVAL;
 }
 



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] alx: Reset phy speed after resume
  2013-11-14 16:16 [PATCH] alx: Reset phy speed after resume hahnjo
  2013-11-14 16:19 ` Johannes Berg
  2013-11-14 16:57 ` Joe Perches
@ 2013-11-14 22:15 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-11-14 22:15 UTC (permalink / raw)
  To: linux
  Cc: jcliburn, chris.snook, johannes, wangyijing, maarten.lankhorst,
	netdev, linux-kernel

From: hahnjo <linux@hahnjo.de>
Date: Thu, 14 Nov 2013 17:16:13 +0100

> From 27744b24f9291782c1342dbd6cac511e68da907c Mon Sep 17 00:00:00 2001
> From: hahnjo <hahnjo@hahnjo.de>
> Date: Tue, 12 Nov 2013 18:19:24 +0100
> Subject: [PATCH] alx: Reset phy speed after resume
> 
> This fixes bug 62491 (https://bugzilla.kernel.org/show_bug.cgi?id=62491).
> After resuming some users got the following error flooding the kernel log:
> alx 0000:02:00.0: invalid PHY speed/duplex: 0xffff
> 
> Signed-off-by: Jonas Hahnfeld <linux@hahnjo.de>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-14 22:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-14 16:16 [PATCH] alx: Reset phy speed after resume hahnjo
2013-11-14 16:19 ` Johannes Berg
2013-11-14 16:57 ` Joe Perches
2013-11-14 22:15 ` David Miller

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).