lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 4 Jul 2012 01:30:35 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Nicolas Ferre <nicolas.ferre@...el.com>
CC:	Arvid Brodin <Arvid.Brodin@...n.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Alexey Kuznetsov <kuznet@....inr.ac.ru>,
	Stephen Hemminger <shemminger@...tta.com>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>
Subject: Re: "ADDRCONF(NETDEV_UP): eth0: link is not ready" with IPv6

On Tue, 2012-07-03 at 18:15 +0200, Nicolas Ferre wrote:
> On 07/03/2012 05:47 PM, Arvid Brodin :
> > (Added MACB "patch" contact Nicolas Ferre to CC list.)
> 
> Hi,
> 
> (adding linux-arm-kernel)
> 
> > On 2012-06-29 17:24, Ben Hutchings wrote:
> >> On Fri, 2012-06-29 at 02:36 +0000, Arvid Brodin wrote:
> >>> Hi,
> >>>
> >>> After 'ip link set eth0 up' on an avr32 board (network driver macb), the device ends up in
> >>> operational mode "UNKNOWN":
> >>>
> >>> # ip link
> >>> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
> >>>     link/ether 00:24:74:00:17:9d brd ff:ff:ff:ff:ff:ff
> >>>
> >>> Unplugging and plugging in the network cable gets the device to mode "UP".
> >>>
> >>> This is a problem for me because I'm trying to use this device as a "slave" device (for a
> >>> virtual HSR device*) and I need to be able to decide if the slave device is operational or
> >>> not.
> >>>
> >>> Following Stephen's advice here:
> >>> http://kerneltrap.org/mailarchive/linux-netdev/2008/9/24/3398834 I checked the macb.c code
> >>> and noticed they do not call netif_carrier_off() neither before register_netdev() nor in
> >>> dev_open().
> >
> >> It should be called after register_netdev() and before the driver's
> >> ndo_open implementation returns.
> 
> After having read several drivers, it seems that some are calling
> netif_carrier_off() *before* register_netdev() and some *after*... What
> is the proper way?
[...]

The latter is correct; the former is a bug that is tolerated for now:

http://article.gmane.org/gmane.linux.network/111355/

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists