Skip to contentSkip to conversation

regression: sd cards no longer recognized

PATCH Applied Alexander Elbs 4 participants 7 messages Jan 1, 2012 – Jan 4, 2012

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

Hi,

on a dell vostro with an integrated SD card reader I have the problem, that inserted SD cards are no longer recognized.
The reader is a "O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)" (1217:7120).

Doing a git bisect I found that commit 49c468f "mmc: sd: add support for uhs bus speed mode selection" caused this regression.

Looking more closely into it I found that the flag SDHCI_CTRL_HISPD is always set even on MMC_TIMING_UHS_SDR12 (which is an alias for MMC_TIMING_LEGACY).

If that flag in that case is not set (as was before commit 49c468f) my reader works fine again.

Could you include that fix or does it break other readers?

Regards,
Alexander Elbs

---
 drivers/mmc/host/sdhci.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci.c +0 -0
index 6d8eea3..8872e92 100644
@@ -1364,8 +1364,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host,

struct mmc_ios *ios)

                if ((ios->timing == MMC_TIMING_UHS_SDR50) ||
                    (ios->timing == MMC_TIMING_UHS_SDR104) ||
                    (ios->timing == MMC_TIMING_UHS_DDR50) ||
-                   (ios->timing == MMC_TIMING_UHS_SDR25) ||
-                   (ios->timing == MMC_TIMING_UHS_SDR12))
+                   (ios->timing == MMC_TIMING_UHS_SDR25))
                        ctrl |= SDHCI_CTRL_HISPD;
 
                ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2);
Signature · 1 line
Alexander Elbs  ***  eMail [email protected]
#1 lore raw

Hi Alexander,

Quoted 39 lines · Alexander Elbs

Hi,

on a dell vostro with an integrated SD card reader I have the problem, that inserted SD cards are no longer recognized.
The reader is a "O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)" (1217:7120).

Doing a git bisect I found that commit 49c468f "mmc: sd: add support for uhs bus speed mode selection" caused this regression.

Looking more closely into it I found that the flag SDHCI_CTRL_HISPD is always set even on MMC_TIMING_UHS_SDR12 (which is an alias for MMC_TIMING_LEGACY).

If that flag in that case is not set (as was before commit 49c468f) my reader works fine again.

Could you include that fix or does it break other readers?

Regards,
Alexander Elbs

---
 drivers/mmc/host/sdhci.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci.c +1 -2
index 6d8eea3..8872e92 100644
@@ -1364,8 +1364,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host,
 struct mmc_ios *ios)
                if ((ios->timing == MMC_TIMING_UHS_SDR50) ||
                    (ios->timing == MMC_TIMING_UHS_SDR104) ||
                    (ios->timing == MMC_TIMING_UHS_DDR50) ||
-                   (ios->timing == MMC_TIMING_UHS_SDR25) ||
-                   (ios->timing == MMC_TIMING_UHS_SDR12))
+                   (ios->timing == MMC_TIMING_UHS_SDR25))
                        ctrl |= SDHCI_CTRL_HISPD;
 
Quoted 1 line
                ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2);

Thanks for the report -- adding Arindam and Philip to CC for comments.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#2 lore raw
Quoted 50 lines · Chris Ball

Hi Alexander,

Quoted 39 lines · Alexander Elbs

Hi,

on a dell vostro with an integrated SD card reader I have the problem, that inserted SD cards are no longer recognized.
The reader is a "O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)" (1217:7120).

Doing a git bisect I found that commit 49c468f "mmc: sd: add support for uhs bus speed mode selection" caused this regression.

Looking more closely into it I found that the flag SDHCI_CTRL_HISPD is always set even on MMC_TIMING_UHS_SDR12 (which is an alias for MMC_TIMING_LEGACY).

If that flag in that case is not set (as was before commit 49c468f) my reader works fine again.

Could you include that fix or does it break other readers?

Regards,
Alexander Elbs

---
drivers/mmc/host/sdhci.c | 3 +--

1 files changed, 1 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci.c +1 -2
index 6d8eea3..8872e92 100644
@@ -1364,8 +1364,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host,
 struct mmc_ios *ios)
               if ((ios->timing == MMC_TIMING_UHS_SDR50) ||
                   (ios->timing == MMC_TIMING_UHS_SDR104) ||
                   (ios->timing == MMC_TIMING_UHS_DDR50) ||
-                   (ios->timing == MMC_TIMING_UHS_SDR25) ||
-                   (ios->timing == MMC_TIMING_UHS_SDR12))
+                   (ios->timing == MMC_TIMING_UHS_SDR25))
                       ctrl |= SDHCI_CTRL_HISPD;
 
