netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dinh Nguyen <dinh.linux@gmail.com>
To: Jose.Abreu@synopsys.com
Cc: Marek Vasut <marex@denx.de>,
	netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
	clabbe@baylibre.com, Dinh Nguyen <dinguyen@kernel.org>
Subject: Re: [BUG] net: stmmac: socfpga ethernet no longer working on linux-next
Date: Thu, 14 Jun 2018 11:18:32 -0500	[thread overview]
Message-ID: <CADhT+wcWGP+TzGw6Od74caRYLcapQZJeb4uHPqLYma2KV0+jqw@mail.gmail.com> (raw)
In-Reply-To: <decf1aa4-cf84-e2b2-0f1d-be3e10d8b1c4@synopsys.com>

On Thu, Jun 14, 2018 at 10:23 AM Jose Abreu <Jose.Abreu@synopsys.com> 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

  reply	other threads:[~2018-06-14 16:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-13 20:46 [BUG] net: stmmac: socfpga ethernet no longer working on linux-next Dinh Nguyen
2018-06-14  7:38 ` Jose Abreu
2018-06-14  8:18   ` Jose Abreu
2018-06-14 10:59     ` Marek Vasut
2018-06-14 14:21       ` Dinh Nguyen
2018-06-14 15:23         ` Jose Abreu
2018-06-14 16:18           ` Dinh Nguyen [this message]
2018-06-15 14:58             ` Jose Abreu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADhT+wcWGP+TzGw6Od74caRYLcapQZJeb4uHPqLYma2KV0+jqw@mail.gmail.com \
    --to=dinh.linux@gmail.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=clabbe@baylibre.com \
    --cc=davem@davemloft.net \
    --cc=dinguyen@kernel.org \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).