Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1851315rwl; Thu, 30 Mar 2023 02:19:34 -0700 (PDT) X-Google-Smtp-Source: AKy350ZhC0+BJByq1+pcdsoLjlD4RFyaF8XTiljcxr+umN/8lsG0DbSZ1bml6Kd9dpF60kpUGz3D X-Received: by 2002:a17:906:74c3:b0:944:4d7:d3d9 with SMTP id z3-20020a17090674c300b0094404d7d3d9mr1374174ejl.2.1680167974034; Thu, 30 Mar 2023 02:19:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680167974; cv=none; d=google.com; s=arc-20160816; b=lqZp9R7SP6padfwqE9zS51ZLkPbTdbKlBlkxwdYIUO+Q7OW1vTQHlBvHUs63CdTEeO Fpix8sfSzCQ1Q/rALN5akA5qh1RQQtw8aJs6slE5A65cy2LMCjVG5vc8fg7b3FFKTP2o T3EZ/TBls2eDTmbvtwxDCWVRpyu9RQtcZsuv3I6rrtS3+gd94OGYS/U3eP8EPgGyTmmR 8gjQQ31ntgx9jX2bCLpGWoni/Ieo3hsWyWox9c0fgc3o1R1kK6j4UJk+B38wGDK6r0lA ccZxdA0t1IAvgrgaWxdnqkErJc+TQYfZVd9anWyq1BPUUKcNE/1pb516U740AaPJOfQw 7VCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/TaiWKau5u6GH9u3R+js7o7+E8VI29qxQYrTXl7M/nQ=; b=NgRrTpVlfvIKctdH1CoRAsuqS0gBBerqgGzQMT9GTc+1BmZuQ+OX9ctZz9VWK+CR7Z Yaj9Jl4jfiliNUI+ONCfVU6hWxda2b9r1IOiRHrx060Qk36ZXrgqeYOyBQJgpVvR0gRY P7cHRj/le6IoRzIVqZhlwgA93EDJqFNo2uc13FbTB1U5ZSwg18rwb2cnOIrsANvMgueM oA4J3At3OQIlj3kJHtoOHcAhVaTlNuS0b/hptpIUHEDd7aNhPJ7y2s/B14ARZb9XvCk8 iPSeffmQMCxWixMwa4jlbztchGBQBy4aqPwRI7jNSlzh9y3kIEJ6YXHtjj+LswjBIpW2 pgng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NlOnyY06; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb29-20020a1709077e9d00b0094404d7e622si739065ejc.770.2023.03.30.02.19.09; Thu, 30 Mar 2023 02:19:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NlOnyY06; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229543AbjC3JPO (ORCPT + 99 others); Thu, 30 Mar 2023 05:15:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229581AbjC3JPF (ORCPT ); Thu, 30 Mar 2023 05:15:05 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F6841725; Thu, 30 Mar 2023 02:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680167704; x=1711703704; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=g22zFmNySSWgZmeT+/AthuzFeH0QQevQ7c24N5MEm5U=; b=NlOnyY069PBzNUgXa6OVMaGn/8JPVWc6ghLNM4OLIgDjPKp2kSfYV9ow HgZbdLnmzYFioKkmjE95g+ChLy3cnn3HJ17fHjkuEcCFu9X6JeinasNUo GjTABfRYrSsn1Yyr/kQJaKob/hKGryx2jkuMRDxxammlspA1xDFwbO+Rk lttaD6WJenYM3FH6j/MZBhisK6PnGJP7GTrXVRr/t+SBuRws23KLv/LIk u6KyTMXHxYFDv2elfZiaWOjR81eKnEWWE1OuKjrF6bf8y/Z0CPzUG6qCf d+5RZ4UrEFX9S75Kn9nNi1wIRJIv5OrLf4BUMul2Fb+jOS+NK2XXDNDcu w==; X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="325038851" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="325038851" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 02:15:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="678125351" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="678125351" Received: from mike-ilbpg1.png.intel.com ([10.88.227.76]) by orsmga007.jf.intel.com with ESMTP; 30 Mar 2023 02:14:47 -0700 From: Michael Sit Wei Hong To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Ong Boon Leong , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, hkallweit1@gmail.com, andrew@lunn.ch Cc: Looi Hong Aun , Voon Weifeng , Lai Peter Jun Ann Subject: [PATCH net v5 0/3] Fix PHY handle no longer parsing Date: Thu, 30 Mar 2023 17:14:01 +0800 Message-Id: <20230330091404.3293431-1-michael.wei.hong.sit@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.3 required=5.0 tests=AC_FROM_MANY_DOTS, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 After the fixed link support was introduced, it is observed that PHY no longer attach to the MAC properly. So we introduce a helper function to determine if the MAC should expect to connect to a PHY and proceed accordingly. Michael Sit Wei Hong (3): net: phylink: add phylink_expects_phy() method net: stmmac: check if MAC needs to attach to a PHY net: stmmac: remove redundant fixup to support fixed-link mode .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 1 - .../net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++- drivers/net/phy/phylink.c | 19 +++++++++++++++++++ include/linux/phylink.h | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) v2: Initialize fwnode before using the variable v3: Introduced phylink_expects_phy() method as suggested by Russell King remove xpcs_an_inband fixup instead of moving the fixed-link check as suggested by Andrew Lunn v4: Modify phylink_expects_phy() to check for more complete set of conditions when no PHY is needed and return false if met. v5: Enhance phylink_expects_phy() description. -- 2.34.1