Bug 12524 - SD and MMC not working on GX620X
Summary: SD and MMC not working on GX620X
Status: RESOLVED UNREPRODUCIBLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: MMC/SD (show other bugs)
Hardware: All Linux
: P1 high
Assignee: Pierre Ossman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-22 12:23 UTC by David Heidelberg (okias)
Modified: 2010-01-22 10:21 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.30-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg with DEBUG :-) (49.29 KB, text/plain)
2009-03-04 04:45 UTC, David Heidelberg (okias)
Details
dmesg with SD card (81.57 KB, text/plain)
2009-03-08 09:45 UTC, David Heidelberg (okias)
Details
dmesg (59.23 KB, text/plain)
2009-03-25 21:00 UTC, David Heidelberg (okias)
Details

Description David Heidelberg (okias) 2009-01-22 12:23:57 UTC
Latest working kernel version: unknown
Earliest failing kernel version: 2.6.28
Distribution: Gentoo
Hardware Environment: MSI GX620X-061CZ
Software Environment: amd64, not depending on userspace
Problem Description:
sdhci: Secure Digital Host Controller Interface driver                                                                                                                                                        
sdhci: Copyright(c) Pierre Ossman                                                                                                                                                                             
sdhci-pci 0000:07:00.1: SDHCI controller found [197b:2382] (rev 0)                                                                                                                                            
sdhci-pci 0000:07:00.1: PCI INT A -> GSI 17 (level, low) -> IRQ 17                                                                                                                                            
sdhci-pci 0000:07:00.1: setting latency timer to 64                                                                                                                                                           
Registered led device: mmc0                                                                                                                                                                                   
Marking TSC unstable due to TSC halts in idle                                                                                                                                                                 
mmc0: SDHCI controller on PCI [0000:07:00.1] using DMA                                                                                                                                                        
sdhci-pci 0000:07:00.2: SDHCI controller found [197b:2381] (rev 0)                                                                                                                                            
sdhci-pci 0000:07:00.2: PCI INT A -> GSI 17 (level, low) -> IRQ 17                                                                                                                                            
sdhci-pci 0000:07:00.2: Refusing to bind to secondary interface.                                                                                                                                              
sdhci-pci 0000:07:00.2: PCI INT A disabled                                                                                                                                                                    
mmc0: error -110 whilst initialising MMC card                                                                                                                                                                 
mmc0: error -84 whilst initialising SD card

Steps to reproduce:

Plug MMC or SD card into notebook card-reader.
Comment 1 Ine Ya 2009-01-28 09:02:14 UTC
I have the same problem with kernel 2.6.28.2

When I plug in the card I get:
mmc0: error -84 whilst initialising SD card

lspci:

1a:00.0 System peripheral: JMicron Technologies, Inc. SD/MMC Host Controller
        Kernel driver in use: sdhci-pci
        Kernel modules: sdhci-pci
1a:00.2 SD Host controller: JMicron Technologies, Inc. Standard SD Host Controller
        Kernel modules: sdhci-pci
1a:00.3 System peripheral: JMicron Technologies, Inc. MS Host Controller
        Kernel driver in use: jmb38x_ms
        Kernel modules: jmb38x_ms

workaround:
insert sdhci with debug_quirks=1
Comment 2 Ine Ya 2009-01-28 09:16:43 UTC
adding to my comment #1:
My previous kernel 2.6.26 didn't have this problem. 
Using 2.6.28.2 you can try the workaround with debug_quirks=1 or it may also help if you keep the card in during boot.
Comment 3 Pierre Ossman 2009-02-26 09:15:14 UTC
This should be fixed in 2.6.29-rc6. Please retest.
Comment 4 David Heidelberg (okias) 2009-02-26 09:22:16 UTC
mmc still not fixed, sd can't test in this moment
Comment 5 Pierre Ossman 2009-02-26 09:35:57 UTC
Are you still getting -84 or something else?
Comment 6 David Heidelberg (okias) 2009-02-26 09:37:33 UTC
mmc0: error -110 whilst initialising MMC card
Comment 7 Pierre Ossman 2009-02-26 09:39:15 UTC
Ok so that's a change at least.

Did a previous kernel work for you? And does debug_quirks=1 affect anything?
Comment 8 David Heidelberg (okias) 2009-02-26 09:41:32 UTC
it's no change, and debug_quirks=1 added to kernel not working too (I have compiled driver into kernel)
Comment 9 David Heidelberg (okias) 2009-02-26 10:14:40 UTC
if you want to test some patches, just send it to my email address...
Comment 10 Pierre Ossman 2009-02-26 10:34:33 UTC
Oh sorry, I notice that you had the same error originally with MMC. Could you try and get ahold of that SD card and see if that error is gone at least?

Ine Ya, has -rc6 solved the issue for you?
Comment 11 David Heidelberg (okias) 2009-03-04 04:45:23 UTC
Created attachment 20426 [details]
dmesg with DEBUG :-)

Maybe it will help you with solving my problem ;-)
Comment 12 David Heidelberg (okias) 2009-03-04 04:47:21 UTC
I forgot card unplug:
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000080
mmc0: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0 timing 0
mmc0: clock 195312Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc0: clock 195312Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0 timing 0
mmc0: starting CMD0 arg 00000000 flags 000000c0
mmc0: req done (CMD0): -123: 00000000 00000000 00000000 00000000
mmc0: clock 195312Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc0: starting CMD8 arg 000001aa flags 000002f5
mmc0: req done (CMD8): -123: 00000000 00000000 00000000 00000000
mmc0: starting CMD5 arg 00000000 flags 000002e1
mmc0: req failed (CMD5): -123, retrying...
mmc0: req failed (CMD5): -123, retrying...
mmc0: req failed (CMD5): -123, retrying...
mmc0: req done (CMD5): -123: 00000000 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmc0: req done (CMD55): -123: 00000000 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmc0: req done (CMD55): -123: 00000000 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmc0: req done (CMD55): -123: 00000000 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmc0: req done (CMD55): -123: 00000000 00000000 00000000 00000000
mmc0: starting CMD1 arg 00000000 flags 000000e1
mmc0: req done (CMD1): -123: 00000000 00000000 00000000 00000000
mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0
Comment 13 Pierre Ossman 2009-03-04 06:50:21 UTC
Looks like you might simply have a buggy card. Has this ever worked? And have you tested with any other cards?
Comment 14 David Heidelberg (okias) 2009-03-04 07:00:58 UTC
This card works fine in my nokia N-Gage QD and it's Nokia 64MB card. This card is tested on linux in Toshiba a210-15j and working fine. I don't have in this moment access to any another card.
Comment 15 Pierre Ossman 2009-03-04 08:27:23 UTC
Can you get the same kind of dump from the Toshiba machine? It would be nice to have a working case for comparison.
Comment 16 David Heidelberg (okias) 2009-03-04 08:40:39 UTC
probably not with DEBUG (Kubuntu 9.04)
Comment 17 Ine Ya 2009-03-04 12:29:36 UTC
I have just tried 2.6.29-rc7, after reboot I checked that sdhci and sdhci-pci are loaded, I plugged in card and I got:

kernel: [ 2618.373249] mmc0: new SD card at address 0002
kernel: [ 2618.460531]  mmcblk0: p1

mount worked ok and I could list the content of card.
Comment 18 Pierre Ossman 2009-03-08 09:26:30 UTC
Good, at least the regression has been fixed.

Okias, if you could get some more cards for comparison, that would be helpful. Or if you could get a debug dump from a machine where your mmc card works.
Comment 19 David Heidelberg (okias) 2009-03-08 09:45:19 UTC
Created attachment 20455 [details]
dmesg with SD card

card is 100% ok, it's microSD in reduction, in Toshiba a210-15j working fine (Maybe I get today output from it)
Comment 20 David Heidelberg (okias) 2009-03-08 09:55:18 UTC
[  445.691125] mmc0: new high speed SD card at address 0002
[  445.735475] mmcblk0: mmc0:0002 00000 1.90 GiB
[  445.735543]  mmcblk0:
Output from toshiba, it works fine.
Comment 21 Pierre Ossman 2009-03-24 13:23:14 UTC
Good to see that your card is now working. Closing this bug.
Comment 22 David Heidelberg (okias) 2009-03-24 13:27:09 UTC
No it doesn't work!!!! It's OUTPUT FROM TOSHIBA (which use different driver!)
Comment 23 Pierre Ossman 2009-03-24 13:42:11 UTC
I'm confused. The dump you attached seems to have been run on the same machine as earlier (which back then at least wasn't the Toshiba), and from the looks of it the card is running just fine.
Comment 24 David Heidelberg (okias) 2009-03-24 13:45:39 UTC
Actual status >> same as before
MSI GX620X: _nothing_ work
Toshiba a210-15j: SD works, MMC works
Comment 25 Pierre Ossman 2009-03-24 14:14:05 UTC
The dumps in comment #11 and commend #19 are both from the toshiba?
Comment 26 David Heidelberg (okias) 2009-03-24 14:24:59 UTC
19 and 20 is from toshiba, 11 and 12 msi
Comment 27 David Heidelberg (okias) 2009-03-24 14:45:46 UTC
sorry, my bad... #11, #12, #19 is MSI and #20 is toshiba
Comment 28 Pierre Ossman 2009-03-25 20:34:26 UTC
The dumps in comment #11 and comment #19 are definitely from the same machine. You can see the same mac address for eth0.

Can you give me a lspci and a complete dmesg dump with MMC_DEBUG from the MSI machine?
Comment 29 David Heidelberg (okias) 2009-03-25 21:00:20 UTC
Created attachment 20680 [details]
dmesg

# lspci
00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)
00:01.0 PCI bridge: Intel Corporation Mobile 4 Series Chipset PCI Express Graphics Port (rev 07)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03)
00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
06:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100
07:00.0 FireWire (IEEE 1394): JMicron Technologies, Inc. IEEE 1394 Host Controller
07:00.1 System peripheral: JMicron Technologies, Inc. SD/MMC Host Controller
07:00.2 SD Host controller: JMicron Technologies, Inc. Standard SD Host Controller
07:00.3 System peripheral: JMicron Technologies, Inc. MS Host Controller
07:00.4 System peripheral: JMicron Technologies, Inc. xD Host Controller
08:00.0 VGA compatible controller: nVidia Corporation GeForce 9600M GT (rev a1)
Comment 30 Pierre Ossman 2009-04-25 19:16:55 UTC
I've looked through the dumps and what is clear is that SD works on your MSI machine (dump in comment #19), but MMC responds to one command and then goes dead.

The behaviour is identical to a broken MMC card I have here, so my initial guess is that the card is simply broken. But you say you've been able to get this card running on the Toshiba machine, which makes it less likely that the card is to blame.

Have you tested any other MMC cards on the MSI machine?

Is it possible to get a MMC_DEBUG dmesg dump from the Toshiba machine with that MMC card for comparison?
Comment 31 David Heidelberg (okias) 2009-04-28 17:04:27 UTC
07:00.1 System peripheral: JMicron Technologies, Inc. SD/MMC Host Controller
        Subsystem: Micro-Star International Co., Ltd. Device 6510           
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- 
        Latency: 0, Cache Line Size: 32 bytes                                                                
        Interrupt: pin A routed to IRQ 17                                                                    
        Region 0: Memory at f9ffe800 (32-bit, non-prefetchable) [size=256]                                   
        Capabilities: [a4] Power Management version 3                                                        
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)                   
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-                                                  
        Capabilities: [80] Express (v1) Endpoint, MSI 00                                                     
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us                        
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-                                      
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-                           
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-                                         
                        MaxPayload 128 bytes, MaxReadReq 128 bytes                                           
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-                          
                LnkCap: Port #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 unlimited, L1 unlimited    
                        ClockPM- Surprise- LLActRep- BwNot-                                                  
                LnkCtl: ASPM L0s Enabled; RCB 64 bytes Disabled- Retrain- CommClk+                           
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-                                       
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-           
        Capabilities: [94] MSI: Mask- 64bit- Count=1/1 Enable-                                               
                Address: fffffffc  Data: 0000                                                                
        Kernel driver in use: sdhci-pci

Here is lspci -vvv (I can't get debug output from Toshiba)
Comment 32 David Heidelberg (okias) 2009-05-14 17:28:24 UTC
I tested with 2.6.29 one microSD over reduction, and it worked (I'm not sure, if this apply for all SD)... but MMC status is still KO
Comment 33 David Heidelberg (okias) 2010-01-22 10:21:54 UTC
Closing bug, my two card work now, not testing anymore...

Note You need to log in before you can comment on or make changes to this bug.