netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Simon Horman <simon.horman@corigine.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Steve Glendinning <steve.glendinning@shawell.net>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Vladimir Oltean <olteanv@gmail.com>
Subject: Re: [PATCH net v3 1/2] smsc911x: only update stats when interface is up
Date: Fri, 24 Mar 2023 08:33:20 +0100	[thread overview]
Message-ID: <ZB1SQCOpLp0kDkm3@ninjato> (raw)
In-Reply-To: <20230323113945.0915029d@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

Hi Jakub,

> Maybe we should add a false-negative version of netif_running() ?
> __LINK_STATE_START*ED* ?

Sounds very reasonable, yet I am missing subsystem details to really
judge it. I just hacked a quick coccinelle script and 14 more drivers
could be happy about such a change:

 drivers/net/ethernet/3com/3c515.c            | 2 +-
 drivers/net/ethernet/8390/axnet_cs.c         | 2 +-
 drivers/net/ethernet/8390/lib8390.c          | 2 +-
 drivers/net/ethernet/dec/tulip/de2104x.c     | 2 +-
 drivers/net/ethernet/dec/tulip/tulip_core.c  | 2 +-
 drivers/net/ethernet/dec/tulip/winbond-840.c | 2 +-
 drivers/net/ethernet/fealnx.c                | 2 +-
 drivers/net/ethernet/natsemi/natsemi.c       | 2 +-
 drivers/net/ethernet/realtek/8139cp.c        | 2 +-
 drivers/net/ethernet/silan/sc92031.c         | 2 +-
 drivers/net/ethernet/smsc/epic100.c          | 2 +-
 drivers/net/ethernet/sun/sungem.c            | 2 +-
 drivers/net/ethernet/toshiba/tc35815.c       | 2 +-
 drivers/net/ethernet/via/via-velocity.c      | 2 +-
 14 files changed, 14 insertions(+), 14 deletions(-)

The script:

@@
identifier name, args;
@@

	static struct net_device_stats *name(struct net_device *args)
	{
		...
-		netif_running
+		netif_opened
		...
	}


Thanks and happy hacking,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-03-24  7:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22  7:19 [PATCH net v3 0/2] smsc911x: fix issues when interface is not up yet Wolfram Sang
2023-03-22  7:19 ` [PATCH net v3 1/2] smsc911x: only update stats when interface is up Wolfram Sang
2023-03-23 18:39   ` Jakub Kicinski
2023-03-24  7:33     ` Wolfram Sang [this message]
2023-03-22  7:19 ` [PATCH net v3 2/2] smsc911x: avoid PHY being resumed when interface is not up Wolfram Sang
2023-03-22 20:20   ` Simon Horman

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=ZB1SQCOpLp0kDkm3@ninjato \
    --to=wsa+renesas@sang-engineering.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=simon.horman@corigine.com \
    --cc=steve.glendinning@shawell.net \
    /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).