[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mafs0y0quthdi.fsf@kernel.org>
Date: Thu, 04 Sep 2025 16:35:53 +0200
From: Pratyush Yadav <pratyush@...nel.org>
To: Santhosh Kumar K <s-k6@...com>
Cc: <miquel.raynal@...tlin.com>, <broonie@...nel.org>, <vigneshr@...com>,
<marex@...x.de>, <computersforpeace@...il.com>,
<grmoore@...nsource.altera.com>, <theo.lebrun@...tlin.com>,
<linux-spi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<praneeth@...com>, <p-mantena@...com>, <a-dutta@...com>,
<u-kumar1@...com>, Pratyush Yadav <pratyush@...nel.org>,
<stable@...r.kernel.org>
Subject: Re: [PATCH 1/4] spi: cadence-quadspi: Flush posted register writes
before INDAC access
Hi,
On Thu, Sep 04 2025, Santhosh Kumar K wrote:
> From: Pratyush Yadav <pratyush@...nel.org>
>
> cqspi_indirect_read_execute() and cqspi_indirect_write_execute() first
> set the enable bit on APB region and then start reading/writing to the
> AHB region. On TI K3 SoCs these regions lie on different endpoints. This
> means that the order of the two operations is not guaranteed, and they
> might be reordered at the interconnect level.
>
> It is possible for the AHB write to be executed before the APB write to
> enable the indirect controller, causing the transaction to be invalid
> and the write erroring out. Read back the APB region write before
> accessing the AHB region to make sure the write got flushed and the race
> condition is eliminated.
>
> Fixes: 140623410536 ("mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller")
> CC: stable@...r.kernel.org
> Signed-off-by: Pratyush Yadav <pratyush@...nel.org>
> Signed-off-by: Santhosh Kumar K <s-k6@...com>
IIRC I wrote this patch a few years ago when I was still at TI. Nice to
see it being upstreamed! It feels strange to review my own patch, but
FWIW,
Reviewed-by: Pratyush Yadav <pratyush@...nel.org>
[...]
--
Regards,
Pratyush Yadav
Powered by blists - more mailing lists