[RFC,net-next,04/11] net: dsa: microchip: lan937x: update port number for LAN9373

Message ID 20230202125930.271740-5-rakesh.sankaranarayanan@microchip.com
State New
Headers
Series net: dsa: microchip: lan937x: add switch cascade support |

Commit Message

Rakesh Sankaranarayanan Feb. 2, 2023, 12:59 p.m. UTC
  LAN9373 have total 8 physical ports. Update port_cnt member in
ksz_chip_data structure.

Signed-off-by: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com>
---
 drivers/net/dsa/microchip/ksz_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Andrew Lunn Feb. 2, 2023, 3:19 p.m. UTC | #1
On Thu, Feb 02, 2023 at 06:29:23PM +0530, Rakesh Sankaranarayanan wrote:
> LAN9373 have total 8 physical ports. Update port_cnt member in
> ksz_chip_data structure.

This seems more like a fix. Should it be applied to net, not net-next,
and have Fixes: tag?

    Andrew
  
Rakesh Sankaranarayanan Feb. 3, 2023, 10:43 a.m. UTC | #2
Hi Andrew,

On Thu, 2023-02-02 at 16:19 +0100, Andrew Lunn wrote:
> > LAN9373 have total 8 physical ports. Update port_cnt member in
> > ksz_chip_data structure.
> 
> This seems more like a fix. Should it be applied to net, not net-
> next,
> and have Fixes: tag?
> 
>     Andrew

Yes, I will update and send it as separate net patch with fixes tag.

Rakesh S.
  
Vladimir Oltean Feb. 3, 2023, 11:26 p.m. UTC | #3
On Fri, Feb 03, 2023 at 10:43:40AM +0000, Rakesh.Sankaranarayanan@microchip.com wrote:
> Hi Andrew,
> 
> On Thu, 2023-02-02 at 16:19 +0100, Andrew Lunn wrote:
> > > LAN9373 have total 8 physical ports. Update port_cnt member in
> > > ksz_chip_data structure.
> > 
> > This seems more like a fix. Should it be applied to net, not net-
> > next,
> > and have Fixes: tag?
> > 
> >     Andrew
> 
> Yes, I will update and send it as separate net patch with fixes tag.

What's the story here? Arun must have surely known this isn't a 5 port switch?
  
Arun Ramadoss Feb. 6, 2023, 2:38 p.m. UTC | #4
Hi Vladimir,
On Sat, 2023-02-04 at 01:26 +0200, Vladimir Oltean wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Fri, Feb 03, 2023 at 10:43:40AM +0000, 
> Rakesh.Sankaranarayanan@microchip.com wrote:
> > Hi Andrew,
> > 
> > On Thu, 2023-02-02 at 16:19 +0100, Andrew Lunn wrote:
> > > > LAN9373 have total 8 physical ports. Update port_cnt member in
> > > > ksz_chip_data structure.
> > > 
> > > This seems more like a fix. Should it be applied to net, not net-
> > > next,
> > > and have Fixes: tag?
> > > 
> > >     Andrew
> > 
> > Yes, I will update and send it as separate net patch with fixes
> > tag.
> 
> What's the story here? Arun must have surely known this isn't a 5
> port switch?

It was my mistake during replicating the structure for LAN9370 and
LAN9373. I tested the basic switch functionality on LAN9370 and LAN9374
but not LAN9373. LAN9373 Evaluation board available in cascading setup.
When Rakesh brought up the board for cascading, he found out there is
bug. I should have double checked all the structure member before
submitting the patch but I overlooked it.
  

Patch

diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index ada673b6efc6..7062ce1749fb 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -1490,7 +1490,7 @@  const struct ksz_chip_data ksz_switch_chips[] = {
 		.num_alus = 1024,
 		.num_statics = 256,
 		.cpu_ports = 0x38,	/* can be configured as cpu port */
-		.port_cnt = 5,		/* total physical port count */
+		.port_cnt = 8,		/* total physical port count */
 		.port_nirqs = 6,
 		.num_tx_queues = 8,
 		.tc_cbs_supported = true,