Re: tifm_7xx1: SD card is ignored

Previous thread: [PATCH] prepare kconfig inline optimization for all architectures by Sam Ravnborg on Sunday, April 27, 2008 - 3:51 am. (30 messages)

Next thread: [RFC v2 1/8] modpost: add support for hid by Jiri Slaby on Sunday, April 27, 2008 - 4:48 am. (9 messages)
From: Kim Hansen
Date: Sunday, April 27, 2008 - 3:59 am

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.
-- 
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Fastnet: 3956 2437 -- Mobil: 3091 2437
--

From: Alex Dubov
Date: Sunday, April 27, 2008 - 8:47 am

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
--

From: Kim Hansen
Date: Monday, April 28, 2008 - 1:43 pm

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


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

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

From: Alex Dubov
Date: Monday, April 28, 2008 - 4:55 pm

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
--

From: Kim Hansen
Date: Tuesday, May 6, 2008 - 10:56 am

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,
-- 
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Fastnet: 3956 2437 -- Mobil: 3091 2437
--

From: Alex Dubov
Date: Wednesday, May 7, 2008 - 6:21 am

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


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
--

From: Kim Hansen
Date: Wednesday, May 7, 2008 - 9:50 am

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

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 ...
From: Kim Hansen
Date: Wednesday, May 7, 2008 - 11:28 am

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.

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

From: Pierre Ossman
Date: Wednesday, May 21, 2008 - 5:21 am

On Wed, 7 May 2008 18:50:54 +0200

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


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
From: Kim Hansen
Date: Friday, May 23, 2008 - 2:32 am

I will try that.

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

Previous thread: [PATCH] prepare kconfig inline optimization for all architectures by Sam Ravnborg on Sunday, April 27, 2008 - 3:51 am. (30 messages)

Next thread: [RFC v2 1/8] modpost: add support for hid by Jiri Slaby on Sunday, April 27, 2008 - 4:48 am. (9 messages)