]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
mtd: cfi_cmdset_0002: only check errors when ready in cfi_check_err_status()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Thu, 31 Oct 2019 20:37:27 +0000 (23:37 +0300)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commitaa48623ea052450f043496af7428f986c0f24dba
tree0063d579ee7f6b94c7414478bac39555dc0bb5ff
parent6ce8cf91233aaf29d211097bf1096df4097b7c7b
mtd: cfi_cmdset_0002: only check errors when ready in cfi_check_err_status()

BugLink: https://bugs.launchpad.net/bugs/1862429
commit 72914a8cff7e1d910c58e125e15a0da409e3135f upstream.

Cypress S26K{L|S}P{128|256|512}S datasheet says that the error bits in
the status register are only valid when the "device ready" bit 7 is set.
Add the check for the device ready bit in cfi_check_err_status() as that
function isn't always called with this bit set.

Fixes: 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/mtd/chips/cfi_cmdset_0002.c