Skip to contentSkip to conversation

tifm_7xx1: SD card is ignored

DISCUSSION Kim Hansen 3 participants 10 messages Apr 27, 2008 – May 23, 2008

lore
Share & tools
lore

Kim Hansen

author
#0 lore raw

I have the problem that the SD card slot does not work on my Toshiba Protege M400 with my current kernel (2.6.24), it worked for me with 2.6.18 but has been broken at least since 2.6.22.

The problem is that nothing happens, dmesg is silent and I guess the cause is that the driver does not see the hardware.

How should I start debugging this?

raph:~# lspci
[...]
03:0b.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia
Card Reader (SD/MMC/MS/MS PRO/xD)
03:0b.3 SD Host controller: Texas Instruments PCIxx12 SDA Standard
Compliant SD Host Controller
raph:~# lsmod | grep tifm
tifm_sd                10888  0
tifm_7xx1               7360  0
mmc_core               47300  2 tifm_sd,sdhci
tifm_core               9956  2 tifm_sd,tifm_7xx1
raph:~# dmesg | grep -i tifm
raph:~#

PS: I am not subscribed to lkml, please cc me on replies.

Signature · 4 lines
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Fastnet: 3956 2437 -- Mobil: 3091 2437
#1 lore raw
Quoted 9 lines · --- Kim Hansen

I have the problem that the SD card slot does not work on my Toshiba Protege M400 with my current kernel (2.6.24), it worked for me with 2.6.18 but has been broken at least since 2.6.22.

The problem is that nothing happens, dmesg is silent and I guess the cause is that the driver does not see the hardware.

How should I start debugging this?

First, there's an option in the kernel config enabling debugging print-outs (called "MMC Debugging" under MMC). Enable it, recompile the modules and you'll get plenty of dmesg noise.

Second, the fact modules are loaded means that driver sees the hardware all right. There can be some sort of interplay between sdhci and tifm_sd as they use the same chip. I think you should blacklist one of them. Which one - depends on the settings in you flashmedia chip's eeprom (some vendors disable sdhci interface and some flashmedia one).

You need an mmc_block module loaded too.

In the worst case, you can always blame the TI. Some TI guy notified me that my driver contains errors affecting 803b series controllers (I myself have a 8033). He, however, had not told me what they are. Very nice, indeed.

      ____________________________________________________________________________________

Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

author
#2 lore raw
Quoted 10 lines · Alex Dubov
Quoted 7 lines · --- Kim Hansen

I have the problem that the SD card slot does not work on my Toshiba Protege M400 with my current kernel (2.6.24), it worked for me with 2.6.18 but has been broken at least since 2.6.22.

The problem is that nothing happens, dmesg is silent and I guess the cause is that the driver does not see the hardware.

Quoted 6 lines
Quoted 2 lines

How should I start debugging this?

First, there's an option in the kernel config enabling debugging print-outs (called "MMC Debugging" under MMC). Enable it, recompile the modules and you'll get plenty of dmesg noise.

I just downloaded 2.6.25 and compiled, and now it works. The 2.6.24 kernel was from Debian, but I know that I also had the problem with 2.6.22 which I compiled myself. When 2.6.25 comes in Debian I will see if the problem is still there.

Quoted 5 lines

Second, the fact modules are loaded means that driver sees the hardware all right. There can be some sort of interplay between sdhci and tifm_sd as they use the same chip. I think you should blacklist one of them. Which one - depends on the settings in you flashmedia chip's eeprom (some vendors disable sdhci interface and some flashmedia one).

Is there a way to find out which one to use ?

Quoted 3 lines

In the worst case, you can always blame the TI. Some TI guy notified me that my driver contains errors affecting 803b series controllers (I myself have a 8033). He, however, had not told me what they are. Very nice, indeed.

Is there some tests I could run to see if I can find the errors?

Regards,

Signature · 4 lines
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Fastnet: 3956 2437 -- Mobil: 3091 2437
#3 lore raw
Quoted 5 lines · --- Kim Hansen

Is there a way to find out which one to use ?

Is there some tests I could run to see if I can find the errors?

If you happen to have some good friends at TI, then probably yes.

I don't have any datasheets for these chips.

      ____________________________________________________________________________________

Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

author
#4 lore raw
In reply to Kim Hansen
Quoted 14 lines · Kim Hansen
Quoted 13 lines · Alex Dubov
Quoted 9 lines · --- Kim Hansen

I have the problem that the SD card slot does not work on my Toshiba Protege M400 with my current kernel (2.6.24), it worked for me with 2.6.18 but has been broken at least since 2.6.22.

The problem is that nothing happens, dmesg is silent and I guess the cause is that the driver does not see the hardware.

How should I start debugging this?

Quoted 8 lines
Quoted 3 lines

