netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address
@ 2024-07-03 14:57 Christian Eggers
  2024-07-03 14:57 ` [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter Christian Eggers
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Christian Eggers @ 2024-07-03 14:57 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Juergen Beisert,
	Stefan Roese, Juergen Borleis
  Cc: netdev, linux-kernel, Christian Eggers

The 'phy' parameter supplied to lan9303_phy_read/_write was sometimes a
DSA port number and sometimes a PHY address. This isn't a problem as
long as they are equal.  But if the external phy_addr_sel_strap pin is
wired to 'high', the PHY addresses change from 0-1-2 to 1-2-3 (CPU,
slave0, slave1).  In this case, lan9303_phy_read/_write must translate
between DSA port numbers and the corresponding PHY address.

Fixes: a1292595e006 ("net: dsa: add new DSA switch driver for the SMSC-LAN9303")
Signed-off-by: Christian Eggers <ceggers@arri.de>
---
 drivers/net/dsa/lan9303-core.c | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index 02f07b870f10..268949939636 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -1047,31 +1047,31 @@ static int lan9303_get_sset_count(struct dsa_switch *ds, int port, int sset)
 	return ARRAY_SIZE(lan9303_mib);
 }
 
-static int lan9303_phy_read(struct dsa_switch *ds, int phy, int regnum)
+static int lan9303_phy_read(struct dsa_switch *ds, int port, int regnum)
 {
 	struct lan9303 *chip = ds->priv;
 	int phy_base = chip->phy_addr_base;
 
-	if (phy == phy_base)
+	if (port == 0)
 		return lan9303_virt_phy_reg_read(chip, regnum);
-	if (phy > phy_base + 2)
+	if (port > 2)
 		return -ENODEV;
 
-	return chip->ops->phy_read(chip, phy, regnum);
+	return chip->ops->phy_read(chip, phy_base + port, regnum);
 }
 
-static int lan9303_phy_write(struct dsa_switch *ds, int phy, int regnum,
+static int lan9303_phy_write(struct dsa_switch *ds, int port, int regnum,
 			     u16 val)
 {
 	struct lan9303 *chip = ds->priv;
 	int phy_base = chip->phy_addr_base;
 
-	if (phy == phy_base)
+	if (port == 0)
 		return lan9303_virt_phy_reg_write(chip, regnum, val);
-	if (phy > phy_base + 2)
+	if (port > 2)
 		return -ENODEV;
 
-	return chip->ops->phy_write(chip, phy, regnum, val);
+	return chip->ops->phy_write(chip, phy_base + port, regnum, val);
 }
 
 static int lan9303_port_enable(struct dsa_switch *ds, int port,
@@ -1099,7 +1099,7 @@ static void lan9303_port_disable(struct dsa_switch *ds, int port)
 	vlan_vid_del(dsa_port_to_conduit(dp), htons(ETH_P_8021Q), port);
 
 	lan9303_disable_processing_port(chip, port);
-	lan9303_phy_write(ds, chip->phy_addr_base + port, MII_BMCR, BMCR_PDOWN);
+	lan9303_phy_write(ds, port, MII_BMCR, BMCR_PDOWN);
 }
 
 static int lan9303_port_bridge_join(struct dsa_switch *ds, int port,
@@ -1374,8 +1374,6 @@ static const struct dsa_switch_ops lan9303_switch_ops = {
 
 static int lan9303_register_switch(struct lan9303 *chip)
 {
-	int base;
-
 	chip->ds = devm_kzalloc(chip->dev, sizeof(*chip->ds), GFP_KERNEL);
 	if (!chip->ds)
 		return -ENOMEM;
@@ -1385,8 +1383,7 @@ static int lan9303_register_switch(struct lan9303 *chip)
 	chip->ds->priv = chip;
 	chip->ds->ops = &lan9303_switch_ops;
 	chip->ds->phylink_mac_ops = &lan9303_phylink_mac_ops;
-	base = chip->phy_addr_base;
-	chip->ds->phys_mii_mask = GENMASK(LAN9303_NUM_PORTS - 1 + base, base);
+	chip->ds->phys_mii_mask = GENMASK(LAN9303_NUM_PORTS - 1, 0);
 
 	return dsa_register_switch(chip->ds);
 }
-- 
2.43.0


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

* [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter
  2024-07-03 14:57 [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address Christian Eggers
@ 2024-07-03 14:57 ` Christian Eggers
  2024-07-03 16:08   ` Michal Kubiak
                     ` (2 more replies)
  2024-07-03 16:04 ` [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address Michal Kubiak
                   ` (3 subsequent siblings)
  4 siblings, 3 replies; 11+ messages in thread
