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.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 01C66C3A5A3 for ; Tue, 27 Aug 2019 22:01:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D68A42070B for ; Tue, 27 Aug 2019 22:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726462AbfH0WBE (ORCPT ); Tue, 27 Aug 2019 18:01:04 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:51342 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbfH0WBE (ORCPT ); Tue, 27 Aug 2019 18:01:04 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (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 A536315256ED2; Tue, 27 Aug 2019 15:01:03 -0700 (PDT) Date: Tue, 27 Aug 2019 15:01:03 -0700 (PDT) Message-Id: <20190827.150103.723109968950216148.davem@davemloft.net> To: marco.hartmann@nxp.com Cc: andrew@lunn.ch, f.fainelli@gmail.com, hkallweit1@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, christian.herber@nxp.com Subject: Re: [PATCH v2 net] Add genphy_c45_config_aneg() function to phy-c45.c From: David Miller In-Reply-To: <1566385208-23523-1-git-send-email-marco.hartmann@nxp.com> References: <1566385208-23523-1-git-send-email-marco.hartmann@nxp.com> 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, 27 Aug 2019 15:01:03 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Marco Hartmann Date: Wed, 21 Aug 2019 11:00:46 +0000 > Commit 34786005eca3 ("net: phy: prevent PHYs w/o Clause 22 regs from calling > genphy_config_aneg") introduced a check that aborts phy_config_aneg() > if the phy is a C45 phy. > This causes phy_state_machine() to call phy_error() so that the phy > ends up in PHY_HALTED state. > > Instead of returning -EOPNOTSUPP, call genphy_c45_config_aneg() > (analogous to the C22 case) so that the state machine can run > correctly. > > genphy_c45_config_aneg() closely resembles mv3310_config_aneg() > in drivers/net/phy/marvell10g.c, excluding vendor specific > configurations for 1000BaseT. > > Fixes: 22b56e827093 ("net: phy: replace genphy_10g_driver with genphy_c45_driver") > > Signed-off-by: Marco Hartmann Andrew, gentle ping to respond to Heiner who said: > For me this patch would be ok, even though this generic config_aneg > doesn't support 1000BaseT. > 1. The whole genphy_c45 driver doesn't make sense w/o a config_aneg > callback implementation. > 2. It can serve as a temporary fallback for new C45 PHY's that don't > have a dedicated driver yet. > 3. We may have C45 PHYs not supporting 1000BaseT (e.g. T1). > > Andrew? Thanks.