From: <Arun.Ramadoss@microchip.com>
To: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<ceggers@arri.de>
Cc: <olteanv@gmail.com>, <UNGLinuxDriver@microchip.com>,
<vivien.didelot@gmail.com>, <andrew@lunn.ch>,
<linux@armlinux.org.uk>, <Tristram.Ha@microchip.com>,
<f.fainelli@gmail.com>, <kuba@kernel.org>, <edumazet@google.com>,
<pabeni@redhat.com>, <richardcochran@gmail.com>,
<Woojung.Huh@microchip.com>, <davem@davemloft.net>
Subject: Re: [Patch net-next v3 05/13] net: dsa: microchip: ptp: enable interrupt for timestamping
Date: Mon, 12 Dec 2022 10:13:46 +0000 [thread overview]
Message-ID: <1df64e8b88e7cef0d9ee34bfa6deafe4801e82c6.camel@microchip.com> (raw)
In-Reply-To: <5904188.lOV4Wx5bFT@n95hx1g2>
Hi Christian,
Thanks for the comment.
On Fri, 2022-12-09 at 20:40 +0100, Christian Eggers wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> Hi Arun,
>
> On Friday, 9 December 2022, 08:24:29 CET, Arun Ramadoss wrote:
> > PTP Interrupt mask and status register differ from the global and
> > port
> > interrupt mechanism by two methods. One is that for global/port
> > interrupt enabling we have to clear the bit but for ptp interrupt
> > we
> > have to set the bit. And other is bit12:0 is reserved in ptp
> > interrupt
> > registers. This forced to not use the generic implementation of
> > global/port interrupt method routine. This patch implement the ptp
> > interrupt mechanism to read the timestamp register for sync,
> > pdelay_req
> > and pdelay_resp.
> >
> > Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
> >
> > +
> > + ret = request_threaded_irq(ptpmsg_irq->irq_num, NULL,
> > + ksz_ptp_msg_thread_fn,
> > + IRQF_ONESHOT |
> > IRQF_TRIGGER_FALLING,
>
> I assume that IRQF_TRIGGER_FALLING is not required here as nested
> interrupts are fired by
> software (withing having an edge / a level). Additionally I had to
> remove all existing
> occurrences of this flag in ksz_common.c in order to rid of
> persistent "timed out while
> polling for tx timestamp" messages which appeared randomly after some
> time of operation.
> I think that on i.MX6 I need to use level triggered interrupts
> instead of edge triggered
> ones. Additionally I think that such flags should be set in the
> device tree instead of
> the driver:
>
> https://stackoverflow.com/a/40051191
I will remove IRQF_TRIGGER_FALLING from the ksz_ptp.c in next patch
version. To remove the flag in ksz_common.c, I will send bug fix patch
separately.
>
>
> > + if (ret)
> > + goto out;
> > + }
> > +
> > + return 0;
> > +
> > +out:
> > + while (n--)
> > + irq_dispose_mapping(port->ptpmsg_irq[n].irq_num);
> > +
> > + return ret;
> > +}
> >
> >
>
>
>
>
next prev parent reply other threads:[~2022-12-12 10:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 7:24 [Patch net-next v3 00/13] net: dsa: microchip: add PTP support for KSZ9563/KSZ8563 and LAN937x Arun Ramadoss
2022-12-09 7:24 ` [Patch net-next v3 01/13] net: dsa: microchip: ptp: add the posix clock support Arun Ramadoss
2022-12-09 11:36 ` Vladimir Oltean
2022-12-10 0:10 ` Florian Fainelli
2022-12-09 7:24 ` [Patch net-next v3 02/13] net: dsa: microchip: ptp: Initial hardware time stamping support Arun Ramadoss
2022-12-09 15:19 ` Vladimir Oltean
2022-12-09 7:24 ` [Patch net-next v3 03/13] net: dsa: microchip: ptp: add 4 bytes in tail tag when ptp enabled Arun Ramadoss
2022-12-09 11:38 ` Vladimir Oltean
2022-12-09 7:24 ` [Patch net-next v3 04/13] net: dsa: microchip: ptp: manipulating absolute time using ptp hw clock Arun Ramadoss
2022-12-09 7:24 ` [Patch net-next v3 05/13] net: dsa: microchip: ptp: enable interrupt for timestamping Arun Ramadoss
2022-12-09 19:40 ` Christian Eggers
2022-12-12 10:13 ` Arun.Ramadoss [this message]
2022-12-09 7:24 ` [Patch net-next v3 06/13] net: ptp: add helper for one-step P2P clocks Arun Ramadoss
2022-12-09 15:02 ` Vladimir Oltean
2022-12-09 7:24 ` [Patch net-next v3 07/13] net: dsa: microchip: ptp: add packet reception timestamping Arun Ramadoss
2022-12-09 15:06 ` Vladimir Oltean
2022-12-09 7:24 ` [Patch net-next v3 08/13] net: dsa: microchip: ptp: add packet transmission timestamping Arun Ramadoss
2022-12-09 15:07 ` Vladimir Oltean
2022-12-09 7:24 ` [Patch net-next v3 09/13] net: dsa: microchip: ptp: move pdelay_rsp correction field to tail tag Arun Ramadoss
2022-12-09 15:08 ` Vladimir Oltean
2022-12-09 7:24 ` [Patch net-next v3 10/13] net: dsa: microchip: ptp: add periodic output signal Arun Ramadoss
2022-12-09 15:16 ` Vladimir Oltean
2022-12-09 7:24 ` [Patch net-next v3 11/13] net: dsa: microchip: ptp: add support for perout programmable pins Arun Ramadoss
2022-12-09 7:24 ` [Patch net-next v3 12/13] net: dsa: microchip: ptp: lan937x: add 2 step timestamping Arun Ramadoss
2022-12-09 7:24 ` [Patch net-next v3 13/13] net: dsa: microchip: ptp: lan937x: Enable periodic output in LED pins Arun Ramadoss
2022-12-09 15:24 ` [Patch net-next v3 00/13] net: dsa: microchip: add PTP support for KSZ9563/KSZ8563 and LAN937x 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=1df64e8b88e7cef0d9ee34bfa6deafe4801e82c6.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=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