> Hi Microchip,
>
> as ACL based blocking of PTP traffic seems not to work, I tried to install MAC
> based static lookup rules on the switch I successfully managed to block other
> non-PTP traffic, but for PTP the lookup table entry (see below) seems not to
> work. Incoming SYNC messages on port a
> On Thursday, 19 November 2020, 00:40:18 CET, Vladimir Oltean wrote:
> > On Wed, Nov 18, 2020 at 09:30:01PM +0100, Christian Eggers wrote:
> > > This series adds support for PTP to the KSZ956x and KSZ9477 devices.
> > >
> > > There is only little documentation for PTP available on the data sheet
>
> Subject: [PATCH 4/4] net: dsa: microchip: avoid hard-codded port count
>
> Use port_cnt value to disable interrupts on switch reset.
>
> Signed-off-by: Razvan Stefanescu
> ---
> drivers/net/dsa/microchip/ksz9477.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drive
> On 27/08/2019 15:51, Andrew Lunn wrote:
> >
> > On Tue, Aug 27, 2019 at 12:31:09PM +0300, Razvan Stefanescu wrote:
> >> Global Interrupt Mask Register comprises of Lookup Engine (LUE)
> Interrupt
> >> Mask (bit 31) and GPIO Pin Output Trigger and Timestamp Unit Interrupt
> >> Mask (bit 29).
> >>
> Subject: Microchip KSZ* DSA drivers Re: [PATCH v1 RFC 1/1] Add Microchip
> KSZ8795 DSA driver
>
> Hi!
>
> Are there any news here? Is there new release planned? Is there a git
> tree somewhere? I probably should get it working, soon.. so I guess I
> can help with testing.
>
Reviewed patches w
> > +#define KSZ9477_INGRESS_TAG_LEN2
> > +#define KSZ9477_PTP_TAG_LEN4
> > +#define KSZ9477_PTP_TAG_INDICATION 0x80
> > +
> > +#define KSZ9477_TAIL_TAG_OVERRIDE BIT(9)
> > +#define KSZ9477_TAIL_TAG_LOOKUPBIT(10)
> > +
> > +static int ksz9477_get_tag(u8 *tag
> > +static void ksz8795_r_mib_cnt(struct ksz_device *dev, int port, u16 addr,
> > + u64 *cnt)
> > +{
> > + u32 data;
> > + u16 ctrl_addr;
> > + u8 check;
> > + int loop;
> > +
> > + ctrl_addr = addr + SWITCH_COUNTER_NUM * port;
> > + ctrl_addr |= IND_ACC_TABLE(T
> From: tristram...@microchip.com
> > Sent: 06 October 2017 21:33
> > Replace license with GPL.
>
> Don't you need permission from all the people who have updated
> the files in order to make this change?
>
> David
I am a little confused by your comment. The 4 original KSZ9477 DSA
driver
> in previous version I see that transit traffic (ping) goes to cpu,
> then from cpu back to destination port. I.e. it works but with cpu
> involving. Is this version supposed to work like that?
Yes, it works in the old DSA way such that a software bridge is
responsible to forward every packet.
N
From: Tristram Ha
Clean up code according to patch check suggestions.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz_common.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz_common.c
b/drivers/net/dsa/microchip/ksz_common
From: Tristram Ha
This series of patches is to modify the original KSZ9477 DSA driver so
that other KSZ switch drivers can be added and use the common code.
There are several steps to accomplish this achievement. First is to
rename some function names with a prefix to indicate chip specific
fun
From: Tristram Ha
Rename some functions with ksz9477 prefix to separate chip specific code
from common code.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz_common.c | 116 +
1 file changed, 59 insertions(+), 57 deletions(-)
diff --git a/drivers/ne
From: Tristram Ha
Break KSZ9477 DSA driver into two files in preparation to add more KSZ
switch drivers.
Add common functions in ksz_common.h so that other KSZ switch drivers
can access code in ksz_common.c.
Add ksz_spi.h for common functions used by KSZ switch SPI drivers.
Signed-off-by: Tristr
From: Tristram Ha
Add MIB counter reading support.
Rename ksz_9477_reg.h to ksz9477_reg.h for consistency as the product
name is always KSZ.
Header file ksz_priv.h no longer contains any chip specific data.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c|
From: Tristram Ha
Add Microchip KSZ8895 DSA driver.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/Kconfig | 17 +
drivers/net/dsa/microchip/Makefile |2 +
drivers/net/dsa/microchip/ksz8895.c | 1288 +++
drivers/net/dsa/microchip/ksz88
From: Tristram Ha
This patch requires the previous patch for Microchip KSZ8795 DSA driver.
Tristram Ha (1):
Add Microchip KSZ8895 DSA driver.
drivers/net/dsa/microchip/Kconfig | 17 +
drivers/net/dsa/microchip/Makefile |2 +
drivers/net/dsa/microchip/ksz8895.c | 1288 +++
From: Tristram Ha
Add Microchip KSZ8795 DSA driver.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/Kconfig | 17 +
drivers/net/dsa/microchip/Makefile |2 +
drivers/net/dsa/microchip/ksz8795.c | 1372 +++
drivers/net/dsa/microchip/ksz87
From: Tristram Ha
This patch requires the previous patches for Microchip KSZ9477 DSA driver.
v1
- Return error codes instead of numbers
- Add more comments to clarify operation
- Use ksz8795 prefix to indicate KSZ8795 specific code
- Simplify MIB counter reading code
- Switch driver code is not
From: Tristram Ha
Modify tag_ksz.c so that tail tag code can be used by other KSZ switch
drivers.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/Kconfig | 2 +-
drivers/net/dsa/microchip/ksz9477.c | 2 +-
include/net/dsa.h | 2 +-
net/dsa/Kconfig
From: Tristram Ha
Add other KSZ switch support so that patch check does not complain.
Signed-off-by: Tristram Ha
---
Documentation/devicetree/bindings/net/dsa/ksz.txt | 189 --
1 file changed, 136 insertions(+), 53 deletions(-)
diff --git a/Documentation/devicetree/binding
From: Tristram Ha
Replace license with GPL.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz_9477_reg.h | 23 ---
drivers/net/dsa/microchip/ksz_common.c | 23 ---
drivers/net/dsa/microchip/ksz_priv.h | 23 ---
driver
From: Tristram Ha
Rename ksz_spi.c to ksz9477_spi.c and update Kconfig in preparation to add
more KSZ switch drivers.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/Kconfig | 12 ++--
drivers/net/dsa/microchip/Makefile | 4 ++--
drive
> > My concern is if a task is already running with SPI access to a lot
> > of registers like reading the 32 MIB counters in every port of the
> > switch, another register access has to wait until they are finished.
>
> Why does it have to wait? Looking at the code in
> ksz_get_ethtool_stats(), yo
> On Mon 2017-09-18 20:27:13, tristram...@microchip.com wrote:
> > > > +/**
> > > > + * Some counters do not need to be read too often because they are
> less
> > > likely
> > > > + * to increase much.
> > > > + */
> > >
> > > What does comment mean? Are you caching statistics, and updating
> > > d
> > > > > Similar code will be needed by other drivers, right?
> > > >
> > > > Although KSZ8795 and KSZ8895 may use the same code, the other
> > > > chips will have different code.
> > >
> > > Ok, please make sure code is shared between these two.
> >
> > The exact function probably cannot be share
The actual SPI access performance will depend on the SPI host controller.
The SPI access speed, ranging from 12 MHz to 50 MHz depending on the
chip, is a factor but the performance of the SPI host controller is more
important. Generally the SPI host controller scales down the clock by a
factor of
> I am not really sure why this is such a concern for you so soon when
> your driver is not even included yet. You should really aim for baby
> steps here: get the basic driver(s) included, with a limited set of
> features, and gradually add more features to the driver. When
> fwd_offload_mark and
> > In the old DSA implementation all the ports are partitioned into its own
> device
> > and the bridge joining them will do all the forwarding. This is useful for
> quick
> > testing with some protocols like RSTP but it is probably useless for real
> > operation.
>
> It is a good minimal driver
> > > This is ugly. We have a clean separation between a switch driver and a
> > > tag driver. Here you are mixing them together. Don't. Look at the
> > > mailing lists for what Florian and I suggested to Pavel. It will also
> > > solve your include file issue above.
> >
> > It seems to me all tag_
> > +/**
> > + * Some counters do not need to be read too often because they are less
> likely
> > + * to increase much.
> > + */
>
> What does comment mean? Are you caching statistics, and updating
> different values at different rates?
>
There are 34 counters. In normal case using generic bus
Sorry for the late response.
> > diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c index 010ca0a..d5faf14
> 100644
> > --- a/net/dsa/tag_ksz.c
> > +++ b/net/dsa/tag_ksz.c
> > static struct sk_buff *ksz_xmit(struct sk_buff *skb, struct net_device
> *dev) {
> > struct dsa_slave_priv *p = netd
> -Original Message-
> From: Pavel Machek [mailto:pa...@ucw.cz]
> Sent: Friday, September 08, 2017 2:58 PM
> To: Tristram Ha - C24268
> Cc: and...@lunn.ch; muva...@gmail.com; nathan.leigh.con...@gmail.com;
> vivien.dide...@savoirfairelinux.com; f.faine...@gmail.com;
> net...@vger.kernel.org
> -Original Message-
> From: Pavel Machek [mailto:pa...@ucw.cz]
> Sent: Friday, September 08, 2017 1:54 AM
> To: Tristram Ha - C24268
> Cc: and...@lunn.ch; muva...@gmail.com; nathan.leigh.con...@gmail.com;
> vivien.dide...@savoirfairelinux.com; f.faine...@gmail.com;
> net...@vger.kernel.org
> -Original Message-
> From: Florian Fainelli [mailto:f.faine...@gmail.com]
> Sent: Friday, September 08, 2017 12:54 PM
> To: Tristram Ha - C24268; muva...@gmail.com
> Cc: and...@lunn.ch; pa...@ucw.cz; nathan.leigh.con...@gmail.com;
> vivien.dide...@savoirfairelinux.com; net...@vger.kernel.
> -Original Message-
> From: Maxim Uvarov [mailto:muva...@gmail.com]
> Sent: Friday, September 08, 2017 12:00 PM
> To: Florian Fainelli
> Cc: Tristram Ha - C24268; Andrew Lunn; Pavel Machek; Nathan Conrad; Vivien
> Didelot; netdev; linux-kernel@vger.kernel.org; Woojung Huh - C21699
> Subjec
> -Original Message-
> From: Andrew Lunn [mailto:and...@lunn.ch]
> Sent: Friday, September 08, 2017 7:12 AM
> To: Maxim Uvarov
> Cc: Tristram Ha - C24268; Pavel Machek; Nathan Conrad; Vivien Didelot; Florian
> Fainelli; netdev; linux-kernel@vger.kernel.org; Woojung Huh - C21699
> Subject: R
> -Original Message-
> From: Pavel Machek [mailto:pa...@ucw.cz]
> Sent: Friday, September 08, 2017 2:19 AM
> To: Tristram Ha - C24268
> Cc: and...@lunn.ch; muva...@gmail.com; nathan.leigh.con...@gmail.com;
> vivien.dide...@savoirfairelinux.com; f.faine...@gmail.com;
> net...@vger.kernel.org
> -Original Message-
> From: Pavel Machek [mailto:pa...@ucw.cz]
> Sent: Friday, September 08, 2017 2:26 AM
> To: Tristram Ha - C24268
> Cc: and...@lunn.ch; muva...@gmail.com; nathan.leigh.con...@gmail.com;
> vivien.dide...@savoirfairelinux.com; f.faine...@gmail.com;
> net...@vger.kernel.org
> -Original Message-
> From: Andrew Lunn [mailto:and...@lunn.ch]
> Sent: Thursday, September 07, 2017 2:56 PM
> To: Tristram Ha - C24268
> Cc: muva...@gmail.com; pa...@ucw.cz; nathan.leigh.con...@gmail.com;
> vivien.dide...@savoirfairelinux.com; f.faine...@gmail.com;
> net...@vger.kernel.or
> -Original Message-
> From: Andrew Lunn [mailto:and...@lunn.ch]
> Sent: Thursday, September 07, 2017 2:25 PM
> To: Tristram Ha - C24268
> Cc: muva...@gmail.com; pa...@ucw.cz; nathan.leigh.con...@gmail.com;
> vivien.dide...@savoirfairelinux.com; f.faine...@gmail.com;
> net...@vger.kernel.or
> -Original Message-
> From: Andrew Lunn [mailto:and...@lunn.ch]
> Sent: Thursday, September 07, 2017 2:33 PM
> To: Tristram Ha - C24268
> Cc: muva...@gmail.com; pa...@ucw.cz; nathan.leigh.con...@gmail.com;
> vivien.dide...@savoirfairelinux.com; f.faine...@gmail.com;
> net...@vger.kernel.or
From: Tristram Ha
Add KSZ8795 switch support with register definitions.
Signed-off-by: Tristram Ha
---
diff --git a/drivers/net/dsa/microchip/ksz8795.h
b/drivers/net/dsa/microchip/ksz8795.h
new file mode 100644
index 000..005eda5
--- /dev/null
+++ b/drivers/net/dsa/microchip/ksz8795.h
@@ -
From: Tristram Ha
Add KSZ8795 switch support with SPI access.
Signed-off-by: Tristram Ha
---
diff --git a/drivers/net/dsa/microchip/ksz8795_spi.c
b/drivers/net/dsa/microchip/ksz8795_spi.c
new file mode 100644
index 000..0f9c731
--- /dev/null
+++ b/drivers/net/dsa/microchip/ksz8795_spi.c
@@
From: Tristram Ha
Add KSZ8795 switch support with function code.
Signed-off-by: Tristram Ha
---
diff --git a/drivers/net/dsa/microchip/ksz8795.c
b/drivers/net/dsa/microchip/ksz8795.c
new file mode 100644
index 000..e4d4e6a
--- /dev/null
+++ b/drivers/net/dsa/microchip/ksz8795.c
@@ -0,0 +1,
From: Tristram Ha
Add KSZ8795 switch support with SPI access.
Signed-off-by: Tristram Ha
---
diff --git a/drivers/net/dsa/microchip/Makefile
b/drivers/net/dsa/microchip/Makefile
index 0961c30..0d8ba48 100644
--- a/drivers/net/dsa/microchip/Makefile
+++ b/drivers/net/dsa/microchip/Makefile
@@ -
From: Tristram Ha
Add KSZ8795 switch support with SPI access.
Signed-off-by: Tristram Ha
---
diff --git a/drivers/net/dsa/microchip/Kconfig
b/drivers/net/dsa/microchip/Kconfig
index a8b8f59..0b6225e 100644
--- a/drivers/net/dsa/microchip/Kconfig
+++ b/drivers/net/dsa/microchip/Kconfig
@@ -10,3
From: Tristram Ha
This series of patches is to add DSA driver support for KSZ8795 switch.
Previous patches for KSZ9477 have to be applied first before these.
This patch set is against net-next.
drivers/net/dsa/microchip/Kconfig | 18 +
drivers/net/dsa/microchip/Makefile |2 +
From: Tristram Ha
Add other KSZ switches support so that patch check does not complain.
Signed-off-by: Tristram Ha
---
Documentation/devicetree/bindings/net/dsa/ksz.txt | 117 --
1 file changed, 62 insertions(+), 55 deletions(-)
diff --git a/Documentation/devicetree/bindin
From: Tristram Ha
Break ksz_common.c into 2 files so that the common code can be used by other
KSZ switch drivers.
Signed-off-by: Tristram Ha
---
diff --git a/drivers/net/dsa/microchip/Makefile
b/drivers/net/dsa/microchip/Makefile
index ed335e2..0961c30 100644
--- a/drivers/net/dsa/microchip/
From: Tristram Ha
The file ksz_common.c only holds common code used by all KSZ switch drivers.
Signed-off-by: Tristram Ha
---
diff --git a/drivers/net/dsa/microchip/ksz_common.c
b/drivers/net/dsa/microchip/ksz_common.c
index 56cd6d3..bebcc65 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
From: Tristram Ha
SPI driver calls own specific switch register function.
Shutdown callback function is added to reset switch to default state.
Signed-off-by: Tristram Ha
---
diff --git a/drivers/net/dsa/microchip/ksz_spi.c
b/drivers/net/dsa/microchip/ksz_spi.c
index c519469..d03eb83 100644
--
From: Tristram Ha
The header ksz_priv.h is used by all KSZ switch drivers so chip specific data
are removed and commonly used variables are added.
Signed-off-by: Tristram Ha
---
diff --git a/drivers/net/dsa/microchip/ksz_priv.h
b/drivers/net/dsa/microchip/ksz_priv.h
index 2a98dbd..343b509 100
From: Tristram Ha
The KSZ tail tag code can be used by different KSZ switch drivers.
Signed-off-by: Tristram Ha
---
diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c index 010ca0a..d5faf14 100644
--- a/net/dsa/tag_ksz.c
+++ b/net/dsa/tag_ksz.c
@@ -13,35 +13,21 @@
#include
#include
#includ
From: Tristram Ha
This series of patches is to modify the original KSZ9477 DSA driver so that
other KSZ switch drivers can be added and use the common code.
This patch set is against net-next.
drivers/net/dsa/microchip/Makefile |2 +-
drivers/net/dsa/microchip/ksz9477.c| 1317
From: Tristram Ha
Create new ksz9477.c file from original ksz_common.c.
Signed-off-by: Tristram Ha
---
diff --git a/drivers/net/dsa/microchip/ksz9477.c
b/drivers/net/dsa/microchip/ksz9477.c
new file mode 100644
index 000..bc722b4
--- /dev/null
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -
> -Original Message-
> From: Maxim Uvarov [mailto:muva...@gmail.com]
> Sent: Wednesday, September 06, 2017 2:15 AM
> To: Tristram Ha - C24268
> Cc: Pavel Machek; Woojung Huh - C21699; Nathan Conrad; Vivien Didelot;
> Florian Fainelli; netdev; linux-kernel@vger.kernel.org; Andrew Lunn
> Subj
> On Mon 2017-08-28 16:09:27, Andrew Lunn wrote:
> > > I may be confused here, but AFAICT:
> > >
> > > 1) Yes, it has standard layout when accessed over MDIO.
> >
> >
> > Section 4.8 of the datasheet says:
> >
> > All the registers defined in this section can be also accessed
> > via the SP
57 matches
Mail list logo