Quoted 1 line
               ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2);

Thanks for the report -- adding Arindam and Philip to CC for comments.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#4 lore raw
Quoted 7 lines · Chris Ball

Hi,

Quoted 1 line · Philip Rakity

Thanks. Alexander, could you give me a "Signed-off-by:" for the record?

---
 drivers/mmc/host/sdhci.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci.c +0 -0
index 19ed580..5e0de61 100644
@@ -1364,8 +1364,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host,

struct mmc_ios *ios)

                if ((ios->timing == MMC_TIMING_UHS_SDR50) ||
                    (ios->timing == MMC_TIMING_UHS_SDR104) ||
                    (ios->timing == MMC_TIMING_UHS_DDR50) ||
-                   (ios->timing == MMC_TIMING_UHS_SDR25) ||
-                   (ios->timing == MMC_TIMING_UHS_SDR12))
+                   (ios->timing == MMC_TIMING_UHS_SDR25))
                        ctrl |= SDHCI_CTRL_HISPD;
 
                ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2);
Signature · 1 line
1.7.8.rc3
Applied
#5 lore raw

Hi,

Quoted 9 lines · Alexander Elbs
Quoted 6 lines · Chris Ball

Hi,

Quoted 1 line · Philip Rakity

Thanks. Alexander, could you give me a "Signed-off-by:" for the record?

Pushed to mmc-next for 3.3 with a stable@ tag, with ACKs from Philip and Arindam. Thanks very much for tracking this down, Alexander!

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
Acked-by
#6 lore raw
In reply to Philip Rakity
Quoted 71 lines

-----Original Message-----
From: Philip Rakity [mailto:[email protected]]
Sent: Tuesday, January 03, 2012 6:54 AM
To: Chris Ball
Cc: Alexander Elbs; Nath, Arindam; [email protected]
Subject: Re: regression: sd cards no longer recognized

Quoted 6 lines · Chris Ball

Hi Alexander,

Quoted 3 lines · Alexander Elbs

Hi,

on a dell vostro with an integrated SD card reader I have the

problem, that

Quoted 2 lines
Quoted 2 lines

inserted SD cards are no longer recognized.
The reader is a "O2 Micro, Inc. Integrated MMC/SD Controller (rev

02)"

Quoted 3 lines
Quoted 3 lines

(1217:7120).

Doing a git bisect I found that commit 49c468f "mmc: sd: add support

for uhs

Quoted 3 lines
Quoted 3 lines

bus speed mode selection" caused this regression.

Looking more closely into it I found that the flag SDHCI_CTRL_HISPD

is always

Quoted 1 line
Quoted 1 line

set even on MMC_TIMING_UHS_SDR12 (which is an alias for

MMC_TIMING_LEGACY).

Quoted 2 lines
Quoted 2 lines

If that flag in that case is not set (as was before commit 49c468f)

my reader

Quoted 11 lines
Quoted 11 lines

works fine again.

Could you include that fix or does it break other readers?

Regards,
Alexander Elbs

---
drivers/mmc/host/sdhci.c | 3 +--

1 files changed, 1 insertions(+), 2 deletions(-)
Quoted 5 lines

drivers/mmc/host/sdhci.c static void sdhci_do_set_ios(struct sdhci_host

Quoted 5 lines
drivers/mmc/host/sdhci.c +0 -0
index 6d8eea3..8872e92 100644
@@ -1364,8 +1364,7 @@ static void sdhci_do_set_ios(struct sdhci_host

*host,

Quoted 9 lines
Quoted 9 lines
drivers/mmc/host/sdhci.c +1 -2
 struct mmc_ios *ios)
               if ((ios->timing == MMC_TIMING_UHS_SDR50) ||
                   (ios->timing == MMC_TIMING_UHS_SDR104) ||
                   (ios->timing == MMC_TIMING_UHS_DDR50) ||
-                   (ios->timing == MMC_TIMING_UHS_SDR25) ||
-                   (ios->timing == MMC_TIMING_UHS_SDR12))
+                   (ios->timing == MMC_TIMING_UHS_SDR25))
                       ctrl |= SDHCI_CTRL_HISPD;
 
Quoted 3 lines
Quoted 1 line
               ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2);

Thanks for the report -- adding Arindam and Philip to CC for

comments.

Quoted 5 lines

- Chris.
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child