Re: [PATCH] spi: fsl-espi: fix behaviour for full-duplex xfers

From: Mark Brown
Date: Wed Apr 22 2015 - 15:57:59 EST


On Wed, Apr 22, 2015 at 12:09:03PM -0300, DATACOM - Jonatas.Rech wrote:

Don't top post (context is important for people to know what you are
talking about) and please fix your mailer to word wrap within
paragraphs so your mail can be read and replied to more readily.

> The m25p80 driver can send down a message that's bigger than the
> amount the spi-fsl-espi driver can handle in a single espi_transfer
> (64KiB), when the application wants to read the whole memory content,
> for instance. In this case, the Freescale driver splits the message in
> 64KiB chunks, adding a "Read the next 64KiB" command in the TX buffer
> so the flash memory can output data from the expected offset. In the
> end, the m25p80 driver sees all the data as one big rx_buf, as it
> expected in the first place.

This is completely broken.

> Unfortunately, I don't know how many protocol drivers currently rely
> on this, or even how other controller drivers deal with this expected
> behavior.

This is not expected behaviour for anything and should be fixed
urgently.

Attachment: signature.asc
Description: Digital signature