Skip to contentSkip to conversation

alx: Reset phy speed after resume

PATCH Applied hahnjo 4 participants 4 messages Nov 14, 2013

Subsystems (3)
lore
Share & tools
lore

hahnjo

author
#0 lore raw

PATCH 1/1 alx: Reset phy speed after resume

Quoted 1 line

From 27744b24f9291782c1342dbd6cac511e68da907c Mon Sep 17 00:00:00 2001

From: hahnjo <[email protected]>
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

---
 drivers/net/ethernet/atheros/alx/main.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/atheros/alx/main.c +3 -0
index fc95b23..6305a5d 100644
@@ -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;
Signature · 1 line
1.8.4.2
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · hahnjo

From 27744b24f9291782c1342dbd6cac511e68da907c Mon Sep 17 00:00:00 2001
From: hahnjo <[email protected]>

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

Quoted 6 lines

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

Quoted 19 lines
---
 drivers/net/ethernet/atheros/alx/main.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/atheros/alx/main.c +3 -0
index fc95b23..6305a5d 100644
@@ -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;
#2 lore raw
In reply to hahnjo
Quoted 19 lines · hahnjo

From 27744b24f9291782c1342dbd6cac511e68da907c Mon Sep 17 00:00:00 2001
From: hahnjo <[email protected]>
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

---
 drivers/net/ethernet/atheros/alx/main.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/atheros/alx/main.c +0 -0
index fc95b23..6305a5d 100644

drivers/net/ethernet/atheros/alx/main.c static int alx_resume(struct device *dev) · line 1397

Quoted 9 lines
drivers/net/ethernet/atheros/alx/main.c +3 -0
@@ -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(-)
drivers/net/ethernet/atheros/alx/hw.c +2 -1
index 1e8c24a..3396224 100644
@@ -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;
 }
 
maintainer Applied
#3 lore raw
In reply to hahnjo

From: hahnjo <[email protected]>
Date: Thu, 14 Nov 2013 17:16:13 +0100

Quoted 10 lines

From 27744b24f9291782c1342dbd6cac511e68da907c Mon Sep 17 00:00:00 2001
From: hahnjo <[email protected]>
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

Applied, thanks.