First, there's an option in the kernel config enabling debugging print-outs (called "MMC Debugging" under MMC). Enable it, recompile the modules and you'll get plenty of dmesg noise.

I just downloaded 2.6.25 and compiled, and now it works. The 2.6.24 kernel was from Debian, but I know that I also had the problem with 2.6.22 which I compiled myself. When 2.6.25 comes in Debian I will see if the problem is still there.

Unfortunately my machine crashes every hour or so when I run 2.6.25, both with the home build kernel and with the Debian kernel, this makes it impossible for me to do any real testing. The SD card works on the home build kernel, but not on the Debian kernel, I will wait for 2.6.25 to become stable for me and then find the difference between the two build that prevents the SD card from working on one of them.

I have also tried to compile 2.6.24 for myself now in order to see if the SD would work there, it didn't, but I got a reaction in the dmesg now:
mmc0: card claims to support voltages below the defined range. These
will be ignored.
mmc0: SDIO card claims to support the incompletely defined 'low
voltage range'. This will be ignored.
mmc0: error -110 whilst initialising SDIO card

This might explain what the problem is?

Anyway, thanks for your time, I will just wait a little longer as it almost works now,

Signature · 4 lines
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Fastnet: 3956 2437 -- Mobil: 3091 2437
#5 lore raw
Quoted 6 lines

Unfortunately my machine crashes every hour or so when I run 2.6.25, both with the home build kernel and with the Debian kernel, this makes it impossible for me to do any real testing. The SD card works on the home build kernel, but not on the Debian kernel, I will wait for 2.6.25 to become stable for me and then find the difference between the two build that prevents the SD card from working on one of them.

As you could guess, I have no idea how's debian kernel different from the stock one.

Quoted 10 lines

I have also tried to compile 2.6.24 for myself now in order to see if the SD would work there, it didn't, but I got a reaction in the dmesg now:
mmc0: card claims to support voltages below the defined range. These
will be ignored.
mmc0: SDIO card claims to support the incompletely defined 'low
voltage range'. This will be ignored.
mmc0: error -110 whilst initialising SDIO card

Quoted 4 lines

This might explain what the problem is?

Anyway, thanks for your time, I will just wait a little longer as it almost works now,

First, where's debug log? There are plenty of debug messages in the MMC code - just enable the debug printout and send it to me or Pierre.

Second, I'm not sure the problem is tifm specific, otherwise where's SDIO stuff comes from?

      ____________________________________________________________________________________

Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

author
#6 lore raw
Quoted 6 lines · Alex Dubov
Quoted 6 lines

Unfortunately my machine crashes every hour or so when I run 2.6.25, both with the home build kernel and with the Debian kernel, this makes it impossible for me to do any real testing. The SD card works on the home build kernel, but not on the Debian kernel, I will wait for 2.6.25 to become stable for me and then find the difference between the two build that prevents the SD card from working on one of them.

Now it just looks like it sometimes work and other times don't, on some kernels it works on 80% inserts and on other it only works on 5%. This means that the problem most likely has not been fixed between 2.6.24 and 2.6.25, it was just a coincidence that it worked on on and not the other the first few times I tested it.

Quoted 15 lines
Quoted 9 lines

I have also tried to compile 2.6.24 for myself now in order to see if the SD would work there, it didn't, but I got a reaction in the dmesg now:
mmc0: card claims to support voltages below the defined range. These
will be ignored.
mmc0: SDIO card claims to support the incompletely defined 'low
voltage range'. This will be ignored.
mmc0: error -110 whilst initialising SDIO card

Quoted 4 lines

This might explain what the problem is?

Anyway, thanks for your time, I will just wait a little longer as it almost works now,

Quoted 5 lines

First, where's debug log? There are plenty of debug messages in the MMC code - just enable the debug printout and send it to me or Pierre.

Second, I'm not sure the problem is tifm specific, otherwise where's SDIO stuff comes from?

I think you are right, it looks like this computer uses the sdhci interface.

I have captured some logs now, there is logs of a successful insert and remove, and of an unsuccessful.

Successful insert: 16:18:50 remove: 16:20:26
Unsuccessful insert: 16:21:38 remove: 16:21:47

The log can be found at: http://i9.dk/~kim/mmc-log.txt.bz2

This is the part from the unsuccessful insert:
sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00000040
mmc0: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0 timing 0
mmc0: clock 187500Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc0: clock 187500Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0 timing 0
mmc0: starting CMD0 arg 00000000 flags 000000c0
sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00000001
mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
mmc0: clock 187500Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc0: starting CMD8 arg 000001aa flags 000002f5
sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00018000
mmc0: req done (CMD8): -110: 00000000 00000000 00000000 00000000
mmc0: starting CMD5 arg 00000000 flags 000002e1
sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00018000
mmc0: req failed (CMD5): -110, retrying...
sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00018000
mmc0: req failed (CMD5): -110, retrying...
sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00018000
mmc0: req failed (CMD5): -110, retrying...
sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00000001
mmc0: req done (CMD5): 0: ffffffff 00000000 00000000 00000000
mmc0: card claims to support voltages below the defined range. These will be ignored.
mmc0: SDIO card claims to support the incompletely defined 'low voltage range'. This will be ignored.
mmc0: clock 187500Hz busmode 1 powermode 2 cs 0 Vdd 20 width 0 timing 0
mmc0: starting CMD5 arg 00300000 flags 000002e1
sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00018000
mmc0: req failed (CMD5): -110, retrying...
sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00018000
mmc0: req failed (CMD5): -110, retrying...
sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00018000
mmc0: req failed (CMD5): -110, retrying...
sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00018000
mmc0: req done (CMD5): -110: 00000000 00000000 00000000 00000000
mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0
mmc0: error -110 whilst initialising SDIO card
mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0

Signature · 4 lines
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Fastnet: 3956 2437 -- Mobil: 3091 2437
author
#7 lore raw
Quoted 8 lines · Kim Hansen

I have captured some logs now, there is logs of a successful insert and remove, and of an unsuccessful.

Successful insert: 16:18:50 remove: 16:20:26
Unsuccessful insert: 16:21:38 remove: 16:21:47

The log can be found at: http://i9.dk/~kim/mmc-log.txt.bz2

I just tested on 2.6.25, and the behaviour is the same as on 2.6.24. Sometimes the SD-card is accepted, other times is it rejected with the 'low voltage range' error, the logging is also the same.

Signature · 4 lines
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Fastnet: 3956 2437 -- Mobil: 3091 2437
#8 lore raw
In reply to Kim Hansen
Quoted 5 lines · On Wed, 7 May 2008 18:50:54 +0200 "Kim Hansen" <[email protected]> wrote:

Now it just looks like it sometimes work and other times don't, on some kernels it works on 80% inserts and on other it only works on 5%. This means that the problem most likely has not been fixed between 2.6.24 and 2.6.25, it was just a coincidence that it worked on on and not the other the first few times I tested it.

I missed the start of this, but I assume it is just the one card that exhibits this craziness?

Quoted 9 lines

I have captured some logs now, there is logs of a successful insert and remove, and of an unsuccessful.

Successful insert: 16:18:50 remove: 16:20:26
Unsuccessful insert: 16:21:38 remove: 16:21:47

The log can be found at: http://i9.dk/~kim/mmc-log.txt.bz2

This is the part from the unsuccessful insert:

*snip*

Quoted 2 lines

sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00000001
mmc0: req done (CMD5): 0: ffffffff 00000000 00000000 00000000

What can I say, the card thinks it's an SDIO card. :)

The question is why. Might be some shoddy wiring between the card and the controller that causes some unlucky misinterpretations. Might also be that the card needs some increased delay to function correctly. Try adding:

	msleep(500);

to mmc_rescan() in drivers/mmc/core/core.c. Put it right after mmc_power_up().

Rgds
Pierre

author
#9 lore raw
Quoted 11 lines · Pierre Ossman
Quoted 5 lines · On Wed, 7 May 2008 18:50:54 +0200 "Kim Hansen" <[email protected]> wrote:

Now it just looks like it sometimes work and other times don't, on some kernels it works on 80% inserts and on other it only works on 5%. This means that the problem most likely has not been fixed between 2.6.24 and 2.6.25, it was just a coincidence that it worked on on and not the other the first few times I tested it.

I missed the start of this, but I assume it is just the one card that exhibits this craziness?

I can reproduce it on 3 different cards: SD 512MB, SD 4GB, MMC 64kB.

Quoted 22 lines
Quoted 9 lines

I have captured some logs now, there is logs of a successful insert and remove, and of an unsuccessful.

Successful insert: 16:18:50 remove: 16:20:26
Unsuccessful insert: 16:21:38 remove: 16:21:47

The log can be found at: http://i9.dk/~kim/mmc-log.txt.bz2

This is the part from the unsuccessful insert:

*snip*

Quoted 2 lines

sdhci [sdhci_irq()]: *** sdhci:slot0 got interrupt: 0x00000001
mmc0: req done (CMD5): 0: ffffffff 00000000 00000000 00000000

What can I say, the card thinks it's an SDIO card. :)

The question is why. Might be some shoddy wiring between the card and the controller that causes some unlucky misinterpretations. Might also be that the card needs some increased delay to function correctly. Try adding:

Quoted 4 lines
       msleep(500);

to mmc_rescan() in drivers/mmc/core/core.c. Put it right after mmc_power_up().

I will try that.

Signature · 4 lines
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Fastnet: 3956 2437 -- Mobil: 3091 2437