netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Set __LINK_STATE_NOCARRIER in register_netdevice() ?
@ 2021-11-16 20:47 Heiner Kallweit
  2021-11-17  2:51 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2021-11-16 20:47 UTC (permalink / raw)
  To: Jakub Kicinski, David Miller, netdev

Quite some network drivers call netif_carrier_off() in their probe() function.
So I'm wondering whether we can/should add a
set_bit(__LINK_STATE_NOCARRIER, &dev->state)
to register_netdevice() and remove all these netif_carrier_off() calls.

Question is whether there's any scenario where a driver would depend on bit
__LINK_STATE_NOCARRIER being cleared after registering the netdevice
or where we want to preserve the state of this bit.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Set __LINK_STATE_NOCARRIER in register_netdevice() ?
  2021-11-16 20:47 Set __LINK_STATE_NOCARRIER in register_netdevice() ? Heiner Kallweit
@ 2021-11-17  2:51 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2021-11-17  2:51 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: David Miller, netdev

On Tue, 16 Nov 2021 21:47:21 +0100 Heiner Kallweit wrote:
> Quite some network drivers call netif_carrier_off() in their probe() function.
> So I'm wondering whether we can/should add a
> set_bit(__LINK_STATE_NOCARRIER, &dev->state)
> to register_netdevice() and remove all these netif_carrier_off() calls.
> 
> Question is whether there's any scenario where a driver would depend on bit
> __LINK_STATE_NOCARRIER being cleared after registering the netdevice
> or where we want to preserve the state of this bit.

I thought that conversely many sw devices never touch carrier, hence
letting it remain up with operstate unknown. We'd be changing that,
dunno if it matters.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-17  2:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 20:47 Set __LINK_STATE_NOCARRIER in register_netdevice() ? Heiner Kallweit
2021-11-17  2:51 ` Jakub Kicinski

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).