Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp564088rdb; Mon, 29 Jan 2024 10:31:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGw7thiaMgaWerUoZthFLrfjhHr+vox93aR/d+hQevaxpo/4rKN5ra/RpY3GvtiKBJZ29CF X-Received: by 2002:a17:906:71d2:b0:a35:f4ad:5650 with SMTP id i18-20020a17090671d200b00a35f4ad5650mr1136937ejk.25.1706553088052; Mon, 29 Jan 2024 10:31:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706553088; cv=pass; d=google.com; s=arc-20160816; b=kr16aseOTgWiYlkakXnUzK2Rf18GsuqBXOCSIm2v/SlcFrPS9d2/w1R7s0J3yXImS+ SEPDVwEKOtErifsjnrMj6wH6ycT6QcAznK4gTMybXL802FNi/w+b/NBBieY9B6K1Bv/A q6lMoQmAXephvCKkMynu4d6zVkopag5YWTqxktUydXeBusaAEO5vkAGRijo/T14Nmj2e gK7PiXpdp0eJOdCQnZlYdiajrJPT4tkf2Lbw/KiMvO+bLLqJqfKtMzrtiEGZsejJLz8Y jPpoSzvdFwfW9XUP+XF49jkfcwTJgrZLXP0GOBGwoKU/Oh7eOhWyL8CNeUVtfQrMEY4M 2tdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vdrLaV397LchfCYxU1IaTxcVFRt4r8mvvBYlM75u8Nk=; fh=/YJd8cagnZyj8HxcDZG6YnlmNxAW8XcSWCpxhbbfMGA=; b=DLmiWdxbnN9TYjfXucGJ70mHWIi1Neyxxro6m15qWvS3wwQTKSj+tQBIX83zhGA3xM bA/p3tMthz4b1zw0lTFqbbDS7lyLBvxOpj/ddHq1v0KTj6zLLVhLWeX14BznSr8HeTF/ XDqYN2g1ZmaSV/gd5kc9GYOwNKDy9VHHiPcvCmj1hH5y/aV4ws510y9ePutLS1j4aEEV yCh/KGoxm1H6UxvnjKwr4YBn+jkiZJ8igroiBX9s0437bP5S5FIyGm1kRAnNOR+DcHe/ zOQ1RCoHJI6x2VK1YzmXX4G73OrsFe7eFoGuubLF4bk9kfsMQ/Bnm1R37uWXH6R5R5JR JY3Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hLHzItpV; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-42748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42748-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s13-20020a170906168d00b00a35a597904fsi1429154ejd.904.2024.01.29.10.31.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 10:31:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hLHzItpV; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-42748-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42748-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0BDF61F23197 for ; Mon, 29 Jan 2024 13:06:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B77996313F; Mon, 29 Jan 2024 13:05:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hLHzItpV" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 703A96280A; Mon, 29 Jan 2024 13:05:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706533526; cv=none; b=TEn+6e3ppKYhSuWORN0ebf4161CP0/Q2q3SOT/+qcRNvGmfkLyxWYcRZf3492B/LM9l5hkWILGy2kLGl1LmdCE6XMSX6R+TDTADYZSoeR66Zg8EEV6/jzDkJM8Cc1/T/r/47GA9frK12DtLB/XtV9x+4j6hdE//++CKVA2DP/+M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706533526; c=relaxed/simple; bh=6NUJxzq+XVvVj6pNMncMX5L9x6cZh5iXbnFwIH3E42c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QguaieeaeoFXFTCcajY2txKXvsD7QTKgKIBvNWRwM8OgfYXkOC60M616y8WrifKHvtKQaV6AO7sm/1KuxB+aQ2XDdBXbdUl2xkW/bpKmYOuV6xL26XiMj3X4dJ7XRrpLQHBv4wyVMYzlr7wcPpev2P1kM28+cW+3lH5K72Zxlaw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=hLHzItpV; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706533526; x=1738069526; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6NUJxzq+XVvVj6pNMncMX5L9x6cZh5iXbnFwIH3E42c=; b=hLHzItpVaeDBrdZ+DaFZZyKzvVUR4rZ4EmkzGyr1e8hf9pQyCi2fFAkM vul8k9YZCzGb5piEm7FbiJWee2Z9sHBfJKlOVuOadKbdXnx6Hama52UJg 7oLDH43fNk5h3GUTSrkrXbSv4j7UwtT0WiimUOQmyFN9HvqyBLIZOgxxy 4gswoiSZ+nvTZ24YnCBtCIFMSP9VB6nfofY4Vw01O5vLUY/xValLxfjqW XN/vpilkKLXFNflR6ZO7T0mPyiyuUtWwbMJ8piqwrGN7S+XYemnT3WCIT YIyKGX+ioGSkSauuJ+cC76G0RqvPxON8kdWPNQuk1Q++sPUyWTNaMMquB A==; X-IronPort-AV: E=McAfee;i="6600,9927,10967"; a="21473347" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="21473347" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 05:05:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10967"; a="907106724" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="907106724" Received: from yongliang-ubuntu20-ilbpg12.png.intel.com ([10.88.229.33]) by fmsmga002.fm.intel.com with ESMTP; 29 Jan 2024 05:05:17 -0800 From: Choong Yong Liang To: Rajneesh Bhardwaj , David E Box , Hans de Goede , Mark Gross , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Richard Cochran , Russell King , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Andrew Lunn , Heiner Kallweit , Philipp Zabel Cc: Andrew Halaney , Simon Horman , Serge Semin , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, bpf@vger.kernel.org, Voon Wei Feng , Michael Sit Wei Hong , Lai Peter Jun Ann , Abdul Rahim Faizal Subject: [PATCH net-next v4 02/11] net: stmmac: provide allow_switch_interface flag Date: Mon, 29 Jan 2024 21:02:44 +0800 Message-Id: <20240129130253.1400707-3-yong.liang.choong@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129130253.1400707-1-yong.liang.choong@linux.intel.com> References: <20240129130253.1400707-1-yong.liang.choong@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Provide the allow_switch_interface flag to indicate the platform supports interface mode switching. Signed-off-by: Choong Yong Liang --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 ++++- include/linux/stmmac.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index a0e46369ae15..d1ec075ae10a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1222,9 +1222,12 @@ static int stmmac_phy_setup(struct stmmac_priv *priv) priv->phylink_config.mac_managed_pm = true; mdio_bus_data = priv->plat->mdio_bus_data; - if (mdio_bus_data) + if (mdio_bus_data) { priv->phylink_config.ovr_an_inband = mdio_bus_data->xpcs_an_inband; + priv->phylink_config.allow_switch_interface = + mdio_bus_data->allow_switch_interface; + } /* Set the platform/firmware specified interface mode. Note, phylink * deals with the PHY interface mode, not the MAC interface mode. diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index dee5ad6e48c5..b99d11f4ff26 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -87,6 +87,7 @@ struct stmmac_mdio_bus_data { int *irqs; int probed_phy_irq; bool needs_reset; + bool allow_switch_interface; }; struct stmmac_dma_cfg { -- 2.34.1