From: Christian Eggers @ 2024-07-03 14:57 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Juergen Beisert,
	Stefan Roese, Juergen Borleis
  Cc: netdev, linux-kernel, Christian Eggers

Name it 'addr' instead of 'port' or 'phy'.

Signed-off-by: Christian Eggers <ceggers@arri.de>
---
 drivers/net/dsa/lan9303_mdio.c | 8 ++++----
 include/linux/dsa/lan9303.h    | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/dsa/lan9303_mdio.c b/drivers/net/dsa/lan9303_mdio.c
index 167a86f39f27..0ac4857e5ee8 100644
--- a/drivers/net/dsa/lan9303_mdio.c
+++ b/drivers/net/dsa/lan9303_mdio.c
@@ -58,19 +58,19 @@ static int lan9303_mdio_read(void *ctx, uint32_t reg, uint32_t *val)
 	return 0;
 }
 
-static int lan9303_mdio_phy_write(struct lan9303 *chip, int phy, int reg,
+static int lan9303_mdio_phy_write(struct lan9303 *chip, int addr, int reg,
 				  u16 val)
 {
 	struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev);
 
-	return mdiobus_write_nested(sw_dev->device->bus, phy, reg, val);
+	return mdiobus_write_nested(sw_dev->device->bus, addr, reg, val);
 }
 
-static int lan9303_mdio_phy_read(struct lan9303 *chip, int phy,  int reg)
+static int lan9303_mdio_phy_read(struct lan9303 *chip, int addr, int reg)
 {
 	struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev);
 
