MMC core:
 - Capture correct oemid-bits for eMMC cards
 - Fix error propagation for some ioctl commands
 - Hold retuning if SDIO is in 1-bit mode

MMC host:
 - mtk-sd: Use readl_poll_timeout_atomic to not "schedule while atomic"
 - sdhci-msm: Correct minimum number of clocks
 - sdhci-pci-gli: Fix LPM negotiation so x86/S0ix SoCs can suspend
 - sdhci-sprd: Fix error code in sdhci_sprd_tuning()
mmc: core: Capture correct oemid-bits for eMMC cards

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>
1 file changed