NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sdmmc / sdhc trouble



Hi,

> I just tried a new kingston technology sd4 card:

> (-current/amd64:)
> sdhc0 at pci1 dev 0 function 0: Ricoh 5U823 SD/MMC Controller (rev. 0x04)
> sdhc0: interrupting at ioapic0 pin 16
> sdhc0: SD Host Specification 3.0, rev.5
> sdhc0: using DMA transfer
> sdmmc0 at sdhc0 slot 0
> ld0 at sdmmc0: <SD16G>
> ld0: 14756 MB, 7495 cyl, 64 head, 63 sec, 512 bytes/sect x 30220288 sectors
> ld0: 4-bit width, bus clock 50.000 MHz

> ...

> ld0e: error writing fsbn 8192 of 8192-8255 (ld0 bn 16384; cn 4 tn 4 sn 4)
> ld0e: error reading fsbn 8192 of 8192-8255 (ld0 bn 16384; cn 4 tn 4 sn 4)
> ld0e: error reading fsbn 8192 of 8192-8255 (ld0 bn 16384; cn 4 tn 4 sn 4)
> ld0e: error reading fsbn 8192 of 8192-8255 (ld0 bn 16384; cn 4 tn 4 sn 4)
> ld0e: error reading fsbn 8192 of 8192-8255 (ld0 bn 16384; cn 4 tn 4 sn 4)
> ld0e: error reading fsbn 8192 of 8192-8255 (ld0 bn 16384; cn 4 tn 4 sn 4)
> 
> How can I use the card?

Enable DEBUG to know the error. Possibly ETIMEDOUT, in which case you may want
to read http://mail-index.netbsd.org/port-arm/2012/10/25/msg001548.html

I read a lot on the subject and it seems that SDHC cards are a real pain to
support. Some SDHC craps^Wcards need some very high delays/timeouts and in
Linux, there are udelay()s for them to work. The timeouts from the SDHC
specification don't seem to be enough.

I'ld try to play with timeouts and sdmmc_delay() (see
http://mail-index.netbsd.org/port-arm/2012/10/24/msg001542.html). I was about to
do this when I realized I wasn't using sdhc(4) but mvsdio(4).

This is only guessing and trying to reproduce workarounds that are implemented
in other projects. Sorry if it is nonsense.
 

Cheers,

Sebastien


Home | Main Index | Thread Index | Old Index