Skip to contentSkip to conversation

Revert "mmc: core: Capture correct oemid-bits for eMMC cards"

PATCH In review Dominique Martinet 3 participants 3 messages Nov 3, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "mmc: core: Capture correct oemid-bits for eMMC cards"

From: Dominique Martinet <[email protected]>

This reverts commit 84ee19bffc9306128cd0f1c650e89767079efeff.

The commit above made quirks with an OEMID fail to be applied, as they were checking card->cid.oemid for the full 16 bits defined in MMC_FIXUP macros but the field would only contain the bottom 8 bits.

eMMC v5.1A might have bogus values in OEMID's higher bits so another fix will be made, but it has been decided to revert this until that is ready.

---
Here's the revert as discussed in "mmc: truncate quirks' oemid to 8 bits"' patch thread.
Feel free to ignore if you already have something, I just checked your -next branch quickly and might have missed it.

 drivers/mmc/core/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/mmc.c +1 -1
index 4a4bab9aa726..89cd48fcec79 100644
@@ -104,7 +104,7 @@ static int mmc_decode_cid(struct mmc_card *card)
 	case 3: /* MMC v3.1 - v3.3 */
 	case 4: /* MMC v4 */
 		card->cid.manfid	= UNSTUFF_BITS(resp, 120, 8);
-		card->cid.oemid		= UNSTUFF_BITS(resp, 104, 8);
+		card->cid.oemid		= UNSTUFF_BITS(resp, 104, 16);
 		card->cid.prod_name[0]	= UNSTUFF_BITS(resp, 96, 8);
 		card->cid.prod_name[1]	= UNSTUFF_BITS(resp, 88, 8);
 		card->cid.prod_name[2]	= UNSTUFF_BITS(resp, 80, 8);
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines

From: Dominique Martinet <[email protected]>

This reverts commit 84ee19bffc9306128cd0f1c650e89767079efeff.

The commit above made quirks with an OEMID fail to be applied, as they were checking card->cid.oemid for the full 16 bits defined in MMC_FIXUP macros but the field would only contain the bottom 8 bits.

eMMC v5.1A might have bogus values in OEMID's higher bits so another fix will be made, but it has been decided to revert this until that is ready.

Fixes 84ee19bffc93 ("mmc: core: Capture correct oemid-bits for eMMC

cards")

Link:
https://lkml.kernel.org/r/CAPDyKFqkKibcXnwjnhc3+W1iJBHLeqQ9BpcZrSwh
[email protected]

Quoted 6 lines

techno.com>
Cc: [email protected]
Cc: Avri Altman <[email protected]>
Cc: Ulf Hansson <[email protected]>
Cc: Alex Fetters <[email protected]>

Quoted 24 lines

---
Here's the revert as discussed in "mmc: truncate quirks' oemid to 8 bits"' patch thread.
Feel free to ignore if you already have something, I just checked your -next branch quickly and might have missed it.

 drivers/mmc/core/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/mmc.c index renamed from drivers/mmc/core/mmc.c +0 -0

4a4bab9aa726..89cd48fcec79 100644

drivers/mmc/core/mmc.c +1 -2
@@ -104,7 +104,7 @@ static int mmc_decode_cid(struct mmc_card *card)
        case 3: /* MMC v3.1 - v3.3 */
        case 4: /* MMC v4 */
                card->cid.manfid        = UNSTUFF_BITS(resp, 120, 8);
-               card->cid.oemid         = UNSTUFF_BITS(resp, 104, 8);
+               card->cid.oemid         = UNSTUFF_BITS(resp, 104, 16);
                card->cid.prod_name[0]  = UNSTUFF_BITS(resp, 96, 8);
                card->cid.prod_name[1]  = UNSTUFF_BITS(resp, 88, 8);
                card->cid.prod_name[2]  = UNSTUFF_BITS(resp, 80, 8);
--

2.41.0

#2 lore raw
In reply to Dominique Martinet
Quoted 12 lines · Dominique Martinet

From: Dominique Martinet <[email protected]>

This reverts commit 84ee19bffc9306128cd0f1c650e89767079efeff.

The commit above made quirks with an OEMID fail to be applied, as they were checking card->cid.oemid for the full 16 bits defined in MMC_FIXUP macros but the field would only contain the bottom 8 bits.

eMMC v5.1A might have bogus values in OEMID's higher bits so another fix will be made, but it has been decided to revert this until that is ready.

Quoted 8 lines

Applied for fixes, thanks!

Kind regards
Uffe

Quoted 25 lines

---
Here's the revert as discussed in "mmc: truncate quirks' oemid to 8 bits"' patch thread.
Feel free to ignore if you already have something, I just checked your

(quoted diff) +0 -1
-next branch quickly and might have missed it.
 
 drivers/mmc/core/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/mmc.c +1 -2
index 4a4bab9aa726..89cd48fcec79 100644
@@ -104,7 +104,7 @@ static int mmc_decode_cid(struct mmc_card *card)
        case 3: /* MMC v3.1 - v3.3 */
        case 4: /* MMC v4 */
                card->cid.manfid        = UNSTUFF_BITS(resp, 120, 8);
-               card->cid.oemid         = UNSTUFF_BITS(resp, 104, 8);
+               card->cid.oemid         = UNSTUFF_BITS(resp, 104, 16);
                card->cid.prod_name[0]  = UNSTUFF_BITS(resp, 96, 8);
                card->cid.prod_name[1]  = UNSTUFF_BITS(resp, 88, 8);
                card->cid.prod_name[2]  = UNSTUFF_BITS(resp, 80, 8);
--

2.41.0