From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] bnx2: Fix the behavior of ethtool when ONBOOT=no Date: Wed, 24 Jun 2009 17:25:44 -0700 (PDT) Message-ID: <20090624.172544.67048473.davem@davemloft.net> References: <20090624.164233.166634429.davem@davemloft.net> <1245887312.12000.543.camel@nseg_linux_HP1.broadcom.com> <20090624.171246.236728523.davem@davemloft.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: rick.jones2@hp.com, nooiwa@miraclelinux.com, netdev@vger.kernel.org To: mchan@broadcom.com Return-path: Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:47866 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752138AbZFYAZk (ORCPT ); Wed, 24 Jun 2009 20:25:40 -0400 In-Reply-To: <20090624.171246.236728523.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: From: David Miller Date: Wed, 24 Jun 2009 17:12:46 -0700 (PDT) > From: "Michael Chan" > Date: Wed, 24 Jun 2009 16:48:32 -0700 > >> I don't know about NetworkManager, but the old ifup script will bring up >> the device, wait up to 5 seconds for link up, and then do DHCP. > > I'll swallow a handful of antacid tablets and take a look at > the NM sources :-/ Ok, NM first checks if the device supports either ethtool or MII based link status. It checks for these capabilities by openning the device, trying the ethtool/ioctl op, then closing the device. If link status reporting is found to be supported, it records the initial link state and listens for netlink events. (these are generated by netif_carrier_{on,off}() calls in the kernel) When a link-up status netlink event is received, it brings wired devices reporting such events up. And most importantly, it seems to bring the device UP during all of this stuff. So I guess we're OK.