From: David Miller <davem@davemloft.net>
To: kumaran.4353@gmail.com
Cc: steve.glendinning@shawell.net, netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] driver: net: smsc911x: set NOCARRIER flag in driver initialization
Date: Tue, 03 Jun 2014 15:24:49 -0700 (PDT) [thread overview]
Message-ID: <20140603.152449.715925744030919276.davem@davemloft.net> (raw)
In-Reply-To: <CAHPKR9+H1gmJBqtO-4c7YBQrx+xbLenzWE6sky9Pq7=yF4bHUw@mail.gmail.com>
From: Balakumaran Kannan <kumaran.4353@gmail.com>
Date: Tue, 3 Jun 2014 19:45:39 +0530
> On Sat, May 31, 2014 at 2:12 AM, David Miller <davem@davemloft.net> wrote:
>> From: Balakumaran Kannan <kumaran.4353@gmail.com>
>> Date: Fri, 30 May 2014 18:35:43 +0530
>>
>>> All these drivers call netif_carrier_off function after registering
>>> the network device using register_netdev.
>>
>> I can quote more counter-examples than your list, starting with the
>> Broadcom tg3 driver.
>
> Thank you David for this information. I'll send updated patch as version-2.
>
> Still I couldn't understand the reason behind this. I should be grateful if you
> would explain me little bit.
At the moment you call register_netdev() the device is visible, notifications
are sent to userspace, and userland tools can try to bring the interface up
and see the incorrect link state, before you do the netif_carrier_off().
Said another way, between the register_netdev() and netif_carrier_off() call,
userspace can see the device in an inconsistent state.
next prev parent reply other threads:[~2014-06-03 22:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-24 18:54 [PATCH 1/1] driver: net: smsc911x: set NOCARRIER flag in driver initialization Balakumaran Kannan
2014-05-29 22:28 ` David Miller
2014-05-30 13:05 ` Balakumaran Kannan
2014-05-30 20:42 ` David Miller
2014-06-03 14:15 ` Balakumaran Kannan
2014-06-03 16:29 ` Florian Fainelli
2014-06-03 22:24 ` David Miller [this message]
2014-06-04 5:05 ` Balakumaran Kannan
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=20140603.152449.715925744030919276.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=kumaran.4353@gmail.com \
--cc=netdev@vger.kernel.org \
--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).