netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Andy Duan <fugang.duan@nxp.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Chris Healy <Chris.Healy@zii.aero>
Subject: Re: [EXT] Re: [PATCH net] net: freescale: fec: Fix ethtool -d runtime PM
Date: Fri, 3 Jan 2020 03:38:37 +0100	[thread overview]
Message-ID: <20200103023837.GA28099@lunn.ch> (raw)
In-Reply-To: <VI1PR0402MB36006DE84ECA9E5EA742CAFCFF230@VI1PR0402MB3600.eurprd04.prod.outlook.com>

On Fri, Jan 03, 2020 at 02:02:50AM +0000, Andy Duan wrote:
> From: Andrew Lunn <andrew@lunn.ch> Sent: Friday, January 3, 2020 9:02 AM
> > > This fix will do, but you should consider implementing
> > > ethtool_ops::begin and ethtool_ops::end to make sure this condition is
> > > resolved for all ethtool operations.
> > >
> > > For instance the following looks possibly problematic too:
> > > fec_enet_set_coalesce -> fec_enet_itr_coal_set
> > 
> > Hi Florian
> > 
> > I did a quick test of all the ethtool operations which the driver supports,
> > including setting coalescing. I did not exhaustively try all possible coalescing
> > settings, but the ones i did try did not provoke a data abort.
>

> The original design is that driver power off clocks when net interface is down,
> use ethtool to dump registers are not allowed. Only .get_regs/ .get/set_coalesce
> are allowed when the net interface is up by checking netif_running(ndev).

Hi Andy

The function fec_enet_get_regs() does not perform a
netif_running(ndev) check. So it seems like it was intended to work
with the interface down. It could be a difference between variants of
the FEC. I was seeing the data abort on the vf610. Maybe its clocks
are different to other FEC implementations?

I've no strong preference about seeing the registers when the
interface is down, or return maybe -ENETDOWN.  What i don't want is a
data abort, and locks left in a bad state.

    Andrew

      reply	other threads:[~2020-01-03  2:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-02 14:33 [PATCH net] net: freescale: fec: Fix ethtool -d runtime PM Andrew Lunn
2020-01-03  0:38 ` David Miller
2020-01-03  0:51 ` Florian Fainelli
2020-01-03  1:01   ` Andrew Lunn
2020-01-03  2:02     ` [EXT] " Andy Duan
2020-01-03  2:38       ` Andrew Lunn [this message]

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=20200103023837.GA28099@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Chris.Healy@zii.aero \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=fugang.duan@nxp.com \
    --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).