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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 C7CDDC432C3 for ; Wed, 20 Nov 2019 02:46:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 973C32245D for ; Wed, 20 Nov 2019 02:46:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727431AbfKTCqG (ORCPT ); Tue, 19 Nov 2019 21:46:06 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:48872 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727262AbfKTCqG (ORCPT ); Tue, 19 Nov 2019 21:46:06 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:1e2::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 28721146CFECE; Tue, 19 Nov 2019 18:46:05 -0800 (PST) Date: Tue, 19 Nov 2019 18:46:04 -0800 (PST) Message-Id: <20191119.184604.2256080146904190716.davem@davemloft.net> To: rmk+kernel@armlinux.org.uk Cc: andrew@lunn.ch, f.fainelli@gmail.com, hkallweit1@gmail.com, vivien.didelot@gmail.com, sean.wang@mediatek.com, matthias.bgg@gmail.com, nicolas.ferre@microchip.com, thomas.petazzoni@bootlin.com, nbd@openwrt.org, john@phrozen.org, Mark-MC.Lee@mediatek.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, radhey.shyam.pandey@xilinx.com, michal.simek@xilinx.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [RFC PATCH net-next] net: phylink: rename mac_link_state() op to mac_pcs_get_state() From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.8 on Emacs 26.1 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]); Tue, 19 Nov 2019 18:46:05 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Russell King Date: Tue, 19 Nov 2019 12:36:00 +0000 > Rename the mac_link_state() method to mac_pcs_get_state() to make it > clear that it should be returning the MACs PCS current state, which > is used for inband negotiation rather than just reading back what the > MAC has been configured for. Update the documentation to explicitly > mention that this is for inband. > > We drop the return value as well; most of phylink doesn't check the > return value and it is not clear what it should do on error - instead > arrange for state->link to be false. > > Signed-off-by: Russell King > --- > This is something I'd like to do to make it clearer what phylink expects > of this function, and that it shouldn't just read-back how the MAC was > configured. However, it will require some testing and review as it > changes quite a lot, and there's some things, particularly in DSA, that > don't seem quite right from a phylink point of view, such as messing > with state->interface in this function. I don't have the expertiece to look into the DSA components of these changes and your concerns. Andrew, Florian, etc.?