]> git.baikalelectronics.ru Git - uboot.git/commit
Revert "blk: Invalidate block cache when switching hwpart"
authorWeijie Gao <weijie.gao@mediatek.com>
Tue, 27 Aug 2019 07:32:18 +0000 (15:32 +0800)
committerTom Rini <trini@konsulko.com>
Fri, 30 Aug 2019 18:17:11 +0000 (14:17 -0400)
commit89f54b55a6a85bfbfb6d50f98c7e3bef58b1f95f
tree626608fae8bdd5f8c167832d81a5e9c22891a80e
parent6603ff23a40ecec5bc9b0d71de9525ebeaf86912
Revert "blk: Invalidate block cache when switching hwpart"

This reverts commit 49efe4994db6b69a9cf8cb93a78db848a42c9174.

Most block devices have only one hwpart. Multiple hwparts only found used
by eMMC devices in u-boot. The mmc driver do blk_dselect_hwpart() at the
beginning of mmc_bread() which causes block cache being invalidated too
frequently and makes block cache useless.

So it's not a good idea to put blkcache_invalidate() in the common
functions. It should be called inside mmc_select_hwpart().

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Felix Brack <fb@ltec.ch>
drivers/block/blk-uclass.c