]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: core: Capture correct oemid-bits for eMMC cards
authorAvri Altman <avri.altman@wdc.com>
Wed, 27 Sep 2023 07:15:00 +0000 (10:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 09:59:02 +0000 (11:59 +0200)
commit24959825377f8e68980aaabfec21808bdd21acaf
tree4674ad080b87f2c1888f7f0075b437f77ff396a9
parent8041e7b7e7e97723315a65bbf8334d6bd5b18ce8
mmc: core: Capture correct oemid-bits for eMMC cards

commit 84ee19bffc9306128cd0f1c650e89767079efeff upstream.

The OEMID is an 8-bit binary number rather than 16-bit as the current code
parses for. The OEMID occupies bits [111:104] in the CID register, see the
eMMC spec JESD84-B51 paragraph 7.2.3. It seems that the 16-bit comes from
the legacy MMC specs (v3.31 and before).

Let's fix the parsing by simply move to use 8-bit instead of 16-bit. This
means we ignore the impact on some of those old MMC cards that may be out
there, but on the other hand this shouldn't be a problem as the OEMID seems
not be an important feature for these cards.

Signed-off-by: Avri Altman <avri.altman@wdc.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230927071500.1791882-1-avri.altman@wdc.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/core/mmc.c