kernel: add support for kernel 5.4
[openwrt/staging/ansuel.git] / target / linux / generic / backport-5.4 / 731-v5.5-net-sfp-ensure-TX_FAULT-has-deasserted-before-probin.patch
index 03415fb6e7780937812e56bd0efd6b91f9f9cf34..acca29be8757d870b9c4555e9a50e4ec28927eea 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
 
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -54,6 +54,7 @@ enum {
+@@ -56,6 +56,7 @@ enum {
        SFP_S_DOWN = 0,
        SFP_S_WAIT,
        SFP_S_INIT,
@@ -27,7 +27,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
        SFP_S_WAIT_LOS,
        SFP_S_LINK_UP,
        SFP_S_TX_FAULT,
-@@ -111,6 +112,7 @@ static const char * const sm_state_strin
+@@ -113,6 +114,7 @@ static const char * const sm_state_strin
        [SFP_S_DOWN] = "down",
        [SFP_S_WAIT] = "wait",
        [SFP_S_INIT] = "init",
@@ -35,7 +35,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
        [SFP_S_WAIT_LOS] = "wait_los",
        [SFP_S_LINK_UP] = "link_up",
        [SFP_S_TX_FAULT] = "tx_fault",
-@@ -1595,8 +1597,6 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1660,8 +1662,6 @@ static void sfp_sm_main(struct sfp *sfp,
                if (event != SFP_E_TIMEOUT)
                        break;
  
@@ -44,7 +44,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
                if (sfp->state & SFP_F_TX_FAULT) {
                        /* Wait t_init before indicating that the link is up,
                         * provided the current state indicates no TX_FAULT. If
-@@ -1618,10 +1618,29 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1683,10 +1683,29 @@ static void sfp_sm_main(struct sfp *sfp,
                break;
  
        case SFP_S_INIT: