Received: by 2002:a05:6a10:3150:0:0:0:0 with SMTP id m16csp2136710pxc; Wed, 30 Mar 2022 20:29:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxI3Jev2808ZSWmn1LfDiqskVb6dvblKsVQpsxhvozT7k70GEI5jk6qW0V+N1YlHAa8f7QY X-Received: by 2002:a17:90a:8d85:b0:1b8:a215:e3e4 with SMTP id d5-20020a17090a8d8500b001b8a215e3e4mr3636245pjo.175.1648697370515; Wed, 30 Mar 2022 20:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648697370; cv=none; d=google.com; s=arc-20160816; b=RytlTP8ZQL5LroCtLVVoDSeq+0BaZf95advHuPAeqD/2N7rGqQgfB332KiDuLaezf3 rjWkH35A6gKdBGLfckabOqKnO4t+oMTY7rprvPlnZl5HUrHtw/5U9vK+xpph1BjPJQo0 FCoVSiAdU0MsWJs0ZA7v8bJFw5a765IqUpkIbD+YIDyGbLdP2dQ0gBT3bFp9OTMhVY5M HQda6/qaQYfNI+0NyCzYzRdO6tqViXnX3vg7InwXOJFp0yFInh/jlCucaY9Xy9D1iJLW fc7Qf/Noe1ODTtRhQO2rtEvU3I3Q313AQBzY8nWaXNyyuomGeSOug50E0SHrH6Z4ZehI ZIEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=zJc1eRl6ZX+PM21DacLO5ggbRDvPjgeskpQKRLM6e4Q=; b=DEmPpM08890HZ3Dts1VwYz+hxYda+UoXIe5jWezDDXdRc5doCY1S/4ssNvvUCtA5w0 i0r8MuUFgnlr7c8qHSoBCI5PA/MMDBd5Okw7bmUzviNBOkpzqq62PbUX7M+EKuMg3hjX lrw+rF5LWlfPQXN9iFq2Pl9P6gLEHI/cCUisxQ0XCkP33UdAXmgiZFnn1TswAEt99WvE wcKY/ozVKudAoNSd0qbp/vjuiGp5Meeb1gfJtOIa6T1H8tX231DVVtmrjoUfAY+K2gpq yng1LwHiqYBvEgWdG5feT86DwdDpO4uj7eN6cuwWViYOuLSJS1K4wpuUE2P4M6fGn8Gu e/ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=1EvFv5zD; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e12-20020a170902e0cc00b0015492819825si14529480pla.556.2022.03.30.20.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:29:30 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=1EvFv5zD; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A2EB711C7F0; Wed, 30 Mar 2022 19:55:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348729AbiC3QUx (ORCPT + 99 others); Wed, 30 Mar 2022 12:20:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244332AbiC3QUw (ORCPT ); Wed, 30 Mar 2022 12:20:52 -0400 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 01AA853A42; Wed, 30 Mar 2022 09:19:07 -0700 (PDT) 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=zJc1eRl6ZX+PM21DacLO5ggbRDvPjgeskpQKRLM6e4Q=; b=1EvFv5zDp3n/RX7SilfA0V0qBB Tq32mcmzQ+bNGZxbko8QqqdjPl7UKORNlqg7AXd++8Dj0A+0m6nE54aH7Cue1NxpCL5faUcsDXMhG a4FSbV+dIJjduBMkW/q+OtiGxi4fF4k5Svh7oGkUcJtDnSe2qsAZILl0hJkdq8D+Q5Tq2pDs4w9l5 eCL/rf7Fqici8IuOB2oskUX+k47Bd+EtUA1zF5r1UJmzTs7TCxvpt0tktjF12clbFDr11imV0rb0Y dL0I/7W4IL38ww/SvEF8Vu94C6rJW4iWqt0YQsEFTaBwcXFal0zdStiILWS1rDE0HVnvywZkRFZEx JLBwZDCg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:58014) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nZb26-0003RH-Hd; Wed, 30 Mar 2022 17:18:54 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nZb24-0006kx-Bv; Wed, 30 Mar 2022 17:18:52 +0100 Date: Wed, 30 Mar 2022 17:18:52 +0100 From: "Russell King (Oracle)" To: Michael Walle Cc: Andrew Lunn , Heiner Kallweit , Jakub Kicinski , Paolo Abeni , "David S . Miller" , Xu Liang , Alexandre Belloni , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC net-next 2/5] net: phy: support indirect c45 access in get_phy_c45_ids() Message-ID: References: <20220323183419.2278676-1-michael@walle.cc> <20220323183419.2278676-3-michael@walle.cc> <43227d27d938fad8a2441363d175106e@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43227d27d938fad8a2441363d175106e@walle.cc> Sender: Russell King (Oracle) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 23, 2022 at 11:14:11PM +0100, Michael Walle wrote: > I actually had that. But mmd_phy_indirect() doesn't check > the return code and neither does the __phy_write_mmd() it > actually deliberatly sets "ret = 0". So I wasn't sure. If you > are fine with a changed code flow in the error case, then sure. > I.e. mmd_phy_indirect() always (try to) do three accesses; with > error checks it might end after the first. If you are fine > with the error checks, should __phy_write_mmd() also check the > last mdiobus_write()? The reason for that goes back to commit a59a4d1921664da63d801ba477950114c71c88c9 phy: add the EEE support and the way to access to the MMD registers. and to maintain compatibility with that; if we start checking for errors now, we might trigger a kernel regression sadly. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!