mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Arun.Ramadoss@microchip.com>
To: <olteanv@gmail.com>
Cc: <andrew@lunn.ch>, <linux-kernel@vger.kernel.org>,
	<UNGLinuxDriver@microchip.com>, <vivien.didelot@gmail.com>,
	<linux@armlinux.org.uk>, <ceggers@arri.de>,
	<Tristram.Ha@microchip.com>, <f.fainelli@gmail.com>,
	<kuba@kernel.org>, <edumazet@google.com>, <pabeni@redhat.com>,
	<richardcochran@gmail.com>, <netdev@vger.kernel.org>,
	<Woojung.Huh@microchip.com>, <davem@davemloft.net>,
	<b.hutchman@gmail.com>
Subject: Re: [RFC Patch net-next 0/6] net: dsa: microchip: add gPTP support for LAN937x switch
Date: Tue, 18 Oct 2022 13:42:41 +0000	[thread overview]
Message-ID: <d8459511785de2f6d503341ce5f87c6e6064d7b5.camel@microchip.com> (raw)
In-Reply-To: <20221018102924.g2houe3fz6wxlril@skbuf>

On Tue, 2022-10-18 at 13:29 +0300, Vladimir Oltean wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Tue, Oct 18, 2022 at 06:44:04AM +0000, Arun.Ramadoss@microchip.com
>  wrote:
> > I had developed this patch set to add gPTP support for LAN937x
> > based on
> > the Christian eggers patch for KSZ9563. Initially I thought of
> > keeping
> > implementation specific to LAN937x through lan937x_ptp.c files.
> > Since
> > the register sets are same for LAN937x/KSZ9563, I developed using
> > ksz_ptp.c so that in future Christain eggers patch can be merged to
> > it
> > to support the 1 step clock support.
> > I read the Hardware errata of KSZ95xx on 2 step clock and found
> > that it
> > was fixed in LAN937x switches. If this is case, Do I need to move
> > this
> > 2 step timestamping specific to LAN937x as LAN937x_ptp.c & not
> > claim
> > for ksz9563 or common implementation in ksz_ptp.c & export the
> > functionality based on chip-id in get_ts_info dsa hooks.
> 
> The high-level visible behavior needs to be that the kernel denies
> hardware timestamping from being enabled on the platforms on which it
> does not work (this includes platforms on which it is conveniently
> "not tested" by Microchip engineers, despite there being published
> errata stating it doesn't work). Then, the code organization needs to
> be
> such that if anyone wants to add one step TX timestamping to
> KSZ9477/KSZ9563
> as a workaround later, the code reuse is close to maximal without
> further refactoring. And there should be plenty of reuse beyond the
> TX
> timestamping procedure.
> 
> I expect that Christian will also be able to find some time to review
> this RFC and propose some changes/ask some questions based on his
> prior
> observations, at least so he said privately.

Thanks Vladimir. I will wait for Christian feedback.

Hi Christian,
To test this patch on KSZ9563, we need to increase the number of
interrupts port_nirqs in KSZ9893 from 2 to 3. Since the chip id of
KSZ9893 and KSZ9563 are same, I had reused the ksz_chip_data same for
both chips. But this chip differ with number of port interrupts. So we
need to update it. We are generating a new patch for adding the new
element in the ksz_chip_data for KSZ9563.
For now, you can update the code as below for testing the patch

-- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -1266,7 +1266,7 @@ const struct ksz_chip_data ksz_switch_chips[] =
{         
                 .num_statics = 16,
                 .cpu_ports = 0x07,      /* can be configured as cpu
port */
                 .port_cnt = 3,          /* total port count */
 -               .port_nirqs = 2,
 +               .port_nirqs = 3,
                 .ops = &ksz9477_dev_ops,
                 .mib_names = ksz9477_mib_names,
                 .mib_cnt = ARRAY_SIZE(ksz9477_mib_names),

--
Arun

  reply	other threads:[~2022-10-18 13:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-14 15:28 Arun Ramadoss
2022-10-14 15:28 ` [RFC Patch net-next 1/6] net: dsa: microchip: adding the posix clock support Arun Ramadoss
2022-10-14 15:28 ` [RFC Patch net-next 2/6] net: dsa: microchip: Initial hardware time stamping support Arun Ramadoss
2022-10-14 15:28 ` [RFC Patch net-next 3/6] net: dsa: microchip: Manipulating absolute time using ptp hw clock Arun Ramadoss
2022-10-14 15:28 ` [RFC Patch net-next 4/6] net: dsa: microchip: enable the ptp interrupt for timestamping Arun Ramadoss
2022-10-14 15:28 ` [RFC Patch net-next 5/6] net: dsa: microchip: Adding the ptp packet reception logic Arun Ramadoss
2022-10-25  6:17   ` Christian Eggers
2022-10-26 20:13     ` Vladimir Oltean
2022-10-14 15:28 ` [RFC Patch net-next 6/6] net: dsa: microchip: add the transmission tstamp logic Arun Ramadoss
2022-10-17 17:19 ` [RFC Patch net-next 0/6] net: dsa: microchip: add gPTP support for LAN937x switch Vladimir Oltean
2022-10-18  6:44   ` Arun.Ramadoss
2022-10-18 10:29     ` Vladimir Oltean
2022-10-18 13:42       ` Arun.Ramadoss [this message]
2022-10-23 20:15         ` Christian Eggers
2022-10-25  3:41           ` Arun.Ramadoss
2022-10-26 20:07             ` Vladimir Oltean
2022-10-26 16:47         ` Christian Eggers
2022-10-26 21:44           ` Vladimir Oltean
2022-10-27 15:51             ` Arun.Ramadoss
2022-11-02 13:12               ` Christian Eggers
2022-11-02 13:11             ` Christian Eggers
2022-11-04 10:36               ` Arun.Ramadoss
2022-10-17 18:46 ` Vladimir Oltean
2022-10-18  6:29   ` Arun.Ramadoss
2022-10-18  9:55     ` Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d8459511785de2f6d503341ce5f87c6e6064d7b5.camel@microchip.com \
    --to=arun.ramadoss@microchip.com \
    --cc=Tristram.Ha@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=Woojung.Huh@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=b.hutchman@gmail.com \
    --cc=ceggers@arri.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®