From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F553C64E7B for ; Mon, 30 Nov 2020 14:51:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE2DB20665 for ; Mon, 30 Nov 2020 14:51:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="opOJCoZX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727752AbgK3OvZ (ORCPT ); Mon, 30 Nov 2020 09:51:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727132AbgK3OvY (ORCPT ); Mon, 30 Nov 2020 09:51:24 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CB92C0613D2; Mon, 30 Nov 2020 06:50:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iq65UZZfrAuCR10kxOZUVTA7ZrBR2wwSWFK6vy3E44c=; b=opOJCoZXVuQa5iCMZit2QnkDz XZBVOz5+DkNurx/sxMuTxPx58AjCBt+UTAIobAYM4BrSLhl/uNO3YxCtrfOVlVSx+gt1CNqe+W47w h0CeDX+9qohK+BgYAZdTV3Btmu3XARWJs+fQw/owOJ+UZnyrICjyE7Pw2EOtQT6OAke+bVMXcXqv+ n3PXV/dgldDuniX7tR7kAL5Y7b4dmp1SF1j4GKNk6U/2NTeHr9rzG9Az1RZBjoRu5+k1oZnZvFBTy BJTAFVAYVC07z03uOgJUD5tTQdAgQ2szjNPH2dxiDgNhSWHOhOp3ALViELHQ4S3++mTkkXeffthcx VP2Bq4mig==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:38022) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjkVc-0006w3-9C; Mon, 30 Nov 2020 14:50:32 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1kjkVb-00055o-2z; Mon, 30 Nov 2020 14:50:31 +0000 Date: Mon, 30 Nov 2020 14:50:31 +0000 From: Russell King - ARM Linux admin To: Steen Hegelund Cc: Andrew Lunn , "David S. Miller" , Jakub Kicinski , Masahiro Yamada , Lars Povlsen , Bjarni Jonasson , Microchip Linux Driver Support , Alexandre Belloni , Microsemi List , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 2/3] net: sparx5: Add Sparx5 switchdev driver Message-ID: <20201130145030.GW1551@shell.armlinux.org.uk> References: <20201127133307.2969817-1-steen.hegelund@microchip.com> <20201127133307.2969817-3-steen.hegelund@microchip.com> <20201128190616.GF2191767@lunn.ch> <20201128222828.GQ1551@shell.armlinux.org.uk> <20201129105245.GG1605@shell.armlinux.org.uk> <20201129113018.GI1605@shell.armlinux.org.uk> <20201130143023.csjyuhs6uke7dtu6@mchp-dev-shegelun> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201130143023.csjyuhs6uke7dtu6@mchp-dev-shegelun> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King - ARM Linux admin Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Nov 30, 2020 at 03:30:23PM +0100, Steen Hegelund wrote: > On 29.11.2020 11:30, Russell King - ARM Linux admin wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > > > On Sun, Nov 29, 2020 at 10:52:45AM +0000, Russell King - ARM Linux admin wrote: > > > There are other issues too. > > > > This is also wrong: > > > > + if (port->ndev && port->ndev->phydev) > > + status->link = port->ndev->phydev->link; > > > > phylink already deals with that situation. > > So if I need the link state, what interface should I then use to get it? The network carrier state reflects the link state. As I've said, using the ethtool_op_get_link() is entirely suitable for the ethtool .get_link method - other network drivers use this with phylink and it works. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!