netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Mason <slash.tmp@free.fr>, netdev <netdev@vger.kernel.org>,
	Thibaud Cornic <thibaud_cornic@sigmadesigns.com>,
	David Miller <davem@davemloft.net>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 2/4] net: nb8800: Simplify nb8800_pause_config()
Date: Tue, 14 Nov 2017 12:38:59 +0000	[thread overview]
Message-ID: <yw1x1sl12fx8.fsf@mansr.com> (raw)
In-Reply-To: <dd0c2014-8ef9-749c-16d3-6a56f4161658@sigmadesigns.com> (Marc Gonzalez's message of "Tue, 14 Nov 2017 11:55:40 +0100")

Marc Gonzalez <marc_gonzalez@sigmadesigns.com> writes:

> The "flow control enable" bit can be tweaked, even if DMA is enabled.

No, it can't.  Maybe on some of your newer chips it can, but not on the
older ones.

> Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
> ---
>  drivers/net/ethernet/aurora/nb8800.c | 18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
> index 26f719e2d6ca..09b8001e1ecc 100644
> --- a/drivers/net/ethernet/aurora/nb8800.c
> +++ b/drivers/net/ethernet/aurora/nb8800.c
> @@ -633,7 +633,6 @@ static void nb8800_pause_config(struct net_device *dev)
>  {
>  	struct nb8800_priv *priv = netdev_priv(dev);
>  	struct phy_device *phydev = dev->phydev;
> -	u32 rxcr;
>
>  	if (priv->pause_aneg) {
>  		if (!phydev || !phydev->link)
> @@ -644,22 +643,7 @@ static void nb8800_pause_config(struct net_device *dev)
>  	}
>
>  	nb8800_modb(priv, NB8800_RX_CTL, RX_PAUSE_EN, priv->pause_rx);
> -
> -	rxcr = nb8800_readl(priv, NB8800_RXC_CR);
> -	if (!!(rxcr & RCR_FL) == priv->pause_tx)
> -		return;
> -
> -	if (netif_running(dev)) {
> -		napi_disable(&priv->napi);
> -		netif_tx_lock_bh(dev);
> -		nb8800_dma_stop(dev);
> -		nb8800_modl(priv, NB8800_RXC_CR, RCR_FL, priv->pause_tx);
> -		nb8800_start_rx(dev);
> -		netif_tx_unlock_bh(dev);
> -		napi_enable(&priv->napi);
> -	} else {
> -		nb8800_modl(priv, NB8800_RXC_CR, RCR_FL, priv->pause_tx);
> -	}
> +	nb8800_modl(priv, NB8800_RXC_CR, RCR_FL, priv->pause_tx);
>  }
>
>  static void nb8800_link_reconfigure(struct net_device *dev)
> -- 

-- 
Måns Rullgård

  reply	other threads:[~2017-11-14 12:38 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14 10:53 [PATCH v3 0/4] Various nb8800 tweaks Marc Gonzalez
2017-11-14 10:54 ` [PATCH v3 1/4] net: nb8800: Drop generic support Marc Gonzalez
2017-11-14 12:37   ` Måns Rullgård
2017-11-14 12:47     ` Marc Gonzalez
2017-11-14 13:03       ` Måns Rullgård
2017-11-14 10:55 ` [PATCH v3 2/4] net: nb8800: Simplify nb8800_pause_config() Marc Gonzalez
2017-11-14 12:38   ` Måns Rullgård [this message]
2017-11-14 12:56     ` Marc Gonzalez
2017-11-14 13:22       ` Måns Rullgård
2017-11-15 10:53         ` Marc Gonzalez
2017-11-15 14:17           ` Andrew Lunn
2017-11-15 14:33             ` Marc Gonzalez
2017-11-15 15:03               ` Andrew Lunn
2017-11-15 15:19                 ` Marc Gonzalez
2017-11-15 15:36                   ` Måns Rullgård
2017-11-15 21:12                   ` Andrew Lunn
2017-11-14 10:56 ` [PATCH v3 3/4] net: nb8800: Move HW init to ndo_open() Marc Gonzalez
2017-11-14 12:40   ` Måns Rullgård
2017-11-14 13:26     ` Marc Gonzalez
2017-11-14 13:54       ` Måns Rullgård
2017-11-14 16:41         ` Marc Gonzalez
2017-11-14 16:55           ` Måns Rullgård
2017-11-14 17:07             ` Marc Gonzalez
2017-11-15 14:58             ` Marc Gonzalez
2017-11-15 15:11               ` Måns Rullgård
2017-11-15 16:15                 ` Marc Gonzalez
2017-11-16 12:21                   ` Marc Gonzalez
2017-11-16 16:23                     ` Andrew Lunn
2017-11-16 16:52                       ` Marc Gonzalez
2017-11-14 12:04 ` [PATCH v3 4/4] net: nb8800: Add support for suspend/resume Marc Gonzalez
2017-11-14 13:02   ` Måns Rullgård
2017-11-14 14:22     ` Marc Gonzalez
2017-11-14 16:31       ` Andrew Lunn
2017-11-14 17:08         ` Marc Gonzalez
2017-11-14 17:33           ` Andrew Lunn

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=yw1x1sl12fx8.fsf@mansr.com \
    --to=mans@mansr.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc_gonzalez@sigmadesigns.com \
    --cc=netdev@vger.kernel.org \
    --cc=slash.tmp@free.fr \
    --cc=thibaud_cornic@sigmadesigns.com \
    /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).