From: Ben Hutchings <bhutchings@solarflare.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ivan Vecera <ivecera@redhat.com>,
netdev@vger.kernel.org, davem@davemloft.net, aabdulla@nvidia.com,
Ben Hutchings <ben@decadent.org.uk>
Subject: Re: [PATCH] drivers/net: Call netif_carrier_off at the end of the probe
Date: Tue, 15 Feb 2011 15:58:52 +0000 [thread overview]
Message-ID: <1297785532.2584.10.camel@bwh-desktop> (raw)
In-Reply-To: <20110215152246.GA11719@electric-eye.fr.zoreil.com>
On Tue, 2011-02-15 at 16:22 +0100, Francois Romieu wrote:
> Ivan Vecera <ivecera@redhat.com> :
> > Without calling of netif_carrier_off at the end of the probe the operstate
> > is unknown when the device is initially opened. By default the carrier is
> > on so when the device is opened and netif_carrier_on is called the link
> > watch event is not fired and operstate remains zero (unknown).
>
> Stated this way it sounds like a core dev layer issue.
Due to hardware limitations, some network drivers cannot report the
carrier state and they never call netif_carrier_{on,off}(). Therefore
the initial operstate of 'unknown' is correct.
> I am not completely sure after reading some history. Namely:
> - (37e8273cd30592d3a82bcb70cbb1bdc4eaeb6b71 ?)
> - c276e098d3ee33059b4a1c747354226cec58487c
> - 22604c866889c4b2e12b73cbf1683bda1b72a313
> - b47300168e770b60ab96c8924854c3b0eb4260eb
>
> I am confused.
Drivers that can report carrier state should do so initially some time
between registering a device and bringing it up (either in the bus probe
function or the ndo_open function). It generally seems to be safe to
assume that the link is down initially, and then to rely on
notifications from the hardware. However, that does depend on the
behaviour of the hardware.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2011-02-15 15:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-15 12:08 [PATCH] drivers/net: Call netif_carrier_off at the end of the probe Ivan Vecera
2011-02-15 15:22 ` Francois Romieu
2011-02-15 15:58 ` Ben Hutchings [this message]
2011-02-15 18:01 ` Ivan Vecera
2011-02-17 8:24 ` Ivan Vecera
2011-02-17 10:19 ` Francois Romieu
2011-02-17 10:32 ` Ivan Vecera
2011-02-17 13:15 ` Francois Romieu
2011-02-17 22:10 ` David Miller
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=1297785532.2584.10.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=aabdulla@nvidia.com \
--cc=ben@decadent.org.uk \
--cc=davem@davemloft.net \
--cc=ivecera@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.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).