]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
staging: octeon: stop using cvmx_helper_link_autoconf()
authorAaro Koskinen <aaro.koskinen@iki.fi>
Fri, 2 Sep 2016 21:33:38 +0000 (00:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Sep 2016 11:21:48 +0000 (13:21 +0200)
Stop using cvmx_helper_link_autoconf(). We want to remove it in the future,
as it duplicates link state information into platform code for no reason.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon/ethernet-rgmii.c
drivers/staging/octeon/ethernet.c

index 48846dffc8e1161d2a78f7db3ebb6b5d28237424..4e7304210bb91ee257fe077d43d6878e5e26a660 100644 (file)
@@ -117,7 +117,10 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
        cvmx_helper_link_info_t link_info;
        bool status_change;
 
-       link_info = cvmx_helper_link_autoconf(priv->port);
+       link_info = cvmx_helper_link_get(priv->port);
+       if (priv->link_info != link_info.u64 &&
+           cvmx_helper_link_set(priv->port, link_info))
+               link_info.u64 = priv->link_info;
        status_change = priv->link_info != link_info.u64;
        priv->link_info = link_info.u64;
 
index 0bd5c1816e0fa6a2c50f54f61134b7e1ae69f175..5f746b88522d82888d75bedb645becbf24e46a7b 100644 (file)
@@ -521,8 +521,10 @@ void cvm_oct_link_poll(struct net_device *dev)
        if (link_info.u64 == priv->link_info)
                return;
 
-       link_info = cvmx_helper_link_autoconf(priv->port);
-       priv->link_info = link_info.u64;
+       if (cvmx_helper_link_set(priv->port, link_info))
+               link_info.u64 = priv->link_info;
+       else
+               priv->link_info = link_info.u64;
 
        if (link_info.s.link_up) {
                if (!netif_carrier_ok(dev))