-	return mdiobus_read_nested(sw_dev->device->bus, phy, reg);
+	return mdiobus_read_nested(sw_dev->device->bus, addr, reg);
 }
 
 static const struct lan9303_phy_ops lan9303_mdio_phy_ops = {
diff --git a/include/linux/dsa/lan9303.h b/include/linux/dsa/lan9303.h
index b4f22112ba75..3ce7cbcc37a3 100644
--- a/include/linux/dsa/lan9303.h
+++ b/include/linux/dsa/lan9303.h
@@ -5,8 +5,8 @@ struct lan9303;
 
 struct lan9303_phy_ops {
 	/* PHY 1 and 2 access*/
-	int	(*phy_read)(struct lan9303 *chip, int port, int regnum);
-	int	(*phy_write)(struct lan9303 *chip, int port,
+	int	(*phy_read)(struct lan9303 *chip, int addr, int regnum);
+	int	(*phy_write)(struct lan9303 *chip, int addr,
 			     int regnum, u16 val);
 };
 
-- 
2.43.0


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

* Re: [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address
  2024-07-03 14:57 [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address Christian Eggers
  2024-07-03 14:57 ` [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter Christian Eggers
@ 2024-07-03 16:04 ` Michal Kubiak
  2024-07-04 14:50 ` Florian Fainelli
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Michal Kubiak @ 2024-07-03 16:04 UTC (permalink / raw)
  To: Christian Eggers
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Juergen Beisert,
	Stefan Roese, Juergen Borleis, netdev, linux-kernel

On Wed, Jul 03, 2024 at 04:57:17PM +0200, Christian Eggers wrote:
> The 'phy' parameter supplied to lan9303_phy_read/_write was sometimes a
> DSA port number and sometimes a PHY address. This isn't a problem as
> long as they are equal.  But if the external phy_addr_sel_strap pin is
> wired to 'high', the PHY addresses change from 0-1-2 to 1-2-3 (CPU,
> slave0, slave1).  In this case, lan9303_phy_read/_write must translate
> between DSA port numbers and the corresponding PHY address.
> 
> Fixes: a1292595e006 ("net: dsa: add new DSA switch driver for the SMSC-LAN9303")
> Signed-off-by: Christian Eggers <ceggers@arri.de>
> ---
>  drivers/net/dsa/lan9303-core.c | 23 ++++++++++-------------
>  1 file changed, 10 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
> index 02f07b870f10..268949939636 100644
> --- a/drivers/net/dsa/lan9303-core.c
> +++ b/drivers/net/dsa/lan9303-core.c
> @@ -1047,31 +1047,31 @@ static int lan9303_get_sset_count(struct dsa_switch *ds, int port, int sset)
>  	return ARRAY_SIZE(lan9303_mib);
>  }
>  
> -static int lan9303_phy_read(struct dsa_switch *ds, int phy, int regnum)
> +static int lan9303_phy_read(struct dsa_switch *ds, int port, int regnum)
>  {
>  	struct lan9303 *chip = ds->priv;
>  	int phy_base = chip->phy_addr_base;
>  
> -	if (phy == phy_base)
> +	if (port == 0)
>  		return lan9303_virt_phy_reg_read(chip, regnum);
> -	if (phy > phy_base + 2)
> +	if (port > 2)
>  		return -ENODEV;
>  
> -	return chip->ops->phy_read(chip, phy, regnum);
> +	return chip->ops->phy_read(chip, phy_base + port, regnum);
>  }
>  
> -static int lan9303_phy_write(struct dsa_switch *ds, int phy, int regnum,
> +static int lan9303_phy_write(struct dsa_switch *ds, int port, int regnum,
>  			     u16 val)
>  {
>  	struct lan9303 *chip = ds->priv;
>  	int phy_base = chip->phy_addr_base;
>  
> -	if (phy == phy_base)
> +	if (port == 0)
>  		return lan9303_virt_phy_reg_write(chip, regnum, val);
> -	if (phy > phy_base + 2)
> +	if (port > 2)
>  		return -ENODEV;
>  
> -	return chip->ops->phy_write(chip, phy, regnum, val);
> +	return chip->ops->phy_write(chip, phy_base + port, regnum, val);
>  }
>  
>  static int lan9303_port_enable(struct dsa_switch *ds, int port,
> @@ -1099,7 +1099,7 @@ static void lan9303_port_disable(struct dsa_switch *ds, int port)
>  	vlan_vid_del(dsa_port_to_conduit(dp), htons(ETH_P_8021Q), port);
>  
>  	lan9303_disable_processing_port(chip, port);
> -	lan9303_phy_write(ds, chip->phy_addr_base + port, MII_BMCR, BMCR_PDOWN);
> +	lan9303_phy_write(ds, port, MII_BMCR, BMCR_PDOWN);
>  }
>  
>  static int lan9303_port_bridge_join(struct dsa_switch *ds, int port,
> @@ -1374,8 +1374,6 @@ static const struct dsa_switch_ops lan9303_switch_ops = {
>  
>  static int lan9303_register_switch(struct lan9303 *chip)
>  {
> -	int base;
> -
>  	chip->ds = devm_kzalloc(chip->dev, sizeof(*chip->ds), GFP_KERNEL);
>  	if (!chip->ds)
>  		return -ENOMEM;
> @@ -1385,8 +1383,7 @@ static int lan9303_register_switch(struct lan9303 *chip)
>  	chip->ds->priv = chip;
>  	chip->ds->ops = &lan9303_switch_ops;
>  	chip->ds->phylink_mac_ops = &lan9303_phylink_mac_ops;
> -	base = chip->phy_addr_base;
> -	chip->ds->phys_mii_mask = GENMASK(LAN9303_NUM_PORTS - 1 + base, base);
> +	chip->ds->phys_mii_mask = GENMASK(LAN9303_NUM_PORTS - 1, 0);
>  
>  	return dsa_register_switch(chip->ds);
>  }
> -- 
> 2.43.0
> 
> 

The patch looks OK.

Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>

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

* Re: [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter
  2024-07-03 14:57 ` [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter Christian Eggers
@ 2024-07-03 16:08   ` Michal Kubiak
  2024-07-04 14:51   ` Florian Fainelli
  2024-07-05  2:20   ` Jakub Kicinski
  2 siblings, 0 replies; 11+ messages in thread
From: Michal Kubiak @ 2024-07-03 16:08 UTC (permalink / raw)
  To: Christian Eggers
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Juergen Beisert,
	Stefan Roese, Juergen Borleis, netdev, linux-kernel

On Wed, Jul 03, 2024 at 04:57:18PM +0200, Christian Eggers wrote:
> Name it 'addr' instead of 'port' or 'phy'.
> 
> Signed-off-by: Christian Eggers <ceggers@arri.de>
> ---
>  drivers/net/dsa/lan9303_mdio.c | 8 ++++----
>  include/linux/dsa/lan9303.h    | 4 ++--
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/dsa/lan9303_mdio.c b/drivers/net/dsa/lan9303_mdio.c
> index 167a86f39f27..0ac4857e5ee8 100644
> --- a/drivers/net/dsa/lan9303_mdio.c
> +++ b/drivers/net/dsa/lan9303_mdio.c
> @@ -58,19 +58,19 @@ static int lan9303_mdio_read(void *ctx, uint32_t reg, uint32_t *val)
>  	return 0;
>  }
>  
> -static int lan9303_mdio_phy_write(struct lan9303 *chip, int phy, int reg,
> +static int lan9303_mdio_phy_write(struct lan9303 *chip, int addr, int reg,
>  				  u16 val)
>  {
>  	struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev);
>  
> -	return mdiobus_write_nested(sw_dev->device->bus, phy, reg, val);
> +	return mdiobus_write_nested(sw_dev->device->bus, addr, reg, val);
>  }
>  
> -static int lan9303_mdio_phy_read(struct lan9303 *chip, int phy,  int reg)
> +static int lan9303_mdio_phy_read(struct lan9303 *chip, int addr, int reg)
>  {
>  	struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev);
>  
> -	return mdiobus_read_nested(sw_dev->device->bus, phy, reg);
> +	return mdiobus_read_nested(sw_dev->device->bus, addr, reg);
>  }
>  
>  static const struct lan9303_phy_ops lan9303_mdio_phy_ops = {
> diff --git a/include/linux/dsa/lan9303.h b/include/linux/dsa/lan9303.h
> index b4f22112ba75..3ce7cbcc37a3 100644
> --- a/include/linux/dsa/lan9303.h
> +++ b/include/linux/dsa/lan9303.h
> @@ -5,8 +5,8 @@ struct lan9303;
>  
>  struct lan9303_phy_ops {
>  	/* PHY 1 and 2 access*/
> -	int	(*phy_read)(struct lan9303 *chip, int port, int regnum);
> -	int	(*phy_write)(struct lan9303 *chip, int port,
> +	int	(*phy_read)(struct lan9303 *chip, int addr, int regnum);
> +	int	(*phy_write)(struct lan9303 *chip, int addr,
>  			     int regnum, u16 val);
>  };
>  
> -- 
> 2.43.0
> 
> 

Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>

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

* Re: [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address
  2024-07-03 14:57 [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address Christian Eggers
  2024-07-03 14:57 ` [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter Christian Eggers
  2024-07-03 16:04 ` [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address Michal Kubiak
@ 2024-07-04 14:50 ` Florian Fainelli
  2024-07-04 17:29 ` Vladimir Oltean
  2024-07-05  2:30 ` patchwork-bot+netdevbpf
  4 siblings, 0 replies; 11+ messages in thread
From: Florian Fainelli @ 2024-07-04 14:50 UTC (permalink / raw)
  To: Christian Eggers, Andrew Lunn, Vladimir Oltean, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Juergen Beisert,
	Stefan Roese, Juergen Borleis
  Cc: netdev, linux-kernel



On 7/3/2024 3:57 PM, Christian Eggers wrote:
> The 'phy' parameter supplied to lan9303_phy_read/_write was sometimes a
> DSA port number and sometimes a PHY address. This isn't a problem as
> long as they are equal.  But if the external phy_addr_sel_strap pin is
> wired to 'high', the PHY addresses change from 0-1-2 to 1-2-3 (CPU,
> slave0, slave1).  In this case, lan9303_phy_read/_write must translate
> between DSA port numbers and the corresponding PHY address.
> 
> Fixes: a1292595e006 ("net: dsa: add new DSA switch driver for the SMSC-LAN9303")
> Signed-off-by: Christian Eggers <ceggers@arri.de>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

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

* Re: [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter
  2024-07-03 14:57 ` [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter Christian Eggers
  2024-07-03 16:08   ` Michal Kubiak
@ 2024-07-04 14:51   ` Florian Fainelli
  2024-07-05  2:20   ` Jakub Kicinski
  2 siblings, 0 replies; 11+ messages in thread
From: Florian Fainelli @ 2024-07-04 14:51 UTC (permalink / raw)
  To: Christian Eggers, Andrew Lunn, Vladimir Oltean, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Juergen Beisert,
	Stefan Roese, Juergen Borleis
  Cc: netdev, linux-kernel



On 7/3/2024 3:57 PM, Christian Eggers wrote:
> Name it 'addr' instead of 'port' or 'phy'.
> 
> Signed-off-by: Christian Eggers <ceggers@arri.de>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

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

* Re: [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address
  2024-07-03 14:57 [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address Christian Eggers
                   ` (2 preceding siblings ...)
  2024-07-04 14:50 ` Florian Fainelli
@ 2024-07-04 17:29 ` Vladimir Oltean
  2024-07-05  2:30 ` patchwork-bot+netdevbpf
  4 siblings, 0 replies; 11+ messages in thread
From: Vladimir Oltean @ 2024-07-04 17:29 UTC (permalink / raw)
  To: Christian Eggers
  Cc: Andrew Lunn, Florian Fainelli, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Juergen Beisert, Stefan Roese,
	Juergen Borleis, netdev, linux-kernel

On Wed, Jul 03, 2024 at 04:57:17PM +0200, Christian Eggers wrote:
> The 'phy' parameter supplied to lan9303_phy_read/_write was sometimes a
> DSA port number and sometimes a PHY address. This isn't a problem as
> long as they are equal.  But if the external phy_addr_sel_strap pin is
> wired to 'high', the PHY addresses change from 0-1-2 to 1-2-3 (CPU,
> slave0, slave1).  In this case, lan9303_phy_read/_write must translate
> between DSA port numbers and the corresponding PHY address.
> 
> Fixes: a1292595e006 ("net: dsa: add new DSA switch driver for the SMSC-LAN9303")
> Signed-off-by: Christian Eggers <ceggers@arri.de>
> ---

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

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

* Re: [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter
  2024-07-03 14:57 ` [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter Christian Eggers
  2024-07-03 16:08   ` Michal Kubiak
  2024-07-04 14:51   ` Florian Fainelli
@ 2024-07-05  2:20   ` Jakub Kicinski
  2024-07-08 12:13     ` Vladimir Oltean
  2 siblings, 1 reply; 11+ messages in thread
From: Jakub Kicinski @ 2024-07-05  2:20 UTC (permalink / raw)
  To: Christian Eggers
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S . Miller,
	Eric Dumazet, Paolo Abeni, Juergen Beisert, Stefan Roese,
	Juergen Borleis, netdev, linux-kernel

On Wed, 3 Jul 2024 16:57:18 +0200 Christian Eggers wrote:
> Name it 'addr' instead of 'port' or 'phy'.

Unfortunately the fix has narrowly missed today's PR.
Please resend this for net-next in a week+.

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

* Re: [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address
  2024-07-03 14:57 [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address Christian Eggers
                   ` (3 preceding siblings ...)
  2024-07-04 17:29 ` Vladimir Oltean
@ 2024-07-05  2:30 ` patchwork-bot+netdevbpf
  4 siblings, 0 replies; 11+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-07-05  2:30 UTC (permalink / raw)
  To: Christian Eggers
  Cc: andrew, f.fainelli, olteanv, davem, edumazet, kuba, pabeni, jbe,
	sr, kernel, netdev, linux-kernel

Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 3 Jul 2024 16:57:17 +0200 you wrote:
> The 'phy' parameter supplied to lan9303_phy_read/_write was sometimes a
> DSA port number and sometimes a PHY address. This isn't a problem as
> long as they are equal.  But if the external phy_addr_sel_strap pin is
> wired to 'high', the PHY addresses change from 0-1-2 to 1-2-3 (CPU,
> slave0, slave1).  In this case, lan9303_phy_read/_write must translate
> between DSA port numbers and the corresponding PHY address.
> 
> [...]

Here is the summary with links:
  - [net,1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address
    https://git.kernel.org/netdev/net/c/0005b2dc43f9
  - [net,2/2] dsa: lan9303: consistent naming for PHY address parameter
    (no matching commit)

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] 11+ messages in thread

* Re: [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter
  2024-07-05  2:20   ` Jakub Kicinski
@ 2024-07-08 12:13     ` Vladimir Oltean
  2024-07-08 16:33       ` Jakub Kicinski
  0 siblings, 1 reply; 11+ messages in thread
From: Vladimir Oltean @ 2024-07-08 12:13 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Christian Eggers, Andrew Lunn, Florian Fainelli, David S . Miller,
	Eric Dumazet, Paolo Abeni, Juergen Beisert, Stefan Roese,
	Juergen Borleis, netdev, linux-kernel

On Thu, Jul 04, 2024 at 07:20:34PM -0700, Jakub Kicinski wrote:
> On Wed, 3 Jul 2024 16:57:18 +0200 Christian Eggers wrote:
> > Name it 'addr' instead of 'port' or 'phy'.
> 
> Unfortunately the fix has narrowly missed today's PR.
> Please resend this for net-next in a week+.

How does this work? You're no longer taking 'net' patches through the
'net' tree in the last week before the net-next pull request?

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

* Re: [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter
  2024-07-08 12:13     ` Vladimir Oltean
@ 2024-07-08 16:33       ` Jakub Kicinski
  0 siblings, 0 replies; 11+ messages in thread
From: Jakub Kicinski @ 2024-07-08 16:33 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: Christian Eggers, Andrew Lunn, Florian Fainelli, David S . Miller,
	Eric Dumazet, Paolo Abeni, Juergen Beisert, Stefan Roese,
	Juergen Borleis, netdev, linux-kernel

On Mon, 8 Jul 2024 15:13:52 +0300 Vladimir Oltean wrote:
> On Thu, Jul 04, 2024 at 07:20:34PM -0700, Jakub Kicinski wrote:
> > On Wed, 3 Jul 2024 16:57:18 +0200 Christian Eggers wrote:  
> > > Name it 'addr' instead of 'port' or 'phy'.  
> > 
> > Unfortunately the fix has narrowly missed today's PR.
> > Please resend this for net-next in a week+.  
> 
> How does this work? You're no longer taking 'net' patches through the
> 'net' tree in the last week before the net-next pull request?

The fix has narrowly missed the PR, IOW patch 1 has missed the PR.
Patch 2 is not a fix.

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

end of thread, other threads:[~2024-07-08 16:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 14:57 [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address Christian Eggers
2024-07-03 14:57 ` [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address parameter Christian Eggers
2024-07-03 16:08   ` Michal Kubiak
2024-07-04 14:51   ` Florian Fainelli
2024-07-05  2:20   ` Jakub Kicinski
2024-07-08 12:13     ` Vladimir Oltean
2024-07-08 16:33       ` Jakub Kicinski
2024-07-03 16:04 ` [PATCH net 1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address Michal Kubiak
2024-07-04 14:50 ` Florian Fainelli
2024-07-04 17:29 ` Vladimir Oltean
2024-07-05  2:30 ` patchwork-bot+netdevbpf

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).