On Thursday, 3 December 2020, 16:52:46 CET, Vladimir Oltean wrote:
> On Thu, 3 Dec 2020 at 17:36, Christian Eggers wrote:
> > Should ptp_sysfs be extended with a "pulse" attribute with calls
> > enable() with only PTP_PEROUT_DUTY_CYCLE set?
>
> Use tools/testing
On Thursday, 3 December 2020, 15:12:55 CET, Richard Cochran wrote:
> On Thu, Dec 03, 2020 at 11:21:17AM +0100, Christian Eggers wrote:
> > The KSZ9563 has a Trigger Output Unit (TOU) which can be used to
> > generate periodic signals.
> >
> > The pulse length can be alt
The KSZ9563 has a Trigger Output Unit (TOU) which can be used to
generate periodic signals.
The pulse length can be altered via a device attribute.
Tested on a Microchip KSZ9563 switch.
Signed-off-by: Christian Eggers
---
Changes in v4:
--
- 80 chars per line
- reverse christmas
this
field is negative.
Of course, the UDP checksums (if any) have to be corrected after this
(for both directions).
Everything has been tested on a Microchip KSZ9563 switch.
Signed-off-by: Christian Eggers
---
Changes in v5:
--
- Fix compile error reported by kernel test robot
details:
https://patchwork.ozlabs.org/project/netdev/patch/20201019172435.4416-8-cegg...@arri.de/
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
Changes in v4:
--
- Remove useless case statement
- Reviewed-by: Vladimir Oltean
drivers/net/dsa/microchip/ksz9477_main.c
tail-tag is set to zero) or move the value from
the correction field back to the tail-tag.
Changing the correction field requires updating the UDP checksum (if UDP
is used as transport).
Signed-off-by: Christian Eggers
---
include/linux/ptp_classify.h | 73
1
Implement routines (adjfine, adjtime, gettime and settime) for
manipulating the chip's PTP clock.
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
drivers/net/dsa/microchip/Kconfig| 8 +
drivers/net/dsa/microchip/Makefile | 1 +
drivers/net/dsa/micr
The next patch will add basic interrupt support. Chip reset must be
performed before requesting the IRQ, so move this from ksz9477_setup()
to ksz9477_init().
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
drivers/net/dsa/microchip/ksz9477_main.c | 15 +++
1 file
Interrupts are required for TX time stamping. Probably they could also
be used for PHY connection status.
This patch only adds the basic infrastructure for interrupts, no
interrupts are finally enabled nor handled.
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
Changes in v4
The devices have an optional interrupt line.
Signed-off-by: Christian Eggers
---
.../devicetree/bindings/net/dsa/microchip,ksz.yaml | 7 +++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
b/Documentation/devicetree
[1]
http://ww1.microchip.com/downloads/en/DeviceDoc/KSZ9563R-Data-Sheet-DS2419D.pdf
Changes from v4 --> v5
[8/9]- Fix compile error reported by kernel test robot
(NET_DSA_TAG_KSZ must select NET_PTP_CLASSIFY)
Changes from v3 --> v4
-
PTP functionality will be built into a separate source file
(ksz9477_ptp.c).
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
drivers/net/dsa/microchip/Makefile | 1 +
drivers/net/dsa/microchip/{ksz9477.c => ksz9477_main.c} | 0
2 files changed, 1 insert
The KSZ9563 has a Trigger Output Unit (TOU) which can be used to
generate periodic signals.
The pulse length can be altered via a device attribute.
Tested on a Microchip KSZ9563 switch.
Signed-off-by: Christian Eggers
---
Changes in v4:
--
- 80 chars per line
- reverse christmas
this
field is negative.
Of course, the UDP checksums (if any) have to be corrected after this
(for both directions).
Everything has been tested on a Microchip KSZ9563 switch.
Signed-off-by: Christian Eggers
---
Changes in v4:
--
- s/low active/active low/
- 80 chars per line
- Use IEEE
details:
https://patchwork.ozlabs.org/project/netdev/patch/20201019172435.4416-8-cegg...@arri.de/
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
Changes in v4:
--
- Remove useless case statement
- Reviewed-by: Vladimir Oltean
drivers/net/dsa/microchip/ksz9477_main.c
tail-tag is set to zero) or move the value from
the correction field back to the tail-tag.
Changing the correction field requires updating the UDP checksum (if UDP
is used as transport).
Signed-off-by: Christian Eggers
---
include/linux/ptp_classify.h | 73
1
Implement routines (adjfine, adjtime, gettime and settime) for
manipulating the chip's PTP clock.
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
drivers/net/dsa/microchip/Kconfig| 8 +
drivers/net/dsa/microchip/Makefile | 1 +
drivers/net/dsa/micr
Interrupts are required for TX time stamping. Probably they could also
be used for PHY connection status.
This patch only adds the basic infrastructure for interrupts, no
interrupts are finally enabled nor handled.
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
Changes in v4
The next patch will add basic interrupt support. Chip reset must be
performed before requesting the IRQ, so move this from ksz9477_setup()
to ksz9477_init().
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
drivers/net/dsa/microchip/ksz9477_main.c | 15 +++
1 file
PTP functionality will be built into a separate source file
(ksz9477_ptp.c).
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
drivers/net/dsa/microchip/Makefile | 1 +
drivers/net/dsa/microchip/{ksz9477.c => ksz9477_main.c} | 0
2 files changed, 1 insert
The devices have an optional interrupt line.
Signed-off-by: Christian Eggers
---
.../devicetree/bindings/net/dsa/microchip,ksz.yaml | 7 +++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
b/Documentation/devicetree
There is only little documentation for PTP available on the data sheet
[1] (more or less only the register reference). Questions to the
Microchip support were seldom answered comprehensively or in reasonable
time. So this is more or less the result of reverse engineering.
[1]
http://ww1.microchip.
ALU_VAL_C0100 FID 0 MAC_0_1
01:00
ALU_VAL_D5E000181 MAC_2_55E:00:01:81
On Wednesday, 25 November 2020, 22:08:39 CET, Christian Eggers wrote:
> I need some help from Microchip, please read below.
>
> On Thursday, 19 November
I need some help from Microchip, please read below.
On Thursday, 19 November 2020, 19:51:15 CET, tristram...@microchip.com wrote:
> There is one more requirement that is a little difficult to do. The
> calculated peer delay
> needs to be programmed in hardware register, but the regular PTP stack
Use recently introduced PTP_MSGTYPE_SYNC and PTP_MSGTYPE_DELAY_REQ
defines instead of a driver internal enumeration.
Signed-off-by: Christian Eggers
Reviewed-by: Antoine Tenart
Cc: Antoine Tenart
---
drivers/net/phy/mscc/mscc_ptp.c | 14 +++---
drivers/net/phy/mscc/mscc_ptp.h | 5
Use recently introduced PTP wide defines instead of a driver internal
enumeration.
Signed-off-by: Christian Eggers
Reviewed-by: Ido Schimmel
Cc: Petr Machata
Cc: Jiri Pirko
Cc: Ido Schimmel
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 8
drivers/net/ethernet/mellanox
Replace use of magic number with recently introduced define.
Signed-off-by: Christian Eggers
Cc: Kurt Kanzenbach
---
drivers/net/phy/dp83640.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index f2caccaf4408
driver internal enumeration / uses of magic
numbers with the newly introduced PTP_MSGTYPE_* defines.
On Friday, 20 November 2020, 23:39:10 CET, Vladimir Oltean wrote:
> On Fri, Nov 20, 2020 at 09:41:03AM +0100, Christian Eggers wrote:
> > This series introduces commen defines for PTP event
Use recently introduced PTP_MSGTYPE_SYNC and PTP_MSGTYPE_DELAY_REQ
defines instead of a driver internal enumeration.
Signed-off-by: Christian Eggers
Cc: Quentin Schulz
Cc: Antoine Tenart
Cc: Antoine Tenart
---
drivers/net/phy/mscc/mscc_ptp.c | 14 +++---
drivers/net/phy/mscc
Use recently introduced PTP wide defines instead of a driver internal
enumeration.
Signed-off-by: Christian Eggers
Cc: Petr Machata
Cc: Jiri Pirko
Cc: Ido Schimmel
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 8
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 7
Replace use of magic number with recently introduced define.
Signed-off-by: Christian Eggers
Cc: Kurt Kanzenbach
---
drivers/net/phy/dp83640.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index f2caccaf4408
This series replaces further driver internal enumeration / uses of magic
numbers with the newly introduced PTP_MSGTYPE_* defines.
On Friday, 20 November 2020, 23:39:10 CET, Vladimir Oltean wrote:
> On Fri, Nov 20, 2020 at 09:41:03AM +0100, Christian Eggers wrote:
> > This series introduc
This should be done in the device driver instead of the device tree.
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz8795_spi.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/dsa/microchip/ksz8795_spi.c
b/drivers/net/dsa/microchip/ksz8795_spi.c
index
This should be done in the device driver instead of the device tree.
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz9477_spi.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/dsa/microchip/ksz9477_spi.c
b/drivers/net/dsa/microchip/ksz9477_spi.c
index
The dsa.yaml device tree binding allows "ethernet-ports" (preferred) and
"ports".
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
drivers/net/dsa/microchip/ksz_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drive
Convert the bindings document for Microchip KSZ Series Ethernet switches
from txt to yaml. Removed spi-cpha and spi-cpol flags is this should be
handled by the device driver.
Signed-off-by: Christian Eggers
---
.../devicetree/bindings/net/dsa/ksz.txt | 125 ---
.../bindings
These patches are orginally from the series
"net: dsa: microchip: PTP support for KSZ956x"
As the the device tree conversion to yaml is not really related to the
PTP patches and the original series is going to take more time than
I expected, I would like to split this.
Changes (original series -
Remove driver internal defines for this. Masking msgtype with 0xf is
already done within ptp_get_msgtype().
Signed-off-by: Christian Eggers
Cc: Richard Cochran
Cc: Kurt Kanzenbach
---
drivers/ptp/ptp_ines.c | 19 +++
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git
Remove usage of magic numbers.
Signed-off-by: Christian Eggers
Cc: Ioana Ciornei
Cc: Ioana Radulescu
Cc: Yangbo Lu
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
b
Using PTP wide defines will obsolete different driver internal defines
and uses of magic numbers.
Signed-off-by: Christian Eggers
Cc: Kurt Kanzenbach
---
include/linux/ptp_classify.h | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/linux/ptp_classify.h b
This series introduces commen defines for PTP event messages. Driver
internal defines are removed and some uses of magic numbers are replaced
by the new defines.
Changes v2 --> v3
--
- extend commit description for ptp_ines (Jacob Keller)
Changes v1 --> v2
--
- use
On Thursday, 19 November 2020, 14:48:01 CET, Rob Herring wrote:
> On Wed, Nov 18, 2020 at 09:30:02PM +0100, Christian Eggers wrote:
> > Convert the bindings document for Microchip KSZ Series Ethernet switches
> > from txt to yaml.
> >
> > Sign
Hi Tristram,
thank you for joining this thread.
On Thursday, 19 November 2020, 19:51:15 CET, tristram...@microchip.com wrote:
> > On Thursday, 19 November 2020, 00:40:18 CET, Vladimir Oltean wrote:
> > > On Wed, Nov 18, 2020 at 09:30:01PM +0100, Christi
If dsa_switch_ops::port_txtstamp() returns false, clone will be freed
immediately. Shouldn't store a pointer to freed memory.
Signed-off-by: Christian Eggers
Fixes: 146d442c2357 ("net: dsa: Keep a pointer to the skb clone for TX
timestamping")
---
Changes since v1:
- Fixed &q
Hi Vladimir,
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
On Wednesday, 18 November 2020, 22:03:56 CET, Jacob Keller wrote:
> On 11/18/2020 8:22 AM, Christian Eggers wrote:
> > Remove driver internal defines for this.
> >
> > Signed-off-by: Christian Eggers
> > Cc: Richard Cochran
> > Cc: Kurt Kanzenbach
> > --
On Thursday, 19 November 2020, 00:33:57 CET, Vladimir Oltean wrote:
> On Wed, Nov 18, 2020 at 04:43:35PM +0100, Christian Eggers wrote:
> > If dsa_switch_ops::port_txtstamp() returns false, clone will be freed
> > immediately. Storing the pointer in DSA_SKB_CB(skb)->clone an
The KSZ9563 has a Trigger Output Unit (TOU) which can be used to
generate periodic signals.
The pulse length can be altered via a device attribute.
Tested on a Microchip KSZ9563 switch.
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz9477_ptp.c | 197
The KSZ9563 has a Trigger Output Unit (TOU) which can be used to
generate periodic signals.
After adjusting the PTP clock time, the PPS signal has to be restarted.
Tested on a Microchip KSZ9563 switch.
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz9477_ptp.c | 251
an invalid UDP checksum if this
field is negative.
Of course, the UDP checksums (if any) have to be corrected after this
(for both directions).
Everything has been tested on a Microchip KSZ9563 switch.
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz9477_main.c | 12
details:
https://patchwork.ozlabs.org/project/netdev/patch/20201019172435.4416-8-cegg...@arri.de/
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz9477_main.c | 6 +
drivers/net/dsa/microchip/ksz9477_ptp.c | 187 +++
drivers/net/dsa/microchip/ksz9477_ptp.h | 22
tail-tag is set to zero) or move the value from
the correction field back to the tail-tag.
Changing the correction field requires updating the UDP checksum (if UDP
is used as transport).
Signed-off-by: Christian Eggers
---
include/linux/ptp_classify.h | 73
1
Implement routines (adjfine, adjtime, gettime and settime) for
manipulating the chip's PTP clock.
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/Kconfig| 8 +
drivers/net/dsa/microchip/Makefile | 1 +
drivers/net/dsa/microchip/ksz9477_i2c.c | 2 +-
dr
Interrupts are required for TX time stamping. Probably they could also
be used for PHY connection status.
This patch only adds the basic infrastructure for interrupts, no
interrupts are finally enabled nor handled.
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz9477_i2c.c
The next patch will add basic interrupt support. Chip reset must be
performed before requesting the IRQ, so move this from ksz9477_setup()
to ksz9477_init().
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz9477_main.c | 15 +++
1 file changed, 7 insertions(+), 8
The devices have an optional interrupt line.
Signed-off-by: Christian Eggers
---
.../devicetree/bindings/net/dsa/microchip,ksz.yaml | 7 +++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
b/Documentation/devicetree
PTP functionality will be built into a separate source file
(ksz9477_ptp.c).
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
drivers/net/dsa/microchip/Makefile | 1 +
drivers/net/dsa/microchip/{ksz9477.c => ksz9477_main.c} | 0
2 files changed, 1 insert
The dsa.yaml device tree binding allows "ethernet-ports" (preferred) and
"ports".
Signed-off-by: Christian Eggers
Reviewed-by: Vladimir Oltean
---
drivers/net/dsa/microchip/ksz_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drive
Convert the bindings document for Microchip KSZ Series Ethernet switches
from txt to yaml.
Signed-off-by: Christian Eggers
---
.../devicetree/bindings/net/dsa/ksz.txt | 125 --
.../bindings/net/dsa/microchip,ksz.yaml | 152 ++
MAINTAINERS
This series adds support for PTP to the KSZ956x and KSZ9477 devices.
There is only little documentation for PTP available on the data sheet
[1] (more or less only the register reference). Questions to the
Microchip support were seldom answered comprehensively or in reasonable
time. So this is more
Remove driver internal defines for this.
Signed-off-by: Christian Eggers
Cc: Richard Cochran
Cc: Kurt Kanzenbach
---
drivers/ptp/ptp_ines.c | 19 +++
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/drivers/ptp/ptp_ines.c b/drivers/ptp/ptp_ines.c
index
Remove usage of magic numbers.
Signed-off-by: Christian Eggers
Cc: Ioana Ciornei
Cc: Ioana Radulescu
Cc: Yangbo Lu
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
b
Using PTP wide defines will obsolete different driver internal defines
and uses of magic numbers.
Signed-off-by: Christian Eggers
Cc: Kurt Kanzenbach
---
include/linux/ptp_classify.h | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/linux/ptp_classify.h b
This series introduces commen defines for PTP event messages. Driver
internal defines are removed and some uses of magic numbers are replaced
by the new defines.
If dsa_switch_ops::port_txtstamp() returns false, clone will be freed
immediately. Storing the pointer in DSA_SKB_CB(skb)->clone anyway,
supports annoying use-after-free bugs.
Signed-off-by: Christian Eggers
Fixes 146d442c2357 ("net: dsa: Keep a pointer to the skb clone for TX
time
Use new return type of ptp_get_msgtype(). Remove driver internal defines
for this.
Signed-off-by: Christian Eggers
Cc: Richard Cochran
Cc: Kurt Kanzenbach
---
drivers/ptp/ptp_ines.c | 25 ++---
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/drivers/ptp
Use new return type of ptp_get_msgtype(). Remove usage of magic numbers.
Signed-off-by: Christian Eggers
Cc: Ioana Ciornei
Cc: Ioana Radulescu
Cc: Yangbo Lu
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a
Use new return type of ptp_get_msgtype(). Remove usage of magic number.
Signed-off-by: Christian Eggers
Cc: Richard Cochran
Cc: Kurt Kanzenbach
---
drivers/net/phy/dp83640.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/phy/dp83640.c b/drivers/net
Using a PTP wide enum will obsolete different driver internal defines
and uses of magic numbers.
Signed-off-by: Christian Eggers
Cc: Kurt Kanzenbach
---
include/linux/ptp_classify.h | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/include/linux
On Thursday, 12 November 2020, 16:28:44 CET, Christian Eggers wrote:
> Hi Vladimir,
>
> On Tuesday, 10 November 2020, 20:32:45 CET, Vladimir Oltean wrote:
> > But something is still wrong if you need to special-case the negative
> > correctionField, it looks like the arithmet
On Monday, 16 November 2020, 15:37:20 CET, Rob Herring wrote:
> On Thu, 12 Nov 2020 16:35:27 +0100, Christian Eggers wrote:
> > Convert the bindings document for Microchip KSZ Series Ethernet switches
> > from txt to yaml.
> >
> > Signed-off-by: Christian Eggers
>
On Friday, 13 November 2020, 17:56:34 CET, Christian Eggers wrote:
> On Friday, 13 November 2020, 00:02:54 CET, Vladimir Oltean wrote:
> > On Thu, Nov 12, 2020 at 04:35:29PM +0100, Christian Eggers wrote:
> > > Parts of ksz_common.h (struct ksz_device) will be required in
>
On Friday, 13 November 2020, 03:40:20 CET, Vladimir Oltean wrote:
> On Thu, Nov 12, 2020 at 04:35:35PM +0100, Christian Eggers wrote:
[...]
> > @@ -103,6 +108,10 @@ static int ksz9477_ptp_adjtime(struct ptp_clock_info
> > *ptp, s64 delta)>
> > if (ret)
>
On Friday, 13 November 2020, 01:51:24 CET, Vladimir Oltean wrote:
> On Thu, Nov 12, 2020 at 04:35:34PM +0100, Christian Eggers wrote:
> > This function subtracts the ingress hardware time stamp from the
> > correction field of a PTP header and updates the UDP checksum (if UDP
On Friday, 13 November 2020, 00:26:17 CET, Vladimir Oltean wrote:
> On Thu, Nov 12, 2020 at 04:35:32PM +0100, Christian Eggers wrote:
> > Interrupts are required for TX time stamping. Probably they could also
> > be used for PHY connection status.
>
> Do the KSZ switches have
On Friday, 13 November 2020, 00:07:32 CET, Vladimir Oltean wrote:
> On Thu, Nov 12, 2020 at 04:35:31PM +0100, Christian Eggers wrote:
> > The devices have an optional interrupt line.
> >
> > Signed-off-by: Christian Eggers
> > ---
> >
> > .../devicet
On Friday, 13 November 2020, 00:02:54 CET, Vladimir Oltean wrote:
> On Thu, Nov 12, 2020 at 04:35:29PM +0100, Christian Eggers wrote:
> > Parts of ksz_common.h (struct ksz_device) will be required in
> > net/dsa/tag_ksz.c soon. So move the relevant parts into a new header
> >
The KSZ9563 has a Trigger Output Unit (TOU) which can be used to
generate periodic signals.
The pulse length can be altered via a device attribute.
Tested on a Microchip KSZ9563 switch.
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz9477_ptp.c | 197
The KSZ9563 has a Trigger Output Unit (TOU) which can be used to
generate periodic signals.
After adjusting the PTP clock time, the PPS signal has to be restarted.
Tested on a Microchip KSZ9563 switch.
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz9477_ptp.c | 251
ative values on this field.
Of course, the UDP checksums (if any) have to be corrected after this
(for both directions).
Everything has been tested on a Microchip KSZ9563 switch.
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz9477_main.c | 9 +-
drivers/net/dsa/micr
.
Signed-off-by: Christian Eggers
---
include/linux/ptp_classify.h | 97
1 file changed, 97 insertions(+)
diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h
index 56b2d7d66177..f27b512e1abd 100644
--- a/include/linux/ptp_classify.h
+++ b
Implement routines (adjfine, adjtime, gettime and settime) for
manipulating the chip's PTP clock.
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/Kconfig| 9 +
drivers/net/dsa/microchip/Makefile | 1 +
drivers/net/dsa/microchip/ksz9477_i2c.c | 2 +-
dr
() instead of ksz9477_setup()).
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz9477_i2c.c | 2 +
drivers/net/dsa/microchip/ksz9477_main.c | 103 +--
drivers/net/dsa/microchip/ksz9477_spi.c | 2 +
include/linux/dsa/ksz_common.h | 1 +
4 files
The devices have an optional interrupt line.
Signed-off-by: Christian Eggers
---
.../devicetree/bindings/net/dsa/microchip,ksz.yaml| 8
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
b/Documentation/devicetree
PTP functionality will be built into a separate source file
(ksz9477_ptp.c).
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/Makefile | 1 +
drivers/net/dsa/microchip/{ksz9477.c => ksz9477_main.c} | 0
2 files changed, 1 insertion(+)
rename drivers/net/
Parts of ksz_common.h (struct ksz_device) will be required in
net/dsa/tag_ksz.c soon. So move the relevant parts into a new header
file.
Signed-off-by: Christian Eggers
---
MAINTAINERS| 1 +
drivers/net/dsa/microchip/ksz_common.h | 81 +-
include
The dsa.yaml device tree binding allows "ethernet-ports" (preferred) and
"ports".
Signed-off-by: Christian Eggers
---
drivers/net/dsa/microchip/ksz_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/microchip/ksz_common.c
b/drive
Convert the bindings document for Microchip KSZ Series Ethernet switches
from txt to yaml.
Signed-off-by: Christian Eggers
---
.../devicetree/bindings/net/dsa/ksz.txt | 125 ---
.../bindings/net/dsa/microchip,ksz.yaml | 150 ++
MAINTAINERS
There is only little documentation for PTP available on the data sheet
[1] (more or less only the register reference). Questions to the
Microchip support were seldom answered comprehensively or in reasonable
time. So this is more or less the result of reverse engineering.
[1]
http://ww1.microchip.
Hi Vladimir,
On Tuesday, 10 November 2020, 20:32:45 CET, Vladimir Oltean wrote:
> But something is still wrong if you need to special-case the negative
> correctionField, it looks like the arithmetic is not done on the correct
> number of bits, either by the driver or by the hardware.
I got it! Th
Hi,
sorry for asking "user" questions directly to developers. But I didn't find a
better place for asking.
I own a "hp zbook thunderbolt 3 dock". This docking station has 2 thunderbolt
connectors, the first (primary?) is connected to my personal laptop and the
other port I use for my company's la
Hi Vladimir,
On Tuesday, 10 November 2020, 20:32:45 CET, Vladimir Oltean wrote:
> On Tue, Nov 10, 2020 at 06:40:45PM +0200, Vladimir Oltean wrote:
> > I am fairly confident that this is how your hardware works, because
> > that's also how peer delay wants to be timestamped, it seems.
>
> So I was
Hi Vladimir,
On Tuesday, 10 November 2020, 20:32:45 CET, Vladimir Oltean wrote:
> On Tue, Nov 10, 2020 at 06:40:45PM +0200, Vladimir Oltean wrote:
> > I am fairly confident that this is how your hardware works, because
> > that's also how peer delay wants to be timestamped, it seems.
>
> So I was
On Tuesday, 10 November 2020, 02:42:34 CET, Vladimir Oltean wrote:
> Sorry for getting back late to you. It did not compute when I read your
> email the first time around, then I let it sit for a while.
>
> On Thu, Nov 05, 2020 at 09:18:04PM +0100, Christian Eggers wrote:
> > un
Hi Vladimir,
On Thursday, 22 October 2020, 13:32:43 CET, Vladimir Oltean wrote:
> On Thu, Oct 22, 2020 at 01:11:40PM +0200, Christian Eggers wrote:
> > On Thursday, 22 October 2020, 12:50:14 CEST, Vladimir Oltean wrote:
> > after applying the RX timestamp correctly to the c
On Monday, 2 November 2020, 00:41:49 CET, Vladimir Oltean wrote:
> On Sun, Nov 01, 2020 at 11:14:24PM +0100, Christian Eggers wrote:
> > My assumption is that the KSZ9563 simply doesn't forward specific PTP
> > packages from the slave ports to the CPU port. In my imagination
On Sunday, 1 November 2020, 12:10:08 CET, Vladimir Oltean wrote:
> On Sun, Nov 01, 2020 at 10:35:01AM +0100, Christian Eggers wrote:
> > Hi Vladimir,
> >
> > On Friday, 30 October 2020, 19:24:47 CET, Vladimir Oltean wrote:
> > > On Thu, Oct 22, 2020 at 12:17:48PM
Hi Vladimir,
On Friday, 30 October 2020, 19:24:47 CET, Vladimir Oltean wrote:
> On Thu, Oct 22, 2020 at 12:17:48PM +0200, Christian Eggers wrote:
> > I tried to study the effect of setting the ocmode bit on the KSZ either to
> > master or to slave. The main visible change is
et options). ptp4l complains with "missing timestamp on transmitted
peer delay request" because the wrong format is received (and
discarded).
Fixes: 887feae36aee ("socket: Add SO_TIMESTAMP[NS]_NEW")
Signed-off-by: Christian Eggers
Acked-by: Willem de Bruijn
Acked-by: Deepa Din
_timer().
2. Only queue delayed work in ksz_mac_link_down() if init is completed.
3. Queue work once in ksz_switch_register(), after dsa_register_switch()
has completed.
Fixes: 7c6ff470aa86 ("net: dsa: microchip: add MIB counter reading support")
Signed-off-by: Christian Eggers
Reviewed-
1 - 100 of 145 matches
Mail list logo