[semi-solved] Re: [sdhci] mmc0: unrecognised SCR structure version 1

Previous thread: Re: MSI interrupts and disable_irq by Jeff Garzik on Friday, September 28, 2007 - 10:47 pm. (21 messages)

Next thread: [git patches] net driver updates by Jeff Garzik on Saturday, September 29, 2007 - 2:08 am. (1 message)
To: <linux-kernel@...>
Cc: <drzeus-list@...>, <giometti@...>
Date: Friday, September 28, 2007 - 11:42 pm

[CCd to possibly interested Pierre Ossman and Rodolfo Giometti]

Hi there,

First, sorry for my poor english - I am not a native.

I know there have been a thread about this problem few months ago, but as
far as I see it did not led to any results:
http://groups.google.com/group/linux.kernel/browse_thread/thread/19116ca...

I have the same problem, as described there, with Kingston 2GB SD card. My
card reader is embedded into Fujitsu-Siemens AMILO Pro V3505 notebook and
Linux sees it as:

[gophi@amilo ~]$ sudo lspci -vvvs 0a:06.2
0a:06.2 Generic system peripheral [0805]: ENE Technology Inc ENE PCI Secure Digital Card Reader Controller (rev 01) (prog-if 01)
Subsystem: Fujitsu Siemens Computer GmbH Unknown device 10c1
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (8000ns min, 18000ns max), Cache Line Size: 64 bytes
Interrupt: pin B routed to IRQ 22
Region 0: Memory at d4101400 (32-bit, non-prefetchable) [size=256]
Capabilities: [80] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

This is the one to which the sdhci driver attached, as regards to sysfs:

[gophi@amilo /sys/bus/pci/drivers/sdhci]$ ls -l
razem 0
lrwxrwxrwx 1 root root 0 2007-09-29 05:03 0000:0a:06.2 -> ../../../../devices/pci0000:00/0000:00:1e.0/0000:0a:06.2
--w------- 1 root root 4096 2007-09-29 05:03 bind
lrwxrwxrwx 1 root root 0 2007-09-29 05:03 module -> ../../../../module/sdhci
--w------- 1 root root 4096 2007-09-29 05:03 new_id
--w------- 1 root root 4096 2007-09-29 05:03 unbind

I also have some other devices in system relevant to the card reader - Memory
Stick reader and one "unknown device":

[gophi@amilo ~]$ sudo ls...

To: Adam Wysocki <gophi-lkml@...>
Cc: <linux-kernel@...>, <giometti@...>
Date: Saturday, September 29, 2007 - 4:35 am

On Sat, 29 Sep 2007 05:42:37 +0200 (CEST)

If it's just this card, then I would have to conclude that it is indeed
broken. You'd have to return it to the store and get a new one.

(I'm afraid we can't just ignore the version field as there have been
several changes in the past where new version means no backward

That card reader probably just doesn't have a way of reporting errors

I'd be very cautious about using those then. Since they obviously just
assume they can use any card you stick in there, it's a good chance
they'll start eating your data when never cards hit the market.

Rgds
--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
-

To: Pierre Ossman <drzeus-list@...>
Cc: Adam Wysocki <gophi-lkml@...>, <linux-kernel@...>, <giometti@...>
Date: Wednesday, February 6, 2008 - 7:10 pm

Hi,

My Toshiba SD-512-T card (Toshiba-specific specs are available as
TOSHIBA_SD_Card_Specification.pdf) shows the same "SCR structure version 1"
error message with 2.6.24 on a Motorola E680 (PXAMCI), whereas
on 2.6.21 it did _NOT_ have it (and all SCR values there are a 1:1 match
with the values listed in the spec .pdf!).

For me at least it turned out that while on 2.6.21, raw_scr had
0x00a50000 0x10011602
on 2.6.24 raw_scr had
0x10011602 0x00000000

IOW, the whole thing is simply shifted by one unsigned int, rendering any
SCR interpretation fatally wrong (which, I believe, could be a
_permanent_ error in the SD stack itself which randomly -
depending on the exact bit content of a card's SCR dump -
causes the SCR version check to trigger for various cards).
Is this unsigned int shifting due to a transfer setup issue in the
highlevel SD stack or do you think it is due to a setup issue in the
lower-level pxamci driver in my case? If so, what setting could have
distorted it?
Weak voltage settings are not to blame, I believe (removed some configs to
increase a bit from minimum supported voltage).
If you don't have any specific ideas yet, any hints on how to proceed
with tracking this down?

I'd advise at least adding dumping the raw_scr values
in the SCR version error to be able to track such error postings better
in the future.

I'm now giving up on tracking this down myself (I'll just bail the check for
now to have it boot properly) since originally I had more productive things
in mind ;)
(note that disabling the check on 2.6.24 makes the card boot ok
up to a full mobile desktop)

Thanks,

Andreas Mohr
--

To: Andreas Mohr <andi@...>
Cc: Adam Wysocki <gophi-lkml@...>, <linux-kernel@...>, <giometti@...>
Date: Thursday, February 7, 2008 - 3:41 pm

On Thu, 7 Feb 2008 00:10:16 +0100

I'm not seeing it on any controller here, so right now I'd guess a driver problem. No idea why though.

There's always bisecting the issue until you find the offending commit. Time consuming, but it gets the job done.

It's definitely something to remember in future bug reports.

Rgds
--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
--

To: Pierre Ossman <drzeus-list@...>
Cc: <linux-kernel@...>, <giometti@...>
Date: Saturday, September 29, 2007 - 8:27 am

If you say so - I will do it, and also try to borrow some other SD card

Sorry, now it's ok.

Thanks,

--
[[:pl:user:gophi]]
-

Previous thread: Re: MSI interrupts and disable_irq by Jeff Garzik on Friday, September 28, 2007 - 10:47 pm. (21 messages)

Next thread: [git patches] net driver updates by Jeff Garzik on Saturday, September 29, 2007 - 2:08 am. (1 message)