lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 14 Jun 2018 16:23:44 +0100
From:   Jose Abreu <Jose.Abreu@...opsys.com>
To:     Dinh Nguyen <dinh.linux@...il.com>, Marek Vasut <marex@...x.de>
CC:     <Jose.Abreu@...opsys.com>, <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>, <clabbe@...libre.com>,
        Dinh Nguyen <dinguyen@...nel.org>
Subject: Re: [BUG] net: stmmac: socfpga ethernet no longer working on
 linux-next

On 14-06-2018 15:21, Dinh Nguyen wrote:
>
> [    0.835537] socfpga-dwmac ff702000.ethernet: PTP uses main clock
> [    0.841794] socfpga-dwmac ff702000.ethernet: Version ID not available
> [    0.848223] socfpga-dwmac ff702000.ethernet:         DWMAC1000
> [    0.853454] socfpga-dwmac ff702000.ethernet: Normal descriptors
> [    0.859357] socfpga-dwmac ff702000.ethernet: Ring mode enabled
> [    0.865184] socfpga-dwmac ff702000.ethernet: DMA HW capability register suppo
> rted
> [    0.872654] socfpga-dwmac ff702000.ethernet: RX Checksum Offload Engine suppo
> rted
> [    0.880113] socfpga-dwmac ff702000.ethernet: COE Type 2
> [    0.885329] socfpga-dwmac ff702000.ethernet: TX Checksum insertion supported
>

Interesting ... Please check if bellow patch makes thing work
again (if not please send me the resultant dmesg log and also the
log without the problematic patch that you identified):

-------------------->8------------------
diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.c
b/drivers/net/ethernet/stmicro/stmmac/hwif.c
index 14770fc..1961819 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.c
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.c
@@ -252,12 +252,8 @@ int stmmac_hwif_init(struct stmmac_priv *priv)
                 return ret;
         }
 
-        /* Run quirks, if needed */
-        if (entry->quirks) {
-            ret = entry->quirks(priv);
-            if (ret)
-                return ret;
-        }
+        /* Save quirks, if needed for posterior use */
+        priv->hwif_quirks = entry->quirks;
 
         return 0;
     }
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 025efbf..be7da43 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -193,6 +193,9 @@ struct stmmac_priv {
 
     /* Pulse Per Second output */
     struct stmmac_pps_cfg pps[STMMAC_PPS_MAX];
+
+    /* DEBUG */
+    int (*hwif_quirks)(struct stmmac_priv *priv);
 };
 
 enum stmmac_state {
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 11fb7c7..fbe74f2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -4130,6 +4130,12 @@ static int stmmac_hw_init(struct
stmmac_priv *priv)
     if (priv->dma_cap.tsoen)
         dev_info(priv->device, "TSO supported\n");
 
+    if (priv->hwif_quirks) {
+        ret = priv->hwif_quirks(priv);
+        if (ret)
+            return ret;
+    }
+
     return 0;
 }
 
-------------------->8------------------

Thanks and Best Regards,
Jose Miguel Abreu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