From: Ong Boon Leong <boon.leong.ong@intel.com> To: Alexandre Torgue <alexandre.torgue@st.com>, Jose Abreu <joabreu@synopsys.com>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, Paolo Abeni <pabeni@redhat.com>, "David S . Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ong Boon Leong <boon.leong.ong@intel.com> Subject: [PATCH net-next 3/4] stmmac: intel: prepare to support 1000BASE-X phy interface setting Date: Fri, 22 Apr 2022 15:35:04 +0800 [thread overview] Message-ID: <20220422073505.810084-4-boon.leong.ong@intel.com> (raw) In-Reply-To: <20220422073505.810084-1-boon.leong.ong@intel.com> Currently, intel_speed_mode_2500() redundantly fix-up phy_interface to PHY_INTERFACE_MODE_SGMII if the underlying controller is in 1000Mbps SGMII mode. The value of phy_interface has been initialized earlier. This patch removes such redundancy to prepare for setting 1000BASE-X mode for certain hardware platform configuration. Also update the intel_mgbe_common_data() to include 1000BASE-X setup. Tested-by: Emilio Riva <emilio.riva@ericsson.com> Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index 63754a9c4ba..265d39acdd0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -251,7 +251,6 @@ static void intel_speed_mode_2500(struct net_device *ndev, void *intel_data) priv->plat->mdio_bus_data->xpcs_an_inband = false; } else { priv->plat->max_speed = 1000; - priv->plat->phy_interface = PHY_INTERFACE_MODE_SGMII; priv->plat->mdio_bus_data->xpcs_an_inband = true; } } @@ -561,7 +560,8 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, plat->vlan_fail_q = plat->rx_queues_to_use - 1; /* Intel mgbe SGMII interface uses pcs-xcps */ - if (plat->phy_interface == PHY_INTERFACE_MODE_SGMII) { + if (plat->phy_interface == PHY_INTERFACE_MODE_SGMII || + plat->phy_interface == PHY_INTERFACE_MODE_1000BASEX) { plat->mdio_bus_data->has_xpcs = true; plat->mdio_bus_data->xpcs_an_inband = true; } -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Ong Boon Leong <boon.leong.ong@intel.com> To: Alexandre Torgue <alexandre.torgue@st.com>, Jose Abreu <joabreu@synopsys.com>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, Paolo Abeni <pabeni@redhat.com>, "David S . Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ong Boon Leong <boon.leong.ong@intel.com> Subject: [PATCH net-next 3/4] stmmac: intel: prepare to support 1000BASE-X phy interface setting Date: Fri, 22 Apr 2022 15:35:04 +0800 [thread overview] Message-ID: <20220422073505.810084-4-boon.leong.ong@intel.com> (raw) In-Reply-To: <20220422073505.810084-1-boon.leong.ong@intel.com> Currently, intel_speed_mode_2500() redundantly fix-up phy_interface to PHY_INTERFACE_MODE_SGMII if the underlying controller is in 1000Mbps SGMII mode. The value of phy_interface has been initialized earlier. This patch removes such redundancy to prepare for setting 1000BASE-X mode for certain hardware platform configuration. Also update the intel_mgbe_common_data() to include 1000BASE-X setup. Tested-by: Emilio Riva <emilio.riva@ericsson.com> Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index 63754a9c4ba..265d39acdd0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -251,7 +251,6 @@ static void intel_speed_mode_2500(struct net_device *ndev, void *intel_data) priv->plat->mdio_bus_data->xpcs_an_inband = false; } else { priv->plat->max_speed = 1000; - priv->plat->phy_interface = PHY_INTERFACE_MODE_SGMII; priv->plat->mdio_bus_data->xpcs_an_inband = true; } } @@ -561,7 +560,8 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, plat->vlan_fail_q = plat->rx_queues_to_use - 1; /* Intel mgbe SGMII interface uses pcs-xcps */ - if (plat->phy_interface == PHY_INTERFACE_MODE_SGMII) { + if (plat->phy_interface == PHY_INTERFACE_MODE_SGMII || + plat->phy_interface == PHY_INTERFACE_MODE_1000BASEX) { plat->mdio_bus_data->has_xpcs = true; plat->mdio_bus_data->xpcs_an_inband = true; } -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-04-22 7:40 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-22 7:35 [PATCH net-next 0/4] pcs-xpcs, stmmac: add 1000BASE-X AN for network switch Ong Boon Leong 2022-04-22 7:35 ` Ong Boon Leong 2022-04-22 7:35 ` [PATCH net-next 1/4] net: pcs: xpcs: add CL37 1000BASE-X AN support Ong Boon Leong 2022-04-22 7:35 ` Ong Boon Leong 2022-04-22 8:00 ` Russell King (Oracle) 2022-04-22 8:00 ` Russell King (Oracle) 2022-04-25 3:30 ` Ong, Boon Leong 2022-04-25 3:30 ` Ong, Boon Leong 2022-04-22 17:35 ` kernel test robot 2022-04-22 17:35 ` kernel test robot 2022-04-23 3:00 ` kernel test robot 2022-04-23 3:00 ` kernel test robot 2022-04-22 7:35 ` [PATCH net-next 2/4] net: stmmac: introduce PHY-less setup support Ong Boon Leong 2022-04-22 7:35 ` Ong Boon Leong 2022-04-22 12:58 ` Andrew Lunn 2022-04-22 12:58 ` Andrew Lunn 2022-04-23 1:13 ` Ong, Boon Leong 2022-04-23 1:13 ` Ong, Boon Leong 2022-04-22 7:35 ` Ong Boon Leong [this message] 2022-04-22 7:35 ` [PATCH net-next 3/4] stmmac: intel: prepare to support 1000BASE-X phy interface setting Ong Boon Leong 2022-04-22 7:35 ` [PATCH net-next 4/4] stmmac: intel: introduce platform data phyless setting for Ericsson system Ong Boon Leong 2022-04-22 7:35 ` Ong Boon Leong
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220422073505.810084-4-boon.leong.ong@intel.com \ --to=boon.leong.ong@intel.com \ --cc=alexandre.torgue@foss.st.com \ --cc=alexandre.torgue@st.com \ --cc=andrew@lunn.ch \ --cc=davem@davemloft.net \ --cc=hkallweit1@gmail.com \ --cc=joabreu@synopsys.com \ --cc=kuba@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=linux@armlinux.org.uk \ --cc=mcoquelin.stm32@gmail.com \ --cc=netdev@vger.kernel.org \ --cc=pabeni@redhat.com \ --cc=peppe.cavallaro@st.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.