From: Richard Cochran <richardcochran@gmail•com>
To: Russell King <rmk+kernel@armlinux•org.uk>
Cc: Alexandre Belloni <alexandre.belloni@bootlin•com>,
Antoine Tenart <antoine.tenart@bootlin•com>,
Matteo Croce <mcroce@redhat•com>,
Andre Przywara <andre.przywara@arm•com>,
Sven Auhagen <sven.auhagen@voleatech•de>,
"David S. Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>,
netdev@vger•kernel.org
Subject: Re: [PATCH net-next v3 7/7] net: mvpp2: ptp: add support for transmit timestamping
Date: Tue, 8 Sep 2020 16:40:52 -0700 [thread overview]
Message-ID: <20200908234052.GA11215@hoboy> (raw)
In-Reply-To: <E1kFlfN-0006di-Pu@rmk-PC.armlinux.org.uk>
On Tue, Sep 08, 2020 at 11:00:41PM +0100, Russell King wrote:
> @@ -2984,13 +2985,19 @@ static irqreturn_t mvpp2_isr(int irq, void *dev_id)
>
> static void mvpp2_isr_handle_ptp_queue(struct mvpp2_port *port, int nq)
> {
> + struct skb_shared_hwtstamps shhwtstamps;
> + struct mvpp2_hwtstamp_queue *queue;
> + struct sk_buff *skb;
> void __iomem *ptp_q;
> + unsigned int id;
> u32 r0, r1, r2;
>
> ptp_q = port->priv->iface_base + MVPP22_PTP_BASE(port->gop_id);
> if (nq)
> ptp_q += MVPP22_PTP_TX_Q1_R0 - MVPP22_PTP_TX_Q0_R0;
>
> + queue = &port->tx_hwtstamp_queue[nq];
> +
> while (1) {
> r0 = readl_relaxed(ptp_q + MVPP22_PTP_TX_Q0_R0) & 0xffff;
> if (!r0)
> @@ -2998,6 +3005,19 @@ static void mvpp2_isr_handle_ptp_queue(struct mvpp2_port *port, int nq)
>
> r1 = readl_relaxed(ptp_q + MVPP22_PTP_TX_Q0_R1) & 0xffff;
> r2 = readl_relaxed(ptp_q + MVPP22_PTP_TX_Q0_R2) & 0xffff;
> +
> + id = (r0 >> 1) & 31;
> +
> + skb = queue->skb[id];
> + queue->skb[id] = NULL;
> + if (skb) {
> + u32 ts = r2 << 19 | r1 << 3 | r0 >> 13;
> +
> + netdev_info(port->dev, "tx stamp 0x%08x\n", ts);
This probably should be _debug instead.
> + mvpp22_tai_tstamp(port->priv->tai, ts, &shhwtstamps);
> + skb_tstamp_tx(skb, &shhwtstamps);
> + dev_kfree_skb_any(skb);
> + }
> }
> }
Thanks,
Richard
next prev parent reply other threads:[~2020-09-08 23:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 21:47 [PATCH net-next v3 0/6] Marvell PP2.2 PTP support Russell King - ARM Linux admin
2020-09-08 22:00 ` [PATCH net-next v3 1/7] net: mvpp2: restructure "link status" interrupt handling Russell King
2020-09-08 22:00 ` [PATCH net-next v3 2/7] net: mvpp2: rename mis-named "link status" interrupt Russell King
2020-09-08 22:00 ` [PATCH net-next v3 3/7] net: mvpp2: check first level interrupt status registers Russell King
2020-09-08 22:00 ` [PATCH net-next v3 4/7] net: mvpp2: ptp: add TAI support Russell King
2020-09-08 22:00 ` [PATCH net-next v3 5/7] net: mvpp2: ptp: add support for receive timestamping Russell King
2020-09-08 22:00 ` [PATCH net-next v3 6/7] net: mvpp2: ptp: add interrupt handling Russell King
2020-09-08 22:00 ` [PATCH net-next v3 7/7] net: mvpp2: ptp: add support for transmit timestamping Russell King
2020-09-08 23:40 ` Richard Cochran [this message]
2020-09-08 23:50 ` Russell King - ARM Linux admin
2020-09-09 18:00 ` Richard Cochran
2020-09-11 16:08 ` Richard Cochran
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=20200908234052.GA11215@hoboy \
--to=richardcochran@gmail$(echo .)com \
--cc=alexandre.belloni@bootlin$(echo .)com \
--cc=andre.przywara@arm$(echo .)com \
--cc=antoine.tenart@bootlin$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=kuba@kernel$(echo .)org \
--cc=mcroce@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=rmk+kernel@armlinux$(echo .)org.uk \
--cc=sven.auhagen@voleatech$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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