From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f194.google.com ([209.85.216.194]:43424 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751312AbeCLWK6 (ORCPT ); Mon, 12 Mar 2018 18:10:58 -0400 Received: by mail-qt0-f194.google.com with SMTP id s48so6631845qtb.10 for ; Mon, 12 Mar 2018 15:10:58 -0700 (PDT) Subject: Re: [PATCH net-next] net: phy: set link state to down when creating the phy_device To: Heiner Kallweit , Andrew Lunn Cc: "netdev@vger.kernel.org" References: From: Florian Fainelli Message-ID: <20f611f2-be0d-6e75-9f06-cf3880f6febb@gmail.com> Date: Mon, 12 Mar 2018 15:10:49 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On 03/11/2018 07:00 AM, Heiner Kallweit wrote: > Currently the link state is initialized to "up" when the phy_device is > being created. This is not consistent with the phy state being > initialized to PHY_DOWN. > > Usually this doen't do any harm because the link state is updated > once the PHY reaches state PHY_AN. However e.g. if a LAN port isn't > used and the PHY remains down this inconsistency remains and calls > to functions like phy_print_status() give false results. > Therefore change the initialization to link being down. > > Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli FWIW, I have been working on some patches to try to reduce the amount of link drops that we are seeing. This particular change may be changed in the future to try to initialize the link state as early as possible, but for now this is good. Thanks! -- Florian