LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [sdhci] mmc0: unrecognised SCR structure version 1
@ 2007-09-29  3:42 Adam Wysocki
  2007-09-29  8:35 ` Pierre Ossman
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Wysocki @ 2007-09-29  3:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: drzeus-list, giometti

[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/19116cafe8a20b5/4a28c3b15bb999df

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 lspci -vvvs 0a:06.4
0a:06.4 FLASH memory: ENE Technology Inc Unknown device 0551 (rev 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 255
        Region 0: Memory at d4101100 (32-bit, non-prefetchable) [disabled] [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-

Kernel version:

[gophi@amilo ~]$ uname -a
Linux amilo 2.6.22.7-amilo #5 SMP PREEMPT Wed Sep 26 16:35:47 CEST 2007 i686 GNU/Linux

I have posted some debugging messages from sdhci here (ca. 44 kB): 
http://www.chmurka.net/r/mmc-debug.txt 

PCMCIA (ide-cs) card reader does not see this card neither, but does not spit 
any error messages - just that the card is not seen in /proc/partitions:

pccard: PCMCIA card inserted into slot 0
cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xcffff 0xdc000-0xfffff
cs: memory probe 0x50000000-0x53ffffff: excluding 0x50000000-0x53ffffff
cs: memory probe 0x60000000-0x60ffffff: clean.
cs: memory probe 0xa0000000-0xa0ffffff: clean.
cs: memory probe 0xd4100000-0xd41fffff: excluding 0xd4100000-0xd410ffff
pcmcia: registering new device pcmcia0.0
Probing IDE interface ide1...
hdc: Memory Card Adapter II, CFA DISK drive
ide1 at 0x3100-0x3107,0x310e on irq 18
ide-cs: hdc: Vpp = 0.0

On the other side, my Canon A610 camera sees and handles this card properly. 
Also does the usb-storage reader:

Initializing USB Mass Storage driver...
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device scan complete
scsi 4:0:0:0: Direct-Access     Generic  USB SD Reader    1.00 PQ: 0 ANSI: 0
scsi 4:0:0:1: Direct-Access     Generic  USB CF Reader    1.01 PQ: 0 ANSI: 0
scsi 4:0:0:2: Direct-Access     Generic  USB SM Reader    1.02 PQ: 0 ANSI: 0
scsi 4:0:0:3: Direct-Access     Generic  USB MS Reader    1.03 PQ: 0 ANSI: 0
sd 4:0:0:0: [sdb] 4022272 512-byte hardware sectors (2059 MB)
sd 4:0:0:0: [sdb] Write Protect is off
sd 4:0:0:0: [sdb] Mode Sense: 03 00 00 00
sd 4:0:0:0: [sdb] Assuming drive cache: write through
sd 4:0:0:0: [sdb] 4022272 512-byte hardware sectors (2059 MB)
sd 4:0:0:0: [sdb] Write Protect is off
sd 4:0:0:0: [sdb] Mode Sense: 03 00 00 00
sd 4:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 4:0:0:0: [sdb] Attached SCSI removable disk
sd 4:0:0:1: [sdc] Attached SCSI removable disk
sd 4:0:0:2: [sdd] Attached SCSI removable disk
sd 4:0:0:3: [sde] Attached SCSI removable disk

Any ideas or suggestions?

Thanks in advance.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sdhci] mmc0: unrecognised SCR structure version 1
  2007-09-29  3:42 [sdhci] mmc0: unrecognised SCR structure version 1 Adam Wysocki
@ 2007-09-29  8:35 ` Pierre Ossman
  2007-09-29 12:27   ` Adam Wysocki
  2008-02-06 23:10   ` [semi-solved] " Andreas Mohr
  0 siblings, 2 replies; 5+ messages in thread
From: Pierre Ossman @ 2007-09-29  8:35 UTC (permalink / raw)
  To: Adam Wysocki; +Cc: linux-kernel, giometti

On Sat, 29 Sep 2007 05:42:37 +0200 (CEST)
Adam Wysocki <gophi-lkml@chmurka.net> wrote:

> [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/19116cafe8a20b5/4a28c3b15bb999df
> 
> 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:
> 

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
compatibility.)

> 
> I have posted some debugging messages from sdhci here (ca. 44 kB): 
> http://www.chmurka.net/r/mmc-debug.txt 
> 

"Forbidden"

> PCMCIA (ide-cs) card reader does not see this card neither, but does
> not spit any error messages - just that the card is not seen
> in /proc/partitions:

That card reader probably just doesn't have a way of reporting errors
back to you.

> 
> On the other side, my Canon A610 camera sees and handles this card
> properly. Also does the usb-storage reader:
> 

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sdhci] mmc0: unrecognised SCR structure version 1
  2007-09-29  8:35 ` Pierre Ossman
@ 2007-09-29 12:27   ` Adam Wysocki
  2008-02-06 23:10   ` [semi-solved] " Andreas Mohr
  1 sibling, 0 replies; 5+ messages in thread
From: Adam Wysocki @ 2007-09-29 12:27 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: linux-kernel, giometti

29.09.07 drzeus-list@drzeus.cx napisał:

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

If you say so - I will do it, and also try to borrow some other SD card 
(this is my only one) to test.

> > I have posted some debugging messages from sdhci here (ca. 44 kB): 
> > http://www.chmurka.net/r/mmc-debug.txt 
> 
> "Forbidden"

Sorry, now it's ok.

Thanks,

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [semi-solved] Re: [sdhci] mmc0: unrecognised SCR structure version 1
  2007-09-29  8:35 ` Pierre Ossman
  2007-09-29 12:27   ` Adam Wysocki
@ 2008-02-06 23:10   ` Andreas Mohr
  2008-02-07 19:41     ` Pierre Ossman
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Mohr @ 2008-02-06 23:10 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: Adam Wysocki, linux-kernel, giometti

Hi,

On Sat, Sep 29, 2007 at 10:35:16AM +0200, Pierre Ossman wrote:
> On Sat, 29 Sep 2007 05:42:37 +0200 (CEST)
> Adam Wysocki <gophi-lkml@chmurka.net> wrote:
> 
> > [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/19116cafe8a20b5/4a28c3b15bb999df
> > 
> > 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:
> > 
> 
> 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.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [semi-solved] Re: [sdhci] mmc0: unrecognised SCR structure version 1
  2008-02-06 23:10   ` [semi-solved] " Andreas Mohr
@ 2008-02-07 19:41     ` Pierre Ossman
  0 siblings, 0 replies; 5+ messages in thread
From: Pierre Ossman @ 2008-02-07 19:41 UTC (permalink / raw)
  To: Andreas Mohr; +Cc: Adam Wysocki, linux-kernel, giometti

On Thu, 7 Feb 2008 00:10:16 +0100
Andreas Mohr <andi@lisas.de> wrote:

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

Ouch. That would explain more or less any SCR related bug. :)

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

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

Are you seeing this effect on other cards?

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

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

Other than that, try adding some printk() to pxamci's data transfer routines and dump the data when it is fresh.

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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-07 19:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-29  3:42 [sdhci] mmc0: unrecognised SCR structure version 1 Adam Wysocki
2007-09-29  8:35 ` Pierre Ossman
2007-09-29 12:27   ` Adam Wysocki
2008-02-06 23:10   ` [semi-solved] " Andreas Mohr
2008-02-07 19:41     ` Pierre Ossman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).