mmc: block: don't use CMD23 with very old MMC cards
authorDaniel Glöckner <dg@emlix.com>
Tue, 30 Aug 2016 12:17:30 +0000 (14:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Feb 2017 10:04:01 +0000 (11:04 +0100)
commit98af342bf574c0fb71194be847014cf3ac90737b
tree90fbf379a17a325f4ae465bda18c573257a6df34
parent0d9dddc0b582237e0e8afa19f83a3844fa9a846e
mmc: block: don't use CMD23 with very old MMC cards

commit 0ed50abb2d8fc81570b53af25621dad560cd49b3 upstream.

CMD23 aka SET_BLOCK_COUNT was introduced with MMC v3.1.
Older versions of the specification allowed to terminate
multi-block transfers only with CMD12.

The patch fixes the following problem:

  mmc0: new MMC card at address 0001
  mmcblk0: mmc0:0001 SDMB-16 15.3 MiB
  mmcblk0: timed out sending SET_BLOCK_COUNT command, card status 0x400900
  ...
  blk_update_request: I/O error, dev mmcblk0, sector 0
  Buffer I/O error on dev mmcblk0, logical block 0, async page read
   mmcblk0: unable to read partition table

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/mmc/card/block.c