From: Sergio Luis <eeeesti@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: amluto@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Tell linkwatch about new interfaces
Date: Tue, 14 Jul 2009 14:17:21 -0300 [thread overview]
Message-ID: <ce0170d90907141017h732c2cd7ja5990303093b6edd@mail.gmail.com> (raw)
In-Reply-To: <20090404.170539.148727646.davem@davemloft.net>
Hello Dave,
On Sat, Apr 4, 2009 at 9:05 PM, David Miller<davem@davemloft.net> wrote:
> From: Andrew Lutomirski <amluto@gmail.com>
> Date: Wed, 1 Apr 2009 11:40:06 -0400
>
>> When a network driver registers a new interface, linkwatch will not notice,
>> and hence not set the rfc2863 operstate, until netif_carrier_on gets called.
>> If the new interface has no carrier when it is connected, then a status of
>> "unknown" is reported to userspace, which confuses various tools
>> (NetworkManager, for example).
>>
>> This fires a linkwatch event for all new interfaces, so that operstate
>> gets set reasonably quickly.
>>
>> Signed-off-by: Andrew Lutomirski <amluto@gmail.com>
>
> The default assumed state for a freshly registered network
> device is that the link is up.
>
> If that disagrees from reality, the driver should make the
> appropriate netif_carrier_off() call.
>
> I'm sure you'll find that the e1000 driver is not doing this
> and that is what causes the bug you are seeing.
> --
is this patch incorrect, though? with the linkwatch_fire_event() call,
the rfc2863 operstate will be set for everyone at device register
time.
in here I am having the interface operstate as 'unknown', but I do
ifconfig down and up or unplug/plug the cable again it will finally
set the correct rfc2863 operstate.
or should this be fixed on a per-driver basis, like it apparently was
in this case, for his e1000? (drivers/net/skge.c in here).
thanks,
sergio
next prev parent reply other threads:[~2009-07-14 17:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-01 15:40 [PATCH 1/1] Tell linkwatch about new interfaces Andrew Lutomirski
2009-04-05 0:05 ` David Miller
2009-04-05 4:00 ` Andrew Lutomirski
2009-04-10 0:48 ` Brandeburg, Jesse
2009-04-11 15:46 ` Andrew Lutomirski
2009-04-13 23:22 ` David Miller
2009-04-14 7:43 ` Jeff Kirsher
2009-07-14 17:17 ` Sergio Luis [this message]
2009-07-14 18:33 ` David Miller
2009-07-14 18:37 ` Sergio Luis
2009-07-14 18:58 ` Andrew Lutomirski
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=ce0170d90907141017h732c2cd7ja5990303093b6edd@mail.gmail.com \
--to=eeeesti@gmail.com \
--cc=amluto@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--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).