[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6dff003d-c727-e4a3-b5d3-f58beb2b02cb@linux.ibm.com>
Date: Thu, 22 Jun 2023 14:48:36 -0500
From: Eddie James <eajames@...ux.ibm.com>
To: Vincent Whitchurch <vincent.whitchurch@...s.com>,
broonie@...nel.org, krzysztof.kozlowski@...aro.org,
andi@...zian.org
Cc: kernel@...s.com, alim.akhtar@...sung.com,
linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-samsung-soc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 3/4] spi: Split transfers larger than max size
On 9/27/22 06:21, Vincent Whitchurch wrote:
> A couple of drivers call spi_split_transfers_maxsize() from their
> ->prepare_message() callbacks to split transfers which are too big for
> them to handle. Add support in the core to do this based on
> ->max_transfer_size() to avoid code duplication.
Hello,
I've been testing AT25 functionality in linux 6.1 and I believe this
patch is breaking the AT25 protocol. It will split a write command up
such that some of the data is in a different transfer thanĀ the write
enable and address. According to my understanding of the AT25 spec, that
doesn't work... Someone correct me if I'm wrong though. Do we need a
flag to enable/disable this behavior depending on the client perhaps?
Thanks,
Eddie
>
> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@...s.com>
> ---
> drivers/spi/spi.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index f41a8c2752b8..44e4352d948b 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -1649,6 +1649,15 @@ static int __spi_pump_transfer_message(struct spi_controller *ctlr,
>
> trace_spi_message_start(msg);
>
> + ret = spi_split_transfers_maxsize(ctlr, msg,
> + spi_max_transfer_size(msg->spi),
> + GFP_KERNEL | GFP_DMA);
> + if (ret) {
> + msg->status = ret;
> + spi_finalize_current_message(ctlr);
> + return ret;
> + }
> +
> if (ctlr->prepare_message) {
> ret = ctlr->prepare_message(ctlr, msg);
> if (ret) {
Powered by blists - more mailing lists