mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Clark <james.clark@linaro.org>
To: Mehmet Fide <mehmet.fide@gmail.com>,
	stable@vger.kernel.org, Larisa Grigore <larisa.grigore@nxp.com>,
	Vladimir Oltean <olteanv@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>, Mark Brown <broonie@kernel.org>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6.12.y] spi: spi-fsl-dspi: Avoid setup_accel logic for DMA transfers
Date: Tue, 11 Aug 2026 10:09:27 +0100	[thread overview]
Message-ID: <f044b945-ea38-4f66-a00b-eac5d81c8d7d@linaro.org> (raw)
In-Reply-To: <20260811084018.3566861-1-mehmet.fide@gmail.com>



On 11/08/2026 09:40, Mehmet Fide wrote:
> Some measurements on the hardware, in case they help decide this one.
> 
> I ran the transfers that fail on 6.12 against 6.18.44, which carries
> cac7e5054115, on the same board (Colibri VF50, vf610, DSPI in DMA mode) with
> MOSI and MISO shorted at the connector, using spidev_test:
> 
>    3, 5, 7, 9, 11 and 13 byte transfers: every byte comes back, in order.
>    Even lengths and a single byte: fine as well.
>    SPI_LSB_FIRST at 2, 3, 5, 8 and 13 bytes: bytes come back unchanged.
> 
> Without the commit, the same odd length transfers lose the tail of the buffer,
> because the accel path packs into 16 bit frames and computes the word count as
> len / 2, and SPI_LSB_FIRST comes back byte swapped, because the accel helpers
> byte swap through cpu_to_be16() on top of the hardware LSBFE bit. That is what
> we have been carrying a local equivalent for.
> 
> So the commit is what makes those transfers correct on this hardware, not just
> a saving of pointless repacking.
> 
> Thanks,
> Mehmet

It's possible that this was originally done as a fix but I interpreted 
it as a refactor. As part of upstreaming this I broke down and added 
commit messages to changes from NXPs board support branch. It does make 
sense that this change was added after seeing the bug, rather than just 
a clean up. But it could also be a coincidence.

James


  reply	other threads:[~2026-08-11  9:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10 14:14 Mehmet Fide
2026-08-11  8:40 ` Mehmet Fide
2026-08-11  9:09   ` James Clark [this message]
2026-08-11  9:13   ` Mehmet Fide
2026-08-11 18:55     ` Sasha Levin
2026-08-11 21:28       ` Vladimir Oltean
2026-08-12  8:20         ` James Clark
2026-08-12 16:26 ` Sasha Levin

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=f044b945-ea38-4f66-a00b-eac5d81c8d7d@linaro.org \
    --to=james.clark@linaro.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=larisa.grigore@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mehmet.fide@gmail.com \
    --cc=olteanv@gmail.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.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

all inboxes | Powered by JetHome®