From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753305AbcAMBbN (ORCPT ); Tue, 12 Jan 2016 20:31:13 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35254 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752737AbcAMBbM (ORCPT ); Tue, 12 Jan 2016 20:31:12 -0500 User-Agent: K-9 Mail for Android In-Reply-To: <1452365045-5364-1-git-send-email-sjoerd.simons@collabora.co.uk> References: <1452365045-5364-1-git-send-email-sjoerd.simons@collabora.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH] net: phy: turn carrier off on phy attach From: Florian Fainelli Date: Tue, 12 Jan 2016 17:31:04 -0800 To: Sjoerd Simons , netdev@vger.kernel.org, Andrew Lunn CC: linux-kernel@vger.kernel.org Message-ID: <10DF45FB-A812-4D6F-8B45-817B86FD48CE@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On January 9, 2016 10:44:05 AM PST, Sjoerd Simons wrote: >The operstate of a networking device initially IF_OPER_UNKNOWN aka >"unknown", updated on carrier state changes (with carrier state being >on >by default). This means it will stay unknown unless the carrier state >goes to off at some point, which is not the case if the phy is already >up/connected at startup. Correct, drivers typically call netif_carrier_off prior to registering the network device to give a predictable link state, regardless of whether or not they use PHYLIB. > >Explicitly turn off the carrier on phy attach, leaving the phy state >machine to turn the carrier on when it has done the initial >negotiation. Same comment as Andrew on the comment below. Out of curiosity, was there a particular driver you ran into issues with? -- Florian