From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752094AbdI1RNm (ORCPT ); Thu, 28 Sep 2017 13:13:42 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:49524 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751910AbdI1RNl (ORCPT ); Thu, 28 Sep 2017 13:13:41 -0400 Date: Thu, 28 Sep 2017 10:13:36 -0700 (PDT) Message-Id: <20170928.101336.44666443551339165.davem@davemloft.net> To: f.fainelli@gmail.com Cc: netdev@vger.kernel.org, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: dsa: Fix network device registration order From: David Miller In-Reply-To: <20170925225553.566-1-f.fainelli@gmail.com> References: <20170925225553.566-1-f.fainelli@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 28 Sep 2017 10:13:40 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Fainelli Date: Mon, 25 Sep 2017 15:55:53 -0700 > We cannot be registering the network device first, then setting its > carrier off and finally connecting it to a PHY, doing that leaves a > window during which the carrier is at best inconsistent, and at worse > the device is not usable without a down/up sequence since the network > device is visible to user space with possibly no PHY device attached. > > Re-order steps so that they make logical sense. This fixes some devices > where the port was not usable after e.g: an unbind then bind of the > driver. > > Fixes: 0071f56e46da ("dsa: Register netdev before phy") > Fixes: 91da11f870f0 ("net: Distributed Switch Architecture protocol support") > Signed-off-by: Florian Fainelli Applied and queued up for -stable.