[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230202125930.271740-9-rakesh.sankaranarayanan@microchip.com>
Date: Thu, 2 Feb 2023 18:29:27 +0530
From: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@...rochip.com>
To: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <andrew@...n.ch>, <f.fainelli@...il.com>, <olteanv@...il.com>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <woojung.huh@...rochip.com>,
<UNGLinuxDriver@...rochip.com>, <linux@...linux.org.uk>
Subject: [RFC PATCH net-next 08/11] net: dsa: microchip: lan937x: avoid mib read for cascaded port
Cascaded port need not be involved in mib read process. Unlike cpu port,
mib read function will be called for all other ports. Add check to skip
function if port is of type DSA_PORT_TYPE_DSA.
Signed-off-by: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@...rochip.com>
---
drivers/net/dsa/microchip/ksz_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 0df71156a540..913296c5dd50 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -2230,7 +2230,8 @@ static void ksz_mib_read_work(struct work_struct *work)
int i;
for (i = 0; i < dev->info->port_cnt; i++) {
- if (dsa_is_unused_port(dev->ds, i))
+ if (dsa_is_unused_port(dev->ds, i) ||
+ dsa_is_dsa_port(dev->ds, i))
continue;
p = &dev->ports[i];
--
2.34.1
Powered by blists - more mailing lists