Patch "spi-nor: intel-spi: Fix broken software sequencing codes" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
spi-nor: intel-spi: Fix broken software sequencing codes
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
spi-nor-intel-spi-fix-broken-software-sequencing-codes.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
9d63f17661e25fd28714dac94bdebc4ff5b75f09Mon Sep 17 00:00:00 2001
From: Bin Meng <[email protected]>
Date: Mon, 11 Sep 2017 02:41:53 -0700
Subject: spi-nor: intel-spi: Fix broken software sequencing codes
From: Bin Meng <[email protected]>
commit 9d63f17661e25fd28714dac94bdebc4ff5b75f09 upstream.
There are two bugs in current intel_spi_sw_cycle():
- The 'data byte count' field should be the number of bytes transferred minus 1
- SSFSTS_CTL is the offset from ispi->sregs, not ispi->base
--- drivers/mtd/spi-nor/intel-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/spi-nor/intel-spi.c +2 -2
@@ -422,7 +422,7 @@ static int intel_spi_sw_cycle(struct intif (ret <0 )return ret; - val = (len <<SSFSTS_CTL_DBC_SHIFT ) |SSFSTS_CTL_DS ; + val = ((len -1 ) <<SSFSTS_CTL_DBC_SHIFT ) |SSFSTS_CTL_DS ; val |= ret <<SSFSTS_CTL_COP_SHIFT ; val |=SSFSTS_CTL_FCERR |SSFSTS_CTL_FDONE ; val |=SSFSTS_CTL_SCGO ;
@@ -432,7 +432,7 @@ static int intel_spi_sw_cycle(struct intif (ret)return ret; - status =readl (ispi->base +SSFSTS_CTL ); + status =readl (ispi->sregs +SSFSTS_CTL );if (status &SSFSTS_CTL_FCERR )return -EIO ;else if (status &SSFSTS_CTL_AEL )
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/spi-nor-intel-spi-fix-broken-software-sequencing-codes.patch