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

Rakesh Sankaranarayanan posted 11 patches 3 years, 2 months ago
[RFC PATCH net-next 04/11] net: dsa: microchip: lan937x: update port number for LAN9373
Posted by Rakesh Sankaranarayanan 3 years, 2 months ago
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(-)

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,
-- 
2.34.1
Re: [RFC PATCH net-next 04/11] net: dsa: microchip: lan937x: update port number for LAN9373
Posted by Andrew Lunn 3 years, 2 months ago
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
Re: [RFC PATCH net-next 04/11] net: dsa: microchip: lan937x: update port number for LAN9373
Posted by Rakesh.Sankaranarayanan@microchip.com 3 years, 2 months ago
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.
Re: [RFC PATCH net-next 04/11] net: dsa: microchip: lan937x: update port number for LAN9373
Posted by Vladimir Oltean 3 years, 2 months ago
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?
Re: [RFC PATCH net-next 04/11] net: dsa: microchip: lan937x: update port number for LAN9373
Posted by Arun.Ramadoss@microchip.com 3 years, 2 months ago
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.