[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5d9b91f-cb86-0b82-5631-af0868ba4796@microchip.com>
Date: Fri, 4 Oct 2019 10:03:40 +0000
From: <Tudor.Ambarus@...rochip.com>
To: <john.garry@...wei.com>, <vigneshr@...com>,
<boris.brezillon@...labora.com>, <marek.vasut@...il.com>,
<linux-mtd@...ts.infradead.org>, <geert+renesas@...der.be>,
<jonas@...rbonn.se>
CC: <linux-aspeed@...ts.ozlabs.org>, <andrew@...id.au>,
<richard@....at>, <linux-kernel@...r.kernel.org>, <vz@...ia.com>,
<linux-mediatek@...ts.infradead.org>, <joel@....id.au>,
<miquel.raynal@...tlin.com>, <matthias.bgg@...il.com>,
<computersforpeace@...il.com>, <dwmw2@...radead.org>,
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 10/22] mtd: spi-nor: Rework write_sr()
Hi, John,
On 10/04/2019 12:39 PM, John Garry wrote:
> External E-Mail
>
>
> On 24/09/2019 08:46, Tudor.Ambarus@...rochip.com wrote:
>> +}
>> +
>> +/**
>> + * spi_nor_write_sr() - Write the Status Register.
>> + * @nor: pointer to 'struct spi_nor'.
>> + * @sr: buffer to write to the Status Register.
>> + * @len: number of bytes to write to the Status Register.
>> + *
>> + * Return: 0 on success, -errno otherwise.
>> */
>> -static int write_sr(struct spi_nor *nor, u8 val)
>> +static int spi_nor_write_sr(struct spi_nor *nor, const u8 *sr, size_t len)
>> {
>> - nor->bouncebuf[0] = val;
>> + int ret;
>> +
>> + ret = spi_nor_write_enable(nor);
>> + if (ret)
>> + return ret;
>> +
>
> Hi Tudor,
>
>> if (nor->spimem) {
>> struct spi_mem_op op =
>> SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WRSR, 1),
>> SPI_MEM_OP_NO_ADDR,
>> SPI_MEM_OP_NO_DUMMY,
>> - SPI_MEM_OP_DATA_IN(1, nor->bouncebuf, 1));
>
> This be SPI_MEM_OP_DATA_OUT() in the current mainline code also, right?
In v5.4-rc1 this is defined as SPI_MEM_OP_DATA_IN, so the Mainline code should
fail. This looks like a bug. I didn't noticed it when doing the patch.
>
> I'm testing my under development driver on top of v5.4-rc1, and flash_lock -u is broken.
It's not clear to me, does flash_lock fail with my patches on top of v5.4-rc1?
Or it fails when testing v5.4-rc1?
Can you test v5.4-rc1 and see if flash_lock works on you flash or not?
Please specify which flash do you use, and which controller.
Thanks for testing this!
ta
Powered by blists - more mailing lists