From: Richard Cochran <richardcochran@gmail.com>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, sasha.neftin@intel.com,
kurt@linutronix.de, anthony.l.nguyen@intel.com,
jesse.brandeburg@intel.com,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [iwl-net v1 2/2] igb: Fix missing time sync events
Date: Sat, 17 Feb 2024 07:05:07 -0800 [thread overview]
Message-ID: <ZdDLI4o1Bll1xvH6@hoboy.vegasvil.org> (raw)
In-Reply-To: <20240217010455.58258-3-vinicius.gomes@intel.com>
On Fri, Feb 16, 2024 at 05:04:54PM -0800, Vinicius Costa Gomes wrote:
> Fix "double" clearing of interrupts, which can cause external events
> or timestamps to be missed.
>
> The E1000_TSIRC Time Sync Interrupt Cause register can be cleared in two
> ways, by either reading it or by writing '1' into the specific cause
> bit. This is documented in section 8.16.1.
That is not what the doc says.
It says this:
Note: Once ICR.Time_Sync is set, the internal value of this
register should be cleared by writing 1b to *all* bits
or cleared by a read to enable receiving an additional
ICR.Time_Sync interrupt.
- Intel® Ethernet Controller I210 Datasheet,
Revision Number: 3.1, June 2017, page 469
It says *all* bits. This implies that the interrupt sources may be
cleared individually. Because the non-acked bits are still pending,
the level interrupt should still be active, and the "missing" event
will be handled at the next invocation of the handler.
> The following flow was used:
> 1. read E1000_TSIRC into 'tsicr';
> 2. handle the interrupts present into 'tsirc' and mark them in 'ack';
> 3. write 'ack' into E1000_TSICR;
>
> As both (1) and (3) will clear the interrupt cause, if an interrupt
> happens between (1) and (3) it will be ignored, causing events to be
> missed.
Are you sure?
Does setting ICR.Time_Sync[TXTS] also clear ICR.Time_Sync[RXTS] ?
That is what you seem to be saying.
Thanks,
Richard
next prev parent reply other threads:[~2024-02-17 15:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240217010455.58258-1-vinicius.gomes@intel.com>
2024-02-17 1:04 ` [iwl-net v1 1/2] igc: " Vinicius Costa Gomes
2024-02-18 15:40 ` Kurt Kanzenbach
2024-02-17 1:04 ` [iwl-net v1 2/2] igb: " Vinicius Costa Gomes
2024-02-17 15:05 ` Richard Cochran [this message]
2024-02-17 16:55 ` Richard Cochran
2024-02-20 17:30 ` Vinicius Costa Gomes
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=ZdDLI4o1Bll1xvH6@hoboy.vegasvil.org \
--to=richardcochran@gmail.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sasha.neftin@intel.com \
--cc=vinicius.gomes@intel.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®