Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1812970rwl; Thu, 30 Mar 2023 01:42:24 -0700 (PDT) X-Google-Smtp-Source: AKy350bYbG2BGBjbr+wUhB2+BSdXLNnYPR0PBkIuRdni4M7jOLMikOcfAjOmugKZnv4iYydT/GqI X-Received: by 2002:aa7:8817:0:b0:623:5c0f:b24a with SMTP id c23-20020aa78817000000b006235c0fb24amr1652574pfo.2.1680165743675; Thu, 30 Mar 2023 01:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680165743; cv=none; d=google.com; s=arc-20160816; b=UCABz0aAOkc9UL1Wv5JbWVmp3EgTDu0Gj0vToJoewWWPYmpMy8TEAd8DCnZ9aAL+FK kpgsXqiw2PG8p1ARSDmZFnjBk1DKt+EN90HjADY1mix6NZRmenX4Npn9vVGWLQbElAmV KGq3WVkIvCeAQiUOz2d+EbMomotqNzFweXFxWkK4x4zTmw2FgCWvoN3wSNiuza68G/jR qT96sAfc1QL0oOhC0Z86vu1SihvaCgmAzmHf/UGaRRmhyg7q9iPrRsbUyWWC2whIKOPS HABCX1IL9HlPHVpjIWYLBErV8mv53fcZyttfDqKMT4jHpacEvy3R1XR01zMKE+XP5AwF 8VGw== 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=TNI3ilnXmo5sivI7Jb9k5ONpAJA4023BeZALswwq1EM=; b=HBmS4/zHs5qsQuUwVqFVQ07oj8apEYBr/rH4ZGH7q1Unif/NtLqpw/Ezc9yjFASu20 MXlL9Nu5RmxoIdEDcIRhJWzO+nxogQBBOZKm2qlI5XJRXJTY8j1otPoxETt6WbiN18Uu K0uvGcVMYyoS1VsB03mA+bcwfGNFej/2wgINjUv2shKMyrkHD0CRdQO1yOpuMNLZNfCM cKKFmQGLZJZR2LbHuMLEex9lBvrUhw8QdWMQQWdHdJTdodPnKzwFEZVmSv+ZXHgIGBqO 20Kzqx9d3NhowY/GSTvhrYh126u2T7btupuakwBpU5HwsNWTyZBHnkG8o2OZruI5BzC3 IhYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JzOZt2KA; 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 g126-20020a625284000000b0062ae6345c75si13907234pfb.400.2023.03.30.01.42.11; Thu, 30 Mar 2023 01:42:23 -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=JzOZt2KA; 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 S229635AbjC3Ikz (ORCPT + 99 others); Thu, 30 Mar 2023 04:40:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbjC3Ikx (ORCPT ); Thu, 30 Mar 2023 04:40:53 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85FCB5B92; Thu, 30 Mar 2023 01:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680165652; x=1711701652; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=E/3JzKj/ftYcVD0rt0pT36PrSlnk43aIECQPEWDRFIQ=; b=JzOZt2KAvux5JvhmzLaD49g9OsmPW1NlqS614U/OhUtOKB0ucZmwGVZb DQM0qYQ261UnYGAKP6QYC+jxAmbesyRwBuLWy/f8CPV0woDtn8apC0/PP XvuLiybS6AEOqRp/uCSziOSvQGYLJrAkiXCRi9U4mnt6gvM+53ykOnwz7 Bmsj9Rl4nZdNaVEyCOvNYfiXh71eF0Y8ZGdMACBd2mAtv7jy74HjPfhxf dsGlzedwvC961EtrystnMTBFzD3333Wr9JyV+cJvb/evW30WneRY3F1Yv dkuUfqZ1AKdoQlclVoq6Uxg0QQ6RzZxCY617n55me/f5WSCrD0E9xc7TT A==; X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="343559359" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="343559359" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 01:40:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="684618810" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="684618810" Received: from mike-ilbpg1.png.intel.com ([10.88.227.76]) by orsmga002.jf.intel.com with ESMTP; 30 Mar 2023 01:40:46 -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 v4 0/3] Fix PHY handle no longer parsing Date: Thu, 30 Mar 2023 16:39:57 +0800 Message-Id: <20230330084000.3292487-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.0 required=5.0 tests=AC_FROM_MANY_DOTS, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 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 | 17 +++++++++++++++++ include/linux/phylink.h | 1 + 4 files changed, 21 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. -- 2.34.1