[PATCH 0/1] [SRU][B/master] Fix a regression in lan78xx driver

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 0/1] [SRU][B/master] Fix a regression in lan78xx driver

Paolo Pisati-5
BugLink: https://bugs.launchpad.net/bugs/1797406

Impact:

Since the release of Ubuntu-raspi2_4.15.0-1022.24, the ethernet port of
the RaspberryPi 3B+ has stopped working: no phy interrupts are generated
when a cable is inserted, so it's like the ethernet port is always
disconnected.

The problem lies in commit 72eff2505735 ("lan78xx: Connect phy early"),
that was backported into Bionic/master (and then percolated down into
Bionic/raspi2):

"
Commit 92571a1aae40 ("lan78xx: Connect phy early") moves the PHY
initialisation into lan78xx_probe, but lan78xx_open subsequently calls
lan78xx_reset. As well as forcing a second round of link negotiation,
this reset frequently prevents the phy interrupt from being generated
(even though the link is up), rendering the interface unusable.

Fix this issue by removing the lan78xx_reset call from lan78xx_open.
"

Fix:

Apply the attached patch and recompile

How to test:

Boot a patched kernel and checks if the ethernet port is working

Regression potential:

None, the attached patch is a fix for the aforementioned patch, and
fixes exactly this issue - it's upstream already and was backported into
gregkh's stable branches 4.17+.

The bug shows up on a Raspberry board, but since the troublesome commit
originated in Bionic/master, the fix applys there (and then propagates
through a rebase).

Phil Elwell (1):
  lan78xx: Don't reset the interface on open

 drivers/net/usb/lan78xx.c | 4 ----
 1 file changed, 4 deletions(-)

--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/1] lan78xx: Don't reset the interface on open

Paolo Pisati-5
From: Phil Elwell <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1797406

Commit 92571a1aae40 ("lan78xx: Connect phy early") moves the PHY
initialisation into lan78xx_probe, but lan78xx_open subsequently calls
lan78xx_reset. As well as forcing a second round of link negotiation,
this reset frequently prevents the phy interrupt from being generated
(even though the link is up), rendering the interface unusable.

Fix this issue by removing the lan78xx_reset call from lan78xx_open.

Fixes: 92571a1aae40 ("lan78xx: Connect phy early")
Signed-off-by: Phil Elwell <[hidden email]>
Signed-off-by: David S. Miller <[hidden email]>
(cherry picked from commit 47b998653fea4ef69e3e89574956386f262bccca)
Signed-off-by: Paolo Pisati <[hidden email]>
---
 drivers/net/usb/lan78xx.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 88f2c7cde71d..77a186befd07 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2562,10 +2562,6 @@ static int lan78xx_open(struct net_device *net)
  if (ret < 0)
  goto out;
 
- ret = lan78xx_reset(dev);
- if (ret < 0)
- goto done;
-
  phy_start(net->phydev);
 
  netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH 1/1] lan78xx: Don't reset the interface on open

Colin Ian King-2
On 11/10/18 16:18, Paolo Pisati wrote:

> From: Phil Elwell <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1797406
>
> Commit 92571a1aae40 ("lan78xx: Connect phy early") moves the PHY
> initialisation into lan78xx_probe, but lan78xx_open subsequently calls
> lan78xx_reset. As well as forcing a second round of link negotiation,
> this reset frequently prevents the phy interrupt from being generated
> (even though the link is up), rendering the interface unusable.
>
> Fix this issue by removing the lan78xx_reset call from lan78xx_open.
>
> Fixes: 92571a1aae40 ("lan78xx: Connect phy early")
> Signed-off-by: Phil Elwell <[hidden email]>
> Signed-off-by: David S. Miller <[hidden email]>
> (cherry picked from commit 47b998653fea4ef69e3e89574956386f262bccca)
> Signed-off-by: Paolo Pisati <[hidden email]>
> ---
>  drivers/net/usb/lan78xx.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
> index 88f2c7cde71d..77a186befd07 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/usb/lan78xx.c
> @@ -2562,10 +2562,6 @@ static int lan78xx_open(struct net_device *net)
>   if (ret < 0)
>   goto out;
>  
> - ret = lan78xx_reset(dev);
> - if (ret < 0)
> - goto done;
> -
>   phy_start(net->phydev);
>  
>   netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
>

Clean upstream cherry pick. Seems sane to me.

Acked-by: Colin Ian King <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH 1/1] lan78xx: Don't reset the interface on open

Stefan Bader-2
In reply to this post by Paolo Pisati-5
On 11.10.2018 17:18, Paolo Pisati wrote:

> From: Phil Elwell <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1797406
>
> Commit 92571a1aae40 ("lan78xx: Connect phy early") moves the PHY
> initialisation into lan78xx_probe, but lan78xx_open subsequently calls
> lan78xx_reset. As well as forcing a second round of link negotiation,
> this reset frequently prevents the phy interrupt from being generated
> (even though the link is up), rendering the interface unusable.
>
> Fix this issue by removing the lan78xx_reset call from lan78xx_open.
>
> Fixes: 92571a1aae40 ("lan78xx: Connect phy early")
> Signed-off-by: Phil Elwell <[hidden email]>
> Signed-off-by: David S. Miller <[hidden email]>
> (cherry picked from commit 47b998653fea4ef69e3e89574956386f262bccca)
> Signed-off-by: Paolo Pisati <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---
>  drivers/net/usb/lan78xx.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
> index 88f2c7cde71d..77a186befd07 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/usb/lan78xx.c
> @@ -2562,10 +2562,6 @@ static int lan78xx_open(struct net_device *net)
>   if (ret < 0)
>   goto out;
>  
> - ret = lan78xx_reset(dev);
> - if (ret < 0)
> - goto done;
> -
>   phy_start(net->phydev);
>  
>   netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment