qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Pisa <pisa@fel.cvut.cz>
To: Doug Brown <doug@schmorgal.com>
Cc: Francisco Iglesias <francisco.iglesias@amd.com>,
	Jason Wang <jasowang@redhat.com>, Paolo Bonzini <bonzini@gnu.org>,
	qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH v2 7/7] hw/net/can/xlnx-versal-canfd: Fix FIFO issues
Date: Thu, 29 Aug 2024 15:24:08 +0200	[thread overview]
Message-ID: <202408291524.08632.pisa@fel.cvut.cz> (raw)
In-Reply-To: <20240827034927.66659-8-doug@schmorgal.com>

On Tuesday 27 of August 2024 05:49:27 Doug Brown wrote:
> The read index should not be changed when storing a new message into the
> RX or TX FIFO. Changing it at this point will cause the reader to get
> out of sync. The wrapping of the read index is already handled by the
> pre-write functions for the FIFO status registers anyway.
>
> Additionally, the calculation for wrapping the store index was off by
> one, which caused new messages to be written to the wrong location in
> the FIFO. This caused incorrect messages to be delivered.
>
> Signed-off-by: Doug Brown <doug@schmorgal.com>

Generally, I agree that index should wrap up for cyclic FIFO
implementation and change looks logical to me but I do not
see and studied all consequences related to emulated HW.

If that is confirmed or corrected by somebody from AMD/XilinX,
it would be better. I can find more time to do deeper analysis
if no other looks into the whole code.

Best wishes,

                Pavel
--
                Pavel Pisa
    phone:      +420 603531357
    e-mail:     pisa@cmp.felk.cvut.cz
    Department of Control Engineering FEE CVUT
    Karlovo namesti 13, 121 35, Prague 2
    university: http://control.fel.cvut.cz/
    personal:   http://cmp.felk.cvut.cz/~pisa
    social:     https://social.kernel.org/ppisa
    projects:   https://www.openhub.net/accounts/ppisa
    CAN related:http://canbus.pages.fel.cvut.cz/
    RISC-V education: https://comparch.edu.cvut.cz/
    Open Technologies Research Education and Exchange Services
    https://gitlab.fel.cvut.cz/otrees/org/-/wikis/home


  reply	other threads:[~2024-08-29 13:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27  3:49 [PATCH v2 0/7] hw/net/can/xlnx-versal-canfd: Miscellaneous fixes Doug Brown
2024-08-27  3:49 ` [PATCH v2 1/7] hw/net/can/xlnx-versal-canfd: Fix interrupt level Doug Brown
2024-08-29 13:08   ` Pavel Pisa
2024-08-27  3:49 ` [PATCH v2 2/7] hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check Doug Brown
2024-08-29 13:09   ` Pavel Pisa
2024-08-27  3:49 ` [PATCH v2 3/7] hw/net/can/xlnx-versal-canfd: Translate CAN ID registers Doug Brown
2024-08-29 13:11   ` Pavel Pisa
2024-08-27  3:49 ` [PATCH v2 4/7] hw/net/can/xlnx-versal-canfd: Handle flags correctly Doug Brown
2024-08-29 13:13   ` Pavel Pisa
2024-08-27  3:49 ` [PATCH v2 5/7] hw/net/can/xlnx-versal-canfd: Fix byte ordering Doug Brown
2024-08-29 13:15   ` Pavel Pisa
2024-08-27  3:49 ` [PATCH v2 6/7] hw/net/can/xlnx-versal-canfd: Simplify DLC conversions Doug Brown
2024-08-29 13:17   ` Pavel Pisa
2024-09-04 23:33   ` Francisco Iglesias
2024-08-27  3:49 ` [PATCH v2 7/7] hw/net/can/xlnx-versal-canfd: Fix FIFO issues Doug Brown
2024-08-29 13:24   ` Pavel Pisa [this message]
2024-08-30  0:11     ` Doug Brown
2024-09-06 16:35   ` Francisco Iglesias
2024-09-06 14:36 ` [PATCH v2 0/7] hw/net/can/xlnx-versal-canfd: Miscellaneous fixes Peter Maydell
2024-09-06 15:48   ` Francisco Iglesias
2024-09-09 13:55 ` Peter Maydell

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=202408291524.08632.pisa@fel.cvut.cz \
    --to=pisa@fel.cvut.cz \
    --cc=bonzini@gnu.org \
    --cc=doug@schmorgal.com \
    --cc=francisco.iglesias@amd.com \
    --cc=jasowang@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).