From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dinh Nguyen Subject: Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next Date: Thu, 14 Jun 2018 11:18:32 -0500 Message-ID: References: <63bfbeb4-ca90-cc8e-3b06-ea257a34a261@synopsys.com> <08ba0471-5abd-f493-f148-062510f8e333@denx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Marek Vasut , netdev@vger.kernel.org, David Miller , clabbe@baylibre.com, Dinh Nguyen To: Jose.Abreu@synopsys.com Return-path: Received: from mail-it0-f66.google.com ([209.85.214.66]:35586 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755139AbeFNQSo (ORCPT ); Thu, 14 Jun 2018 12:18:44 -0400 Received: by mail-it0-f66.google.com with SMTP id a3-v6so9521868itd.0 for ; Thu, 14 Jun 2018 09:18:44 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Jun 14, 2018 at 10:23 AM Jose Abreu wrote: > > 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------------------ > The above patch fixed it! Dinh