From: David Miller <davem@davemloft.net>
To: nikita.yoush@cogentembedded.com
Cc: fugang.duan@nxp.com, troy.kisky@boundarydevices.com,
andrew@lunn.ch, eric@nelint.com, tremyfr@gmail.com,
johannes@sipsolutions.net, netdev@vger.kernel.org,
cphealy@gmail.com, fabio.estevam@nxp.com,
linux-kernel@vger.kernel.org
Subject: Re: [patch net v2] net: fec: cache statistics while device is down
Date: Wed, 30 Nov 2016 12:44:57 -0500 (EST) [thread overview]
Message-ID: <20161130.124457.1899469473708436247.davem@davemloft.net> (raw)
In-Reply-To: <1480401891-19333-1-git-send-email-nikita.yoush@cogentembedded.com>
From: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Date: Tue, 29 Nov 2016 09:44:51 +0300
> Execution 'ethtool -S' on fec device that is down causes OOPS on Vybrid
> board:
>
> Unhandled fault: external abort on non-linefetch (0x1008) at 0xe0898200
> pgd = ddecc000
> [e0898200] *pgd=9e406811, *pte=400d1653, *ppte=400d1453
> Internal error: : 1008 [#1] SMP ARM
> ...
>
> Reason of OOPS is that fec_enet_get_ethtool_stats() accesses fec
> registers while IPG clock is stopped by PM.
>
> Fix that by caching statistics in fec_enet_private. Cache is initialized
> at device probe time, and updated at statistics request time if device
> is up, and also just before turning device off on down path.
>
> Additional locking is not needed, since cached statistics is accessed
> either before device is registered, or under rtnl_lock().
>
> Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Applied, thanks.
prev parent reply other threads:[~2016-11-30 17:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 6:44 [patch net v2] net: fec: cache statistics while device is down Nikita Yushchenko
2016-11-30 17:44 ` David Miller [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=20161130.124457.1899469473708436247.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=andrew@lunn.ch \
--cc=cphealy@gmail.com \
--cc=eric@nelint.com \
--cc=fabio.estevam@nxp.com \
--cc=fugang.duan@nxp.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikita.yoush@cogentembedded.com \
--cc=tremyfr@gmail.com \
--cc=troy.kisky@boundarydevices.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).