[PATCH 0/2][SRU Xenial] Fix link recovery on APM Merlin boards

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

[PATCH 0/2][SRU Xenial] Fix link recovery on APM Merlin boards

dann frazier-4
Clean cherry-picks from upstream.

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

Heiner Kallweit (1):
  net: phy: fix phy_start to consider PHY_IGNORE_INTERRUPT

Shaohui Xie (1):
  net: phylib: fix interrupts re-enablement in phy_start

 drivers/net/phy/phy.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--
2.18.0


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

[PATCH 1/2][SRU Xenial] net: phylib: fix interrupts re-enablement in phy_start

dann frazier-4
From: Shaohui Xie <[hidden email]>

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

If phy was suspended and is starting, current driver always enable
phy's interrupts, if phy works in polling, phy can raise unexpected
interrupt which will not be handled, the interrupt will block system
enter suspend again. So interrupts should only be re-enabled if phy
works in interrupt.

Signed-off-by: Shaohui Xie <[hidden email]>
Reviewed-by: Florian Fainelli <[hidden email]>
Signed-off-by: David S. Miller <[hidden email]>
(cherry picked from commit 84a527a41f38a80353f185d05e41b021e1ff672b)
Signed-off-by: dann frazier <[hidden email]>
---
 drivers/net/phy/phy.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 7d2cf015c5e76..6db20e2d1e1af 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -793,9 +793,11 @@ void phy_start(struct phy_device *phydev)
  break;
  case PHY_HALTED:
  /* make sure interrupts are re-enabled for the PHY */
- err = phy_enable_interrupts(phydev);
- if (err < 0)
- break;
+ if (phydev->irq != PHY_POLL) {
+ err = phy_enable_interrupts(phydev);
+ if (err < 0)
+ break;
+ }
 
  phydev->state = PHY_RESUMING;
  do_resume = true;
--
2.18.0


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

[PATCH 2/2][SRU Xenial] net: phy: fix phy_start to consider PHY_IGNORE_INTERRUPT

dann frazier-4
In reply to this post by dann frazier-4
From: Heiner Kallweit <[hidden email]>

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

This condition wasn't adjusted when PHY_IGNORE_INTERRUPT (-2) was added
long ago. In case of PHY_IGNORE_INTERRUPT the MAC interrupt indicates
also PHY state changes and we should do what the symbol says.

Fixes: 84a527a41f38 ("net: phylib: fix interrupts re-enablement in phy_start")
Signed-off-by: Heiner Kallweit <[hidden email]>
Reviewed-by: Florian Fainelli <[hidden email]>
Signed-off-by: David S. Miller <[hidden email]>
(cherry picked from commit 08f5138512180a479ce6b9d23b825c9f4cd3be77)
Signed-off-by: dann frazier <[hidden email]>
---
 drivers/net/phy/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 6db20e2d1e1af..1ea206b7452a2 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -793,7 +793,7 @@ void phy_start(struct phy_device *phydev)
  break;
  case PHY_HALTED:
  /* make sure interrupts are re-enabled for the PHY */
- if (phydev->irq != PHY_POLL) {
+ if (phy_interrupt_is_valid(phydev)) {
  err = phy_enable_interrupts(phydev);
  if (err < 0)
  break;
--
2.18.0


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

ACK: [PATCH 0/2][SRU Xenial] Fix link recovery on APM Merlin boards

Stefan Bader-2
In reply to this post by dann frazier-4
On 07.08.2018 21:21, dann frazier wrote:

> Clean cherry-picks from upstream.
>
> BugLink: https://bugs.launchpad.net/bugs/1785739
>
> Heiner Kallweit (1):
>   net: phy: fix phy_start to consider PHY_IGNORE_INTERRUPT
>
> Shaohui Xie (1):
>   net: phylib: fix interrupts re-enablement in phy_start
>
>  drivers/net/phy/phy.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
Acked-by: Stefan Bader <[hidden email]>


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

signature.asc (836 bytes) Download Attachment