linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr
@ 2020-11-06  9:43 Wong Vee Khee
  2020-11-08  0:20 ` patchwork-bot+netdevbpf
  2021-01-16  9:12 ` Jan Kiszka
  0 siblings, 2 replies; 5+ messages in thread
From: Wong Vee Khee @ 2020-11-06  9:43 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Ong Boon Leong, Voon Wei Feng, Wong Vee Khee

From: Voon Weifeng <weifeng.voon@intel.com>

Set all EHL/TGL phy_addr to -1 so that the driver will automatically
detect it at run-time by probing all the possible 32 addresses.

Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
index b6e5e3e36b63..7c1353f37247 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
@@ -236,6 +236,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
 	int ret;
 	int i;
 
+	plat->phy_addr = -1;
 	plat->clk_csr = 5;
 	plat->has_gmac = 0;
 	plat->has_gmac4 = 1;
@@ -345,7 +346,6 @@ static int ehl_sgmii_data(struct pci_dev *pdev,
 			  struct plat_stmmacenet_data *plat)
 {
 	plat->bus_id = 1;
-	plat->phy_addr = 0;
 	plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
 
 	plat->serdes_powerup = intel_serdes_powerup;
@@ -362,7 +362,6 @@ static int ehl_rgmii_data(struct pci_dev *pdev,
 			  struct plat_stmmacenet_data *plat)
 {
 	plat->bus_id = 1;
-	plat->phy_addr = 0;
 	plat->phy_interface = PHY_INTERFACE_MODE_RGMII;
 
 	return ehl_common_data(pdev, plat);
@@ -376,7 +375,6 @@ static int ehl_pse0_common_data(struct pci_dev *pdev,
 				struct plat_stmmacenet_data *plat)
 {
 	plat->bus_id = 2;
-	plat->phy_addr = 1;
 	return ehl_common_data(pdev, plat);
 }
 
@@ -408,7 +406,6 @@ static int ehl_pse1_common_data(struct pci_dev *pdev,
 				struct plat_stmmacenet_data *plat)
 {
 	plat->bus_id = 3;
-	plat->phy_addr = 1;
 	return ehl_common_data(pdev, plat);
 }
 
@@ -450,7 +447,6 @@ static int tgl_sgmii_data(struct pci_dev *pdev,
 			  struct plat_stmmacenet_data *plat)
 {
 	plat->bus_id = 1;
-	plat->phy_addr = 0;
 	plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
 	plat->serdes_powerup = intel_serdes_powerup;
 	plat->serdes_powerdown = intel_serdes_powerdown;
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr
  2020-11-06  9:43 [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr Wong Vee Khee
@ 2020-11-08  0:20 ` patchwork-bot+netdevbpf
  2021-01-16  9:12 ` Jan Kiszka
  1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2020-11-08  0:20 UTC (permalink / raw)
  To: Wong Vee Khee
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, kuba,
	mcoquelin.stm32, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel, boon.leong.ong, weifeng.voon

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Fri,  6 Nov 2020 17:43:41 +0800 you wrote:
> From: Voon Weifeng <weifeng.voon@intel.com>
> 
> Set all EHL/TGL phy_addr to -1 so that the driver will automatically
> detect it at run-time by probing all the possible 32 addresses.
> 
> Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
> 
> [...]

Here is the summary with links:
  - [net-next,1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr
    https://git.kernel.org/netdev/net-next/c/bff6f1db91e3

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr
  2020-11-06  9:43 [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr Wong Vee Khee
  2020-11-08  0:20 ` patchwork-bot+netdevbpf
@ 2021-01-16  9:12 ` Jan Kiszka
  2021-01-17  0:59   ` Jakub Kicinski
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2021-01-16  9:12 UTC (permalink / raw)
  To: Wong Vee Khee, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Ong Boon Leong, Voon Wei Feng

On 06.11.20 10:43, Wong Vee Khee wrote:
> From: Voon Weifeng <weifeng.voon@intel.com>
> 
> Set all EHL/TGL phy_addr to -1 so that the driver will automatically
> detect it at run-time by probing all the possible 32 addresses.
> 
> Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> index b6e5e3e36b63..7c1353f37247 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> @@ -236,6 +236,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
>  	int ret;
>  	int i;
>  
> +	plat->phy_addr = -1;
>  	plat->clk_csr = 5;
>  	plat->has_gmac = 0;
>  	plat->has_gmac4 = 1;
> @@ -345,7 +346,6 @@ static int ehl_sgmii_data(struct pci_dev *pdev,
>  			  struct plat_stmmacenet_data *plat)
>  {
>  	plat->bus_id = 1;
> -	plat->phy_addr = 0;
>  	plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
>  
>  	plat->serdes_powerup = intel_serdes_powerup;
> @@ -362,7 +362,6 @@ static int ehl_rgmii_data(struct pci_dev *pdev,
>  			  struct plat_stmmacenet_data *plat)
>  {
>  	plat->bus_id = 1;
> -	plat->phy_addr = 0;
>  	plat->phy_interface = PHY_INTERFACE_MODE_RGMII;
>  
>  	return ehl_common_data(pdev, plat);
> @@ -376,7 +375,6 @@ static int ehl_pse0_common_data(struct pci_dev *pdev,
>  				struct plat_stmmacenet_data *plat)
>  {
>  	plat->bus_id = 2;
> -	plat->phy_addr = 1;
>  	return ehl_common_data(pdev, plat);
>  }
>  
> @@ -408,7 +406,6 @@ static int ehl_pse1_common_data(struct pci_dev *pdev,
>  				struct plat_stmmacenet_data *plat)
>  {
>  	plat->bus_id = 3;
> -	plat->phy_addr = 1;
>  	return ehl_common_data(pdev, plat);
>  }
>  
> @@ -450,7 +447,6 @@ static int tgl_sgmii_data(struct pci_dev *pdev,
>  			  struct plat_stmmacenet_data *plat)
>  {
>  	plat->bus_id = 1;
> -	plat->phy_addr = 0;
>  	plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
>  	plat->serdes_powerup = intel_serdes_powerup;
>  	plat->serdes_powerdown = intel_serdes_powerdown;
> 

This fixes PHY detection on one of our EHL-based boards. Can this also
be applied to stable 5.10?

Thanks,
Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr
  2021-01-16  9:12 ` Jan Kiszka
@ 2021-01-17  0:59   ` Jakub Kicinski
  2021-01-17 14:28     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2021-01-17  0:59 UTC (permalink / raw)
  To: Jan Kiszka, Greg Kroah-Hartman
  Cc: Wong Vee Khee, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Maxime Coquelin, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel, Ong Boon Leong, Voon Wei Feng,
	stable

On Sat, 16 Jan 2021 10:12:21 +0100 Jan Kiszka wrote:
> On 06.11.20 10:43, Wong Vee Khee wrote:
> > From: Voon Weifeng <weifeng.voon@intel.com>
> > 
> > Set all EHL/TGL phy_addr to -1 so that the driver will automatically
> > detect it at run-time by probing all the possible 32 addresses.
> > 
> > Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
> > Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
> 
> This fixes PHY detection on one of our EHL-based boards. Can this also
> be applied to stable 5.10?

Sure.

Greg, we'd like to request a backport of the following commit to 5.10.

commit bff6f1db91e330d7fba56f815cdbc412c75fe163
Author: Voon Weifeng <weifeng.voon@intel.com>
Date:   Fri Nov 6 17:43:41 2020 +0800

    stmmac: intel: change all EHL/TGL to auto detect phy addr
    
    Set all EHL/TGL phy_addr to -1 so that the driver will automatically
    detect it at run-time by probing all the possible 32 addresses.
    
    Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
    Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
    Link: https://lore.kernel.org/r/20201106094341.4241-1-vee.khee.wong@intel.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>


It's relatively small, and Jan reports it makes his boards detect the
PHY. The change went in via -next and into Linus's tree during the 5.11
merge window.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr
  2021-01-17  0:59   ` Jakub Kicinski
@ 2021-01-17 14:28     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2021-01-17 14:28 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Jan Kiszka, Wong Vee Khee, Giuseppe Cavallaro, Alexandre Torgue,
	Jose Abreu, David S . Miller, Maxime Coquelin, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel, Ong Boon Leong,
	Voon Wei Feng, stable

On Sat, Jan 16, 2021 at 04:59:14PM -0800, Jakub Kicinski wrote:
> On Sat, 16 Jan 2021 10:12:21 +0100 Jan Kiszka wrote:
> > On 06.11.20 10:43, Wong Vee Khee wrote:
> > > From: Voon Weifeng <weifeng.voon@intel.com>
> > > 
> > > Set all EHL/TGL phy_addr to -1 so that the driver will automatically
> > > detect it at run-time by probing all the possible 32 addresses.
> > > 
> > > Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
> > > Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
> > 
> > This fixes PHY detection on one of our EHL-based boards. Can this also
> > be applied to stable 5.10?
> 
> Sure.
> 
> Greg, we'd like to request a backport of the following commit to 5.10.
> 
> commit bff6f1db91e330d7fba56f815cdbc412c75fe163
> Author: Voon Weifeng <weifeng.voon@intel.com>
> Date:   Fri Nov 6 17:43:41 2020 +0800
> 
>     stmmac: intel: change all EHL/TGL to auto detect phy addr
>     
>     Set all EHL/TGL phy_addr to -1 so that the driver will automatically
>     detect it at run-time by probing all the possible 32 addresses.
>     
>     Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
>     Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
>     Link: https://lore.kernel.org/r/20201106094341.4241-1-vee.khee.wong@intel.com
>     Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> 
> 
> It's relatively small, and Jan reports it makes his boards detect the
> PHY. The change went in via -next and into Linus's tree during the 5.11
> merge window.

Now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-17 14:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06  9:43 [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr Wong Vee Khee
2020-11-08  0:20 ` patchwork-bot+netdevbpf
2021-01-16  9:12 ` Jan Kiszka
2021-01-17  0:59   ` Jakub Kicinski
2021-01-17 14:28     ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).