mmc: block: avoid multiblock reads for the last sector in SPI mode
authorChris Boot <bootc@bootc.net>
Mon, 8 Oct 2018 15:07:30 +0000 (17:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:16:24 +0000 (09:16 +0200)
commitd5833a50c6a323bfc42dffe2e78aa0f06bb8263b
tree834dcecde5bd6eb4263fd7d0b14ebad151660f7e
parentbc183079ddfdeda8282b30a7f9a64aaca11c19a1
mmc: block: avoid multiblock reads for the last sector in SPI mode

commit 41591b38f5f8f78344954b68582b5f00e56ffe61 upstream.

On some SD cards over SPI, reading with the multiblock read command the last
sector will leave the card in a bad state.

Remove last sectors from the multiblock reading cmd.

Signed-off-by: Chris Boot <bootc@bootc.net>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Cc: stable@vger.kernel.org # v4.10+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/core/block.c