public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sdhci: Loads of scary messages during suspend/resume with SD card inserted
@ 2008-09-28 19:46 Frans Pop
  2008-09-28 20:04 ` Frans Pop
  2008-09-29 11:38 ` Matthew Garrett
  0 siblings, 2 replies; 8+ messages in thread
From: Frans Pop @ 2008-09-28 19:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: drzeus-mmc, linux-pm

My HP 2510p has an SD card slot and a few days ago I bought one to be able
to add support for SD cards in the Debian Installer.

Whilst playing with it, I found the following messages in my logs during
suspend. At the time the card was inserted, but nothing on it was mounted.

There also seems to be a problem while resuming, especially:
mmc mmc0:8879: parent mmc0 should not be sleeping
More context at the bottom of the mail.

>From lspci -vvv:
02:06.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)
        Subsystem: Hewlett-Packard Company Device 30c9
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 64, Cache Line Size: 64 bytes
        Interrupt: pin C routed to IRQ 20
        Region 0: Memory at e0102000 (32-bit, non-prefetchable) [size=256]
        Capabilities: <access denied>
        Kernel driver in use: sdhci-pci
        Kernel modules: sdhci-pci

02:06.3 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev ff) (prog-if ff)
        !!! Unknown header type 7f
        Kernel driver in use: ricoh-mmc
        Kernel modules: ricoh_mmc

Cheers,
FJP

Messages from kern.log during suspend:
Sep 28 23:12:39 aragorn kernel: Suspending console(s) (use no_console_suspend to debug)
Sep 28 23:12:39 aragorn kernel: pci 0000:00:02.0: PCI INT A disabled
Sep 28 23:12:39 aragorn kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
Sep 28 23:12:39 aragorn kernel: sd 0:0:0:0: [sda] Stopping disk
Sep 28 23:12:39 aragorn kernel: ACPI handle has no context!
Sep 28 23:12:39 aragorn kernel: ricoh-mmc: Suspending.
Sep 28 23:12:39 aragorn kernel: ricoh-mmc: Controller is now re-enabled.
Sep 28 23:12:39 aragorn kernel: mmc0: card 8879 removed
Sep 28 23:12:39 aragorn kernel: MMC: killing requests for dead queue
Sep 28 23:12:39 aragorn kernel: ACPI handle has no context!
Sep 28 23:12:39 aragorn kernel: sdhci-pci 0000:02:06.2: PCI INT C disabled
Sep 28 23:12:39 aragorn kernel: ACPI handle has no context!
Sep 28 23:12:39 aragorn kernel: ACPI handle has no context!
Sep 28 23:12:39 aragorn kernel: iwlagn 0000:10:00.0: PCI INT A disabled
Sep 28 23:12:39 aragorn kernel: mmc0: Controller never released inhibit bit(s).
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x2 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x4 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Controller never released inhibit bit(s).
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x2 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x4 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: ata2: port disabled. ignoring.
Sep 28 23:12:39 aragorn kernel: ata_piix 0000:00:1f.1: PCI INT A disabled
Sep 28 23:12:39 aragorn kernel: ehci_hcd 0000:00:1d.7: PCI INT A disabled
Sep 28 23:12:39 aragorn kernel: mmc0: Controller never released inhibit bit(s).
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x2 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x4 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: uhci_hcd 0000:00:1d.2: PCI INT C disabled
Sep 28 23:12:39 aragorn kernel: uhci_hcd 0000:00:1d.1: PCI INT B disabled
Sep 28 23:12:39 aragorn kernel: uhci_hcd 0000:00:1d.0: PCI INT A disabled
Sep 28 23:12:39 aragorn kernel: HDA Intel 0000:00:1b.0: PCI INT A disabled
Sep 28 23:12:39 aragorn kernel: mmc0: Controller never released inhibit bit(s).
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x2 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x4 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Controller never released inhibit bit(s).
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x2 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x4 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Controller never released inhibit bit(s).
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x2 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x4 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: HDA Intel 0000:00:1b.0: power state changed by ACPI to D3
Sep 28 23:12:39 aragorn kernel: ehci_hcd 0000:00:1a.7: PCI INT C disabled
Sep 28 23:12:39 aragorn kernel: mmc0: Controller never released inhibit bit(s).
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x2 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x4 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: uhci_hcd 0000:00:1a.1: PCI INT B disabled
Sep 28 23:12:39 aragorn kernel: uhci_hcd 0000:00:1a.0: PCI INT A disabled
Sep 28 23:12:39 aragorn kernel: ACPI handle has no context!
Sep 28 23:12:39 aragorn kernel: mmc0: Controller never released inhibit bit(s).
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x2 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x4 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Controller never released inhibit bit(s).
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x2 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x4 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Controller never released inhibit bit(s).
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x2 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x4 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Controller never released inhibit bit(s).
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x2 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x4 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: mmc0: Reset 0x1 never completed.
Sep 28 23:12:39 aragorn kernel: sdhci: ============== REGISTER DUMP ==============
Sep 28 23:12:39 aragorn kernel: sdhci: Sys addr: 0xffffffff | Version:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Blk size: 0x0000ffff | Blk cnt:  0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Argument: 0xffffffff | Trn mode: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Present:  0xffffffff | Host ctl: 0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Power:    0x000000ff | Blk gap:  0x000000ff
Sep 28 23:12:39 aragorn kernel: sdhci: Wake-up:  0x000000ff | Clock:    0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Timeout:  0x000000ff | Int stat: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: Int enab: 0xffffffff | Sig enab: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: AC12 err: 0x0000ffff | Slot int: 0x0000ffff
Sep 28 23:12:39 aragorn kernel: sdhci: Caps:     0xffffffff | Max curr: 0xffffffff
Sep 28 23:12:39 aragorn kernel: sdhci: ===========================================
Sep 28 23:12:39 aragorn kernel: ACPI: Preparing to enter system sleep state S3
Sep 28 23:12:39 aragorn kernel: Disabling non-boot CPUs ...
Sep 28 23:12:39 aragorn kernel: CPU 1 is now offline
Sep 28 23:12:39 aragorn kernel: SMP alternatives: switching to UP code
Sep 28 23:12:39 aragorn kernel: CPU0 attaching NULL sched-domain.
Sep 28 23:12:39 aragorn kernel: CPU1 attaching NULL sched-domain.
Sep 28 23:12:39 aragorn kernel: CPU0 attaching NULL sched-domain.
Sep 28 23:12:39 aragorn kernel: CPU1 is down

Messages from kern.log during resume:
Sep 28 23:12:39 aragorn kernel: sdhci-pci 0000:02:06.2: restoring config space at offset 0xf (was 0x300, writing 0x30a)
Sep 28 23:12:39 aragorn kernel: sdhci-pci 0000:02:06.2: restoring config space at offset 0x4 (was 0x0, writing 0xe0102000)
Sep 28 23:12:39 aragorn kernel: sdhci-pci 0000:02:06.2: restoring config space at offset 0x3 (was 0x800000, writing 0x804010)
Sep 28 23:12:39 aragorn kernel: sdhci-pci 0000:02:06.2: restoring config space at offset 0x1 (was 0x2100000, writing 0x2100006)
Sep 28 23:12:39 aragorn kernel: sdhci-pci 0000:02:06.2: PCI INT C -> GSI 20 (level, low) -> IRQ 20
Sep 28 23:12:39 aragorn kernel: ricoh-mmc: Resuming.
Sep 28 23:12:39 aragorn kernel: ricoh-mmc: Controller is now disabled.
Sep 28 23:12:39 aragorn kernel: sd 0:0:0:0: [sda] Starting disk
Sep 28 23:12:39 aragorn kernel: mmc0: new SD card at address 8879
Sep 28 23:12:39 aragorn kernel: mmc mmc0:8879: parent mmc0 should not be sleeping
Sep 28 23:12:39 aragorn kernel: mmcblk0: mmc0:8879 SU02G 1985024KiB
Sep 28 23:12:39 aragorn kernel:  mmcblk0: p1


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

* Re: sdhci: Loads of scary messages during suspend/resume with SD card inserted
  2008-09-28 19:46 sdhci: Loads of scary messages during suspend/resume with SD card inserted Frans Pop
@ 2008-09-28 20:04 ` Frans Pop
  2008-09-28 22:42   ` Rafael J. Wysocki
  2008-09-29 11:38 ` Matthew Garrett
  1 sibling, 1 reply; 8+ messages in thread
From: Frans Pop @ 2008-09-28 20:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: drzeus-mmc, linux-pm

On Sunday 28 September 2008, Frans Pop wrote:
> Whilst playing with it, I found the following messages in my logs
> during suspend. At the time the card was inserted, but nothing on it
> was mounted.
>
> There also seems to be a problem while resuming, especially:
> mmc mmc0:8879: parent mmc0 should not be sleeping
> More context at the bottom of the mail.

Forgot the most important bits.

Kernel is current git (2.6.27-rc7-106-g6ef190c), x86_64.
Laptop is running Debian amd64/unstable.

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

* Re: sdhci: Loads of scary messages during suspend/resume with SD card inserted
  2008-09-28 20:04 ` Frans Pop
@ 2008-09-28 22:42   ` Rafael J. Wysocki
  0 siblings, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2008-09-28 22:42 UTC (permalink / raw)
  To: Frans Pop; +Cc: linux-kernel, drzeus-mmc, linux-pm

On Sunday, 28 of September 2008, Frans Pop wrote:
> On Sunday 28 September 2008, Frans Pop wrote:
> > Whilst playing with it, I found the following messages in my logs
> > during suspend. At the time the card was inserted, but nothing on it
> > was mounted.
> >
> > There also seems to be a problem while resuming, especially:
> > mmc mmc0:8879: parent mmc0 should not be sleeping
> > More context at the bottom of the mail.
> 
> Forgot the most important bits.
> 
> Kernel is current git (2.6.27-rc7-106-g6ef190c), x86_64.
> Laptop is running Debian amd64/unstable.

The 'parent mmc0 should not be sleeping' message is a known problem with MMC.

Thanks,
Rafael

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

* Re: sdhci: Loads of scary messages during suspend/resume with SD card inserted
  2008-09-28 19:46 sdhci: Loads of scary messages during suspend/resume with SD card inserted Frans Pop
  2008-09-28 20:04 ` Frans Pop
@ 2008-09-29 11:38 ` Matthew Garrett
  2008-09-29 12:11   ` Matthew Garrett
  1 sibling, 1 reply; 8+ messages in thread
From: Matthew Garrett @ 2008-09-29 11:38 UTC (permalink / raw)
  To: Frans Pop; +Cc: linux-kernel, drzeus-mmc, linux-pm

On Sun, Sep 28, 2008 at 09:46:57PM +0200, Frans Pop wrote:
> Sep 28 23:12:39 aragorn kernel: ricoh-mmc: Suspending.
> Sep 28 23:12:39 aragorn kernel: ricoh-mmc: Controller is now re-enabled.
> Sep 28 23:12:39 aragorn kernel: mmc0: card 8879 removed

Eep! I'm sure that doesn't sound like a good idea. ricoh-mmc is 
suspending before sdhci is. In the process, it flips the hardware back 
into non-sdhci mode and the sdhci controller stops being able to talk to 
the card. I suspect that this upsets its own suspend routine rather a 
lot. Does this help at all? Not a complete fix, I suspect you'll still 
have issues on resume.

diff --git a/drivers/mmc/host/ricoh_mmc.c b/drivers/mmc/host/ricoh_mmc.c
index a16d760..015c248 100644
--- a/drivers/mmc/host/ricoh_mmc.c
+++ b/drivers/mmc/host/ricoh_mmc.c
@@ -191,20 +191,6 @@ static void __devexit ricoh_mmc_remove(struct pci_dev *pdev)
 	pci_set_drvdata(pdev, NULL);
 }
 
-static int ricoh_mmc_suspend(struct pci_dev *pdev, pm_message_t state)
-{
-	struct pci_dev *fw_dev = NULL;
-
-	fw_dev = pci_get_drvdata(pdev);
-	BUG_ON(fw_dev == NULL);
-
-	printk(KERN_INFO DRIVER_NAME ": Suspending.\n");
-
-	ricoh_mmc_enable(fw_dev);
-
-	return 0;
-}
-
 static int ricoh_mmc_resume(struct pci_dev *pdev)
 {
 	struct pci_dev *fw_dev = NULL;
@@ -224,7 +210,6 @@ static struct pci_driver ricoh_mmc_driver = {
 	.id_table =	pci_ids,
 	.probe = 	ricoh_mmc_probe,
 	.remove =	__devexit_p(ricoh_mmc_remove),
-	.suspend =	ricoh_mmc_suspend,
 	.resume =	ricoh_mmc_resume,
 };


-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

* Re: sdhci: Loads of scary messages during suspend/resume with SD card inserted
  2008-09-29 11:38 ` Matthew Garrett
@ 2008-09-29 12:11   ` Matthew Garrett
  2008-09-29 18:00     ` Frans Pop
  2008-11-14  1:41     ` Frans Pop
  0 siblings, 2 replies; 8+ messages in thread
From: Matthew Garrett @ 2008-09-29 12:11 UTC (permalink / raw)
  To: Frans Pop; +Cc: linux-kernel, drzeus-mmc, linux-pm

More to the point, how about this one? It should also handle the resume 
case, but I haven't tested it yet.

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index ea8d7a3..806bcd8 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -48,23 +48,6 @@ config MMC_SDHCI_PCI
 
 	  If unsure, say N.
 
-config MMC_RICOH_MMC
-	tristate "Ricoh MMC Controller Disabler  (EXPERIMENTAL)"
-	depends on MMC_SDHCI_PCI
-	help
-	  This selects the disabler for the Ricoh MMC Controller. This
-	  proprietary controller is unnecessary because the SDHCI driver
-	  supports MMC cards on the SD controller, but if it is not
-	  disabled, it will steal the MMC cards away - rendering them
-	  useless. It is safe to select this driver even if you don't
-	  have a Ricoh based card reader.
-
-
-	  To compile this driver as a module, choose M here:
-	  the module will be called ricoh_mmc.
-
-	  If unsure, say Y.
-
 config MMC_OMAP
 	tristate "TI OMAP Multimedia Card Interface support"
 	depends on ARCH_OMAP
diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
index c794cc5..0676890 100644
--- a/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile
@@ -11,7 +11,6 @@ obj-$(CONFIG_MMC_PXA)		+= pxamci.o
 obj-$(CONFIG_MMC_IMX)		+= imxmmc.o
 obj-$(CONFIG_MMC_SDHCI)		+= sdhci.o
 obj-$(CONFIG_MMC_SDHCI_PCI)	+= sdhci-pci.o
-obj-$(CONFIG_MMC_RICOH_MMC)	+= ricoh_mmc.o
 obj-$(CONFIG_MMC_WBSD)		+= wbsd.o
 obj-$(CONFIG_MMC_AU1X)		+= au1xmmc.o
 obj-$(CONFIG_MMC_OMAP)		+= omap.o
diff --git a/drivers/mmc/host/ricoh_mmc.c b/drivers/mmc/host/ricoh_mmc.c
deleted file mode 100644
index a16d760..0000000
--- a/drivers/mmc/host/ricoh_mmc.c
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- *  ricoh_mmc.c - Dummy driver to disable the Rioch MMC controller.
- *
- *  Copyright (C) 2007 Philip Langdale, All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- */
-
-/*
- * This is a conceptually ridiculous driver, but it is required by the way
- * the Ricoh multi-function R5C832 works. This chip implements firewire
- * and four different memory card controllers. Two of those controllers are
- * an SDHCI controller and a proprietary MMC controller. The linux SDHCI
- * driver supports MMC cards but the chip detects MMC cards in hardware
- * and directs them to the MMC controller - so the SDHCI driver never sees
- * them. To get around this, we must disable the useless MMC controller.
- * At that point, the SDHCI controller will start seeing them. As a bonus,
- * a detection event occurs immediately, even if the MMC card is already
- * in the reader.
- *
- * The relevant registers live on the firewire function, so this is unavoidably
- * ugly. Such is life.
- */
-
-#include <linux/pci.h>
-
-#define DRIVER_NAME "ricoh-mmc"
-
-static const struct pci_device_id pci_ids[] __devinitdata = {
-	{
-		.vendor		= PCI_VENDOR_ID_RICOH,
-		.device		= PCI_DEVICE_ID_RICOH_R5C843,
-		.subvendor	= PCI_ANY_ID,
-		.subdevice	= PCI_ANY_ID,
-	},
-	{ /* end: all zeroes */ },
-};
-
-MODULE_DEVICE_TABLE(pci, pci_ids);
-
-static int ricoh_mmc_disable(struct pci_dev *fw_dev)
-{
-	u8 write_enable;
-	u8 write_target;
-	u8 disable;
-
-	if (fw_dev->device == PCI_DEVICE_ID_RICOH_RL5C476) {
-		/* via RL5C476 */
-
-		pci_read_config_byte(fw_dev, 0xB7, &disable);
-		if (disable & 0x02) {
-			printk(KERN_INFO DRIVER_NAME
-				": Controller already disabled. " \
-				"Nothing to do.\n");
-			return -ENODEV;
-		}
-
-		pci_read_config_byte(fw_dev, 0x8E, &write_enable);
-		pci_write_config_byte(fw_dev, 0x8E, 0xAA);
-		pci_read_config_byte(fw_dev, 0x8D, &write_target);
-		pci_write_config_byte(fw_dev, 0x8D, 0xB7);
-		pci_write_config_byte(fw_dev, 0xB7, disable | 0x02);
-		pci_write_config_byte(fw_dev, 0x8E, write_enable);
-		pci_write_config_byte(fw_dev, 0x8D, write_target);
-	} else {
-		/* via R5C832 */
-
-		pci_read_config_byte(fw_dev, 0xCB, &disable);
-		if (disable & 0x02) {
-			printk(KERN_INFO DRIVER_NAME
-			       ": Controller already disabled. " \
-				"Nothing to do.\n");
-			return -ENODEV;
-		}
-
-		pci_read_config_byte(fw_dev, 0xCA, &write_enable);
-		pci_write_config_byte(fw_dev, 0xCA, 0x57);
-		pci_write_config_byte(fw_dev, 0xCB, disable | 0x02);
-		pci_write_config_byte(fw_dev, 0xCA, write_enable);
-	}
-
-	printk(KERN_INFO DRIVER_NAME
-	       ": Controller is now disabled.\n");
-
-	return 0;
-}
-
-static int ricoh_mmc_enable(struct pci_dev *fw_dev)
-{
-	u8 write_enable;
-	u8 write_target;
-	u8 disable;
-
-	if (fw_dev->device == PCI_DEVICE_ID_RICOH_RL5C476) {
-		/* via RL5C476 */
-
-		pci_read_config_byte(fw_dev, 0x8E, &write_enable);
-		pci_write_config_byte(fw_dev, 0x8E, 0xAA);
-		pci_read_config_byte(fw_dev, 0x8D, &write_target);
-		pci_write_config_byte(fw_dev, 0x8D, 0xB7);
-		pci_read_config_byte(fw_dev, 0xB7, &disable);
-		pci_write_config_byte(fw_dev, 0xB7, disable & ~0x02);
-		pci_write_config_byte(fw_dev, 0x8E, write_enable);
-		pci_write_config_byte(fw_dev, 0x8D, write_target);
-	} else {
-		/* via R5C832 */
-
-		pci_read_config_byte(fw_dev, 0xCA, &write_enable);
-		pci_read_config_byte(fw_dev, 0xCB, &disable);
-		pci_write_config_byte(fw_dev, 0xCA, 0x57);
-		pci_write_config_byte(fw_dev, 0xCB, disable & ~0x02);
-		pci_write_config_byte(fw_dev, 0xCA, write_enable);
-	}
-
-	printk(KERN_INFO DRIVER_NAME
-	       ": Controller is now re-enabled.\n");
-
-	return 0;
-}
-
-static int __devinit ricoh_mmc_probe(struct pci_dev *pdev,
-				     const struct pci_device_id *ent)
-{
-	u8 rev;
-	u8 ctrlfound = 0;
-
-	struct pci_dev *fw_dev = NULL;
-
-	BUG_ON(pdev == NULL);
-	BUG_ON(ent == NULL);
-
-	pci_read_config_byte(pdev, PCI_CLASS_REVISION, &rev);
-
-	printk(KERN_INFO DRIVER_NAME
-		": Ricoh MMC controller found at %s [%04x:%04x] (rev %x)\n",
-		pci_name(pdev), (int)pdev->vendor, (int)pdev->device,
-		(int)rev);
-
-	while ((fw_dev =
-		pci_get_device(PCI_VENDOR_ID_RICOH,
-			PCI_DEVICE_ID_RICOH_RL5C476, fw_dev))) {
-		if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) &&
-		    pdev->bus == fw_dev->bus) {
-			if (ricoh_mmc_disable(fw_dev) != 0)
-				return -ENODEV;
-
-			pci_set_drvdata(pdev, fw_dev);
-
-			++ctrlfound;
-			break;
-		}
-	}
-
-	fw_dev = NULL;
-
-	while (!ctrlfound &&
-	    (fw_dev = pci_get_device(PCI_VENDOR_ID_RICOH,
-					PCI_DEVICE_ID_RICOH_R5C832, fw_dev))) {
-		if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) &&
-		    pdev->bus == fw_dev->bus) {
-			if (ricoh_mmc_disable(fw_dev) != 0)
-				return -ENODEV;
-
-			pci_set_drvdata(pdev, fw_dev);
-
-			++ctrlfound;
-		}
-	}
-
-	if (!ctrlfound) {
-		printk(KERN_WARNING DRIVER_NAME
-		       ": Main firewire function not found. Cannot disable controller.\n");
-		return -ENODEV;
-	}
-
-	return 0;
-}
-
-static void __devexit ricoh_mmc_remove(struct pci_dev *pdev)
-{
-	struct pci_dev *fw_dev = NULL;
-
-	fw_dev = pci_get_drvdata(pdev);
-	BUG_ON(fw_dev == NULL);
-
-	ricoh_mmc_enable(fw_dev);
-
-	pci_set_drvdata(pdev, NULL);
-}
-
-static int ricoh_mmc_suspend(struct pci_dev *pdev, pm_message_t state)
-{
-	struct pci_dev *fw_dev = NULL;
-
-	fw_dev = pci_get_drvdata(pdev);
-	BUG_ON(fw_dev == NULL);
-
-	printk(KERN_INFO DRIVER_NAME ": Suspending.\n");
-
-	ricoh_mmc_enable(fw_dev);
-
-	return 0;
-}
-
-static int ricoh_mmc_resume(struct pci_dev *pdev)
-{
-	struct pci_dev *fw_dev = NULL;
-
-	fw_dev = pci_get_drvdata(pdev);
-	BUG_ON(fw_dev == NULL);
-
-	printk(KERN_INFO DRIVER_NAME ": Resuming.\n");
-
-	ricoh_mmc_disable(fw_dev);
-
-	return 0;
-}
-
-static struct pci_driver ricoh_mmc_driver = {
-	.name = 	DRIVER_NAME,
-	.id_table =	pci_ids,
-	.probe = 	ricoh_mmc_probe,
-	.remove =	__devexit_p(ricoh_mmc_remove),
-	.suspend =	ricoh_mmc_suspend,
-	.resume =	ricoh_mmc_resume,
-};
-
-/*****************************************************************************\
- *                                                                           *
- * Driver init/exit                                                          *
- *                                                                           *
-\*****************************************************************************/
-
-static int __init ricoh_mmc_drv_init(void)
-{
-	printk(KERN_INFO DRIVER_NAME
-		": Ricoh MMC Controller disabling driver\n");
-	printk(KERN_INFO DRIVER_NAME ": Copyright(c) Philip Langdale\n");
-
-	return pci_register_driver(&ricoh_mmc_driver);
-}
-
-static void __exit ricoh_mmc_drv_exit(void)
-{
-	pci_unregister_driver(&ricoh_mmc_driver);
-}
-
-module_init(ricoh_mmc_drv_init);
-module_exit(ricoh_mmc_drv_exit);
-
-MODULE_AUTHOR("Philip Langdale <philipl@alumni.utexas.net>");
-MODULE_DESCRIPTION("Ricoh MMC Controller disabling driver");
-MODULE_LICENSE("GPL");
-
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 9236e7f..4557fa3 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1790,6 +1790,74 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM,
 			 PCI_DEVICE_ID_NX2_5709S,
 			 quirk_brcm_570x_limit_vpd);
 
+/*
+ * This is a conceptually ridiculous quirk, but it is required by the
+ * way the Ricoh multi-function R5C832 works. This chip implements
+ * firewire and four different memory card controllers. Two of those
+ * controllers are an SDHCI controller and a proprietary MMC
+ * controller. The linux SDHCI driver supports MMC cards but the chip
+ * detects MMC cards in hardware and directs them to the MMC
+ * controller - so the SDHCI driver never sees them. To get around
+ * this, we must disable the useless MMC controller.  At that point,
+ * the SDHCI controller will start seeing them. As a bonus, a
+ * detection event occurs immediately, even if the MMC card is already
+ * in the reader.
+ *
+ * The relevant registers live on the firewire function, so this is
+ * unavoidably ugly. Such is life.
+ */
+
+static void quirk_ricoh_rl5c476_mmc_disable(struct pci_dev *dev)
+{
+	u8 write_enable;
+	u8 write_target;
+	u8 disable;
+
+	pci_read_config_byte(dev, 0xB7, &disable);
+
+	if (disable & 0x02)
+		/* Already disabled */
+		return;
+
+	pci_read_config_byte(dev, 0x8E, &write_enable);
+	pci_write_config_byte(dev, 0x8E, 0xAA);
+	pci_read_config_byte(dev, 0x8D, &write_target);
+	pci_write_config_byte(dev, 0x8D, 0xB7);
+	pci_write_config_byte(dev, 0xB7, disable | 0x02);
+	pci_write_config_byte(dev, 0x8E, write_enable);
+	pci_write_config_byte(dev, 0x8D, write_target);
+}
+
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_RICOH,
+			 PCI_DEVICE_ID_RICOH_RL5C476,
+			 quirk_ricoh_rl5c476_mmc_disable);
+DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH,
+			       PCI_DEVICE_ID_RICOH_RL5C476,
+			       quirk_ricoh_rl5c476_mmc_disable);
+
+static void quirk_ricoh_rl5c832_mmc_disable(struct pci_dev *dev)
+{
+	u8 disable;
+	u8 write_enable;
+
+	pci_read_config_byte(dev, 0xCB, &disable);
+
+	if (disable & 0x02)
+		return;
+
+	pci_read_config_byte(dev, 0xCA, &write_enable);
+	pci_write_config_byte(dev, 0xCA, 0x57);
+	pci_write_config_byte(dev, 0xCB, disable | 0x02);
+	pci_write_config_byte(dev, 0xCA, write_enable);
+}
+
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_RICOH,
+			 PCI_DEVICE_ID_RICOH_RL5C476,
+			 quirk_ricoh_rl5c832_mmc_disable);
+DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH,
+			       PCI_DEVICE_ID_RICOH_RL5C476,
+			       quirk_ricoh_rl5c832_mmc_disable);
+
 #ifdef CONFIG_PCI_MSI
 /* Some chipsets do not support MSI. We cannot easily rely on setting
  * PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

* Re: sdhci: Loads of scary messages during suspend/resume with SD card inserted
  2008-09-29 12:11   ` Matthew Garrett
@ 2008-09-29 18:00     ` Frans Pop
  2008-10-07 18:01       ` Alex Riesen
  2008-11-14  1:41     ` Frans Pop
  1 sibling, 1 reply; 8+ messages in thread
From: Frans Pop @ 2008-09-29 18:00 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-kernel, drzeus-mmc, linux-pm

On Monday 29 September 2008, Matthew Garrett wrote:
> More to the point, how about this one? It should also handle the resume
> case, but I haven't tested it yet.

Thanks Matthew.

For the second part of the quirk the device name is incorrect. It should
be r5c832 instead of rl5c832 and the DECLAREs also have the wrong device.
I think it would probably be good to add a printk for an info or debug
message saying that the proprietary controller has been disabled.

After fixing that it compiles correctly and does improve things a lot, but
there are still remaining issues. I suspect these are probably unrelated
to the proprietary controller though.

During suspend I now get:
Suspending console(s) (use no_console_suspend to debug)
pci 0000:00:02.0: PCI INT A disabled
sd 0:0:0:0: [sda] Synchronizing SCSI cache
sd 0:0:0:0: [sda] Stopping disk
ACPI handle has no context!
mmc0: card 8879 removed
MMC: killing requests for dead queue
ACPI handle has no context!
sdhci-pci 0000:02:06.2: PCI INT C disabled
ACPI handle has no context!
ACPI handle has no context!
iwlagn 0000:10:00.0: PCI INT A disabled
[...]

This means that all those register dumps are gone, but I'm not sure about
the "killing requests for dead queue" message.

During resume I get:
sdhci-pci 0000:02:06.2: restoring config space at offset 0xf (was 0x300, writing 0x30a)
sdhci-pci 0000:02:06.2: restoring config space at offset 0x4 (was 0x0, writing 0xe0102000)
sdhci-pci 0000:02:06.2: restoring config space at offset 0x3 (was 0x800000, writing 0x804010)
sdhci-pci 0000:02:06.2: restoring config space at offset 0x1 (was 0x2100000, writing 0x2100006)
sdhci-pci 0000:02:06.2: PCI INT C -> GSI 20 (level, low) -> IRQ 20
mmc0: new SD card at address 8879
mmc mmc0:8879: parent mmc0 should not be sleeping
mmcblk0: mmc0:8879 SU02G 1985024KiB
 mmcblk0: p1

The "parent should not be sleeping" message is still there.

All that was still without having a partition mounted. After resume a vfat
partition on the card can be mounted successfully.


I've also tried suspending while a partition on the card (vfat) was
mounted. This gives the same messages during suspend/resume, but reading
from the device after resume fails:
$ ls /mnt/
ls: cannot access /mnt/firmware: Input/output error
firmware
$ ls /mnt/firmware
ls: cannot access /mnt/firmware: Input/output error

(I guess the first command returns "firmware" because that was still
buffered from an 'ls' I did before suspending.)

And in dmesg:
FAT: Filesystem panic (dev mmcblk0p1)
    fat_get_cluster: invalid cluster chain (i_pos 0)
    File system has been set read-only

Only after unmounting the partition *and* ejecting/reinserting the card
is all well again.

Cheers,
FJP

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

* Re: sdhci: Loads of scary messages during suspend/resume with SD card inserted
  2008-09-29 18:00     ` Frans Pop
@ 2008-10-07 18:01       ` Alex Riesen
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Riesen @ 2008-10-07 18:01 UTC (permalink / raw)
  To: Frans Pop; +Cc: Matthew Garrett, linux-kernel, drzeus-mmc, linux-pm

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

2008/9/29 Frans Pop <elendil@planet.nl>:
> On Monday 29 September 2008, Matthew Garrett wrote:
>> More to the point, how about this one? It should also handle the resume
>> case, but I haven't tested it yet.
>
> Thanks Matthew.
>
> For the second part of the quirk the device name is incorrect. It should
> be r5c832 instead of rl5c832 and the DECLAREs also have the wrong device.

I'm attaching my patch with these corrections.

> After fixing that it compiles correctly and does improve things a lot, but
> there are still remaining issues. I suspect these are probably unrelated
> to the proprietary controller though.

Confirm that for Dell XPS M1330.

> All that was still without having a partition mounted. After resume a vfat
> partition on the card can be mounted successfully.

This works here (Ubuntu 8.04.1, v2.6.27-rc9). It is likely the hald
configuration
on Ubuntu as to why it works:

Oct  7 19:52:34 blimp hald: unmounted /dev/mmcblk0p1 from
'/media/disk' on behalf of uid 0

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fixed-ricoh-mmc-pci-quirk.patch --]
[-- Type: text/x-diff; name=fixed-ricoh-mmc-pci-quirk.patch, Size: 1307 bytes --]

From 635d8102535fb18e07197677a426af9309948b49 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa@blimp.localhost>
Date: Tue, 7 Oct 2008 19:46:01 +0200
Subject: [PATCH] Fix the pci quirk for Ricoh R5C832 which disables the mmc controller


diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 4557fa3..0737fe9 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1835,7 +1835,7 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH,
 			       PCI_DEVICE_ID_RICOH_RL5C476,
 			       quirk_ricoh_rl5c476_mmc_disable);
 
-static void quirk_ricoh_rl5c832_mmc_disable(struct pci_dev *dev)
+static void quirk_ricoh_r5c832_mmc_disable(struct pci_dev *dev)
 {
 	u8 disable;
 	u8 write_enable;
@@ -1852,11 +1852,11 @@ static void quirk_ricoh_rl5c832_mmc_disable(struct pci_dev *dev)
 }
 
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_RICOH,
-			 PCI_DEVICE_ID_RICOH_RL5C476,
-			 quirk_ricoh_rl5c832_mmc_disable);
+			 PCI_DEVICE_ID_RICOH_R5C832,
+			 quirk_ricoh_r5c832_mmc_disable);
 DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH,
-			       PCI_DEVICE_ID_RICOH_RL5C476,
-			       quirk_ricoh_rl5c832_mmc_disable);
+			       PCI_DEVICE_ID_RICOH_R5C832,
+			       quirk_ricoh_r5c832_mmc_disable);
 
 #ifdef CONFIG_PCI_MSI
 /* Some chipsets do not support MSI. We cannot easily rely on setting

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

* Re: sdhci: Loads of scary messages during suspend/resume with SD card inserted
  2008-09-29 12:11   ` Matthew Garrett
  2008-09-29 18:00     ` Frans Pop
@ 2008-11-14  1:41     ` Frans Pop
  1 sibling, 0 replies; 8+ messages in thread
From: Frans Pop @ 2008-11-14  1:41 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-kernel, drzeus-mmc, linux-pm

Hi Matthew,

What's the status of this patch? If you like I can submit it (with the 
minor fixes that were needed). Or are there issues with it?

My tests showed that it did not fix all suspend/resume problems, but it 
was a structural improvement.

Cheers,
FJP

On Monday 29 September 2008, Matthew Garrett wrote:
> More to the point, how about this one? It should also handle the resume
> case, but I haven't tested it yet.
>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index ea8d7a3..806bcd8 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -48,23 +48,6 @@ config MMC_SDHCI_PCI
>
>  	  If unsure, say N.
>
> -config MMC_RICOH_MMC
> -	tristate "Ricoh MMC Controller Disabler  (EXPERIMENTAL)"
> -	depends on MMC_SDHCI_PCI
> -	help
> -	  This selects the disabler for the Ricoh MMC Controller. This
> -	  proprietary controller is unnecessary because the SDHCI driver
> -	  supports MMC cards on the SD controller, but if it is not
> -	  disabled, it will steal the MMC cards away - rendering them
> -	  useless. It is safe to select this driver even if you don't
> -	  have a Ricoh based card reader.
> -
> -
> -	  To compile this driver as a module, choose M here:
> -	  the module will be called ricoh_mmc.
> -
> -	  If unsure, say Y.
> -
>  config MMC_OMAP
>  	tristate "TI OMAP Multimedia Card Interface support"
>  	depends on ARCH_OMAP
> diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
> index c794cc5..0676890 100644
> --- a/drivers/mmc/host/Makefile
> +++ b/drivers/mmc/host/Makefile
> @@ -11,7 +11,6 @@ obj-$(CONFIG_MMC_PXA)		+= pxamci.o
>  obj-$(CONFIG_MMC_IMX)		+= imxmmc.o
>  obj-$(CONFIG_MMC_SDHCI)		+= sdhci.o
>  obj-$(CONFIG_MMC_SDHCI_PCI)	+= sdhci-pci.o
> -obj-$(CONFIG_MMC_RICOH_MMC)	+= ricoh_mmc.o
>  obj-$(CONFIG_MMC_WBSD)		+= wbsd.o
>  obj-$(CONFIG_MMC_AU1X)		+= au1xmmc.o
>  obj-$(CONFIG_MMC_OMAP)		+= omap.o
> diff --git a/drivers/mmc/host/ricoh_mmc.c
> b/drivers/mmc/host/ricoh_mmc.c deleted file mode 100644
> index a16d760..0000000
> --- a/drivers/mmc/host/ricoh_mmc.c
> +++ /dev/null
> @@ -1,257 +0,0 @@
> -/*
> - *  ricoh_mmc.c - Dummy driver to disable the Rioch MMC controller.
> - *
> - *  Copyright (C) 2007 Philip Langdale, All Rights Reserved.
> - *
> - * This program is free software; you can redistribute it and/or
> modify - * it under the terms of the GNU General Public License as
> published by - * the Free Software Foundation; either version 2 of the
> License, or (at - * your option) any later version.
> - */
> -
> -/*
> - * This is a conceptually ridiculous driver, but it is required by the
> way - * the Ricoh multi-function R5C832 works. This chip implements
> firewire - * and four different memory card controllers. Two of those
> controllers are - * an SDHCI controller and a proprietary MMC
> controller. The linux SDHCI - * driver supports MMC cards but the chip
> detects MMC cards in hardware - * and directs them to the MMC
> controller - so the SDHCI driver never sees - * them. To get around
> this, we must disable the useless MMC controller. - * At that point,
> the SDHCI controller will start seeing them. As a bonus, - * a
> detection event occurs immediately, even if the MMC card is already - *
> in the reader.
> - *
> - * The relevant registers live on the firewire function, so this is
> unavoidably - * ugly. Such is life.
> - */
> -
> -#include <linux/pci.h>
> -
> -#define DRIVER_NAME "ricoh-mmc"
> -
> -static const struct pci_device_id pci_ids[] __devinitdata = {
> -	{
> -		.vendor		= PCI_VENDOR_ID_RICOH,
> -		.device		= PCI_DEVICE_ID_RICOH_R5C843,
> -		.subvendor	= PCI_ANY_ID,
> -		.subdevice	= PCI_ANY_ID,
> -	},
> -	{ /* end: all zeroes */ },
> -};
> -
> -MODULE_DEVICE_TABLE(pci, pci_ids);
> -
> -static int ricoh_mmc_disable(struct pci_dev *fw_dev)
> -{
> -	u8 write_enable;
> -	u8 write_target;
> -	u8 disable;
> -
> -	if (fw_dev->device == PCI_DEVICE_ID_RICOH_RL5C476) {
> -		/* via RL5C476 */
> -
> -		pci_read_config_byte(fw_dev, 0xB7, &disable);
> -		if (disable & 0x02) {
> -			printk(KERN_INFO DRIVER_NAME
> -				": Controller already disabled. " \
> -				"Nothing to do.\n");
> -			return -ENODEV;
> -		}
> -
> -		pci_read_config_byte(fw_dev, 0x8E, &write_enable);
> -		pci_write_config_byte(fw_dev, 0x8E, 0xAA);
> -		pci_read_config_byte(fw_dev, 0x8D, &write_target);
> -		pci_write_config_byte(fw_dev, 0x8D, 0xB7);
> -		pci_write_config_byte(fw_dev, 0xB7, disable | 0x02);
> -		pci_write_config_byte(fw_dev, 0x8E, write_enable);
> -		pci_write_config_byte(fw_dev, 0x8D, write_target);
> -	} else {
> -		/* via R5C832 */
> -
> -		pci_read_config_byte(fw_dev, 0xCB, &disable);
> -		if (disable & 0x02) {
> -			printk(KERN_INFO DRIVER_NAME
> -			       ": Controller already disabled. " \
> -				"Nothing to do.\n");
> -			return -ENODEV;
> -		}
> -
> -		pci_read_config_byte(fw_dev, 0xCA, &write_enable);
> -		pci_write_config_byte(fw_dev, 0xCA, 0x57);
> -		pci_write_config_byte(fw_dev, 0xCB, disable | 0x02);
> -		pci_write_config_byte(fw_dev, 0xCA, write_enable);
> -	}
> -
> -	printk(KERN_INFO DRIVER_NAME
> -	       ": Controller is now disabled.\n");
> -
> -	return 0;
> -}
> -
> -static int ricoh_mmc_enable(struct pci_dev *fw_dev)
> -{
> -	u8 write_enable;
> -	u8 write_target;
> -	u8 disable;
> -
> -	if (fw_dev->device == PCI_DEVICE_ID_RICOH_RL5C476) {
> -		/* via RL5C476 */
> -
> -		pci_read_config_byte(fw_dev, 0x8E, &write_enable);
> -		pci_write_config_byte(fw_dev, 0x8E, 0xAA);
> -		pci_read_config_byte(fw_dev, 0x8D, &write_target);
> -		pci_write_config_byte(fw_dev, 0x8D, 0xB7);
> -		pci_read_config_byte(fw_dev, 0xB7, &disable);
> -		pci_write_config_byte(fw_dev, 0xB7, disable & ~0x02);
> -		pci_write_config_byte(fw_dev, 0x8E, write_enable);
> -		pci_write_config_byte(fw_dev, 0x8D, write_target);
> -	} else {
> -		/* via R5C832 */
> -
> -		pci_read_config_byte(fw_dev, 0xCA, &write_enable);
> -		pci_read_config_byte(fw_dev, 0xCB, &disable);
> -		pci_write_config_byte(fw_dev, 0xCA, 0x57);
> -		pci_write_config_byte(fw_dev, 0xCB, disable & ~0x02);
> -		pci_write_config_byte(fw_dev, 0xCA, write_enable);
> -	}
> -
> -	printk(KERN_INFO DRIVER_NAME
> -	       ": Controller is now re-enabled.\n");
> -
> -	return 0;
> -}
> -
> -static int __devinit ricoh_mmc_probe(struct pci_dev *pdev,
> -				     const struct pci_device_id *ent)
> -{
> -	u8 rev;
> -	u8 ctrlfound = 0;
> -
> -	struct pci_dev *fw_dev = NULL;
> -
> -	BUG_ON(pdev == NULL);
> -	BUG_ON(ent == NULL);
> -
> -	pci_read_config_byte(pdev, PCI_CLASS_REVISION, &rev);
> -
> -	printk(KERN_INFO DRIVER_NAME
> -		": Ricoh MMC controller found at %s [%04x:%04x] (rev %x)\n",
> -		pci_name(pdev), (int)pdev->vendor, (int)pdev->device,
> -		(int)rev);
> -
> -	while ((fw_dev =
> -		pci_get_device(PCI_VENDOR_ID_RICOH,
> -			PCI_DEVICE_ID_RICOH_RL5C476, fw_dev))) {
> -		if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) &&
> -		    pdev->bus == fw_dev->bus) {
> -			if (ricoh_mmc_disable(fw_dev) != 0)
> -				return -ENODEV;
> -
> -			pci_set_drvdata(pdev, fw_dev);
> -
> -			++ctrlfound;
> -			break;
> -		}
> -	}
> -
> -	fw_dev = NULL;
> -
> -	while (!ctrlfound &&
> -	    (fw_dev = pci_get_device(PCI_VENDOR_ID_RICOH,
> -					PCI_DEVICE_ID_RICOH_R5C832, fw_dev))) {
> -		if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) &&
> -		    pdev->bus == fw_dev->bus) {
> -			if (ricoh_mmc_disable(fw_dev) != 0)
> -				return -ENODEV;
> -
> -			pci_set_drvdata(pdev, fw_dev);
> -
> -			++ctrlfound;
> -		}
> -	}
> -
> -	if (!ctrlfound) {
> -		printk(KERN_WARNING DRIVER_NAME
> -		       ": Main firewire function not found. Cannot disable
> controller.\n"); -		return -ENODEV;
> -	}
> -
> -	return 0;
> -}
> -
> -static void __devexit ricoh_mmc_remove(struct pci_dev *pdev)
> -{
> -	struct pci_dev *fw_dev = NULL;
> -
> -	fw_dev = pci_get_drvdata(pdev);
> -	BUG_ON(fw_dev == NULL);
> -
> -	ricoh_mmc_enable(fw_dev);
> -
> -	pci_set_drvdata(pdev, NULL);
> -}
> -
> -static int ricoh_mmc_suspend(struct pci_dev *pdev, pm_message_t state)
> -{
> -	struct pci_dev *fw_dev = NULL;
> -
> -	fw_dev = pci_get_drvdata(pdev);
> -	BUG_ON(fw_dev == NULL);
> -
> -	printk(KERN_INFO DRIVER_NAME ": Suspending.\n");
> -
> -	ricoh_mmc_enable(fw_dev);
> -
> -	return 0;
> -}
> -
> -static int ricoh_mmc_resume(struct pci_dev *pdev)
> -{
> -	struct pci_dev *fw_dev = NULL;
> -
> -	fw_dev = pci_get_drvdata(pdev);
> -	BUG_ON(fw_dev == NULL);
> -
> -	printk(KERN_INFO DRIVER_NAME ": Resuming.\n");
> -
> -	ricoh_mmc_disable(fw_dev);
> -
> -	return 0;
> -}
> -
> -static struct pci_driver ricoh_mmc_driver = {
> -	.name = 	DRIVER_NAME,
> -	.id_table =	pci_ids,
> -	.probe = 	ricoh_mmc_probe,
> -	.remove =	__devexit_p(ricoh_mmc_remove),
> -	.suspend =	ricoh_mmc_suspend,
> -	.resume =	ricoh_mmc_resume,
> -};
> -
> -/*********************************************************************
>********\ - *                                                           
>                * - * Driver init/exit                                  
>                        * - *                                           
>                                *
> -\*********************************************************************
>********/ -
> -static int __init ricoh_mmc_drv_init(void)
> -{
> -	printk(KERN_INFO DRIVER_NAME
> -		": Ricoh MMC Controller disabling driver\n");
> -	printk(KERN_INFO DRIVER_NAME ": Copyright(c) Philip Langdale\n");
> -
> -	return pci_register_driver(&ricoh_mmc_driver);
> -}
> -
> -static void __exit ricoh_mmc_drv_exit(void)
> -{
> -	pci_unregister_driver(&ricoh_mmc_driver);
> -}
> -
> -module_init(ricoh_mmc_drv_init);
> -module_exit(ricoh_mmc_drv_exit);
> -
> -MODULE_AUTHOR("Philip Langdale <philipl@alumni.utexas.net>");
> -MODULE_DESCRIPTION("Ricoh MMC Controller disabling driver");
> -MODULE_LICENSE("GPL");
> -
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 9236e7f..4557fa3 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -1790,6 +1790,74 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM,
>  			 PCI_DEVICE_ID_NX2_5709S,
>  			 quirk_brcm_570x_limit_vpd);
>
> +/*
> + * This is a conceptually ridiculous quirk, but it is required by the
> + * way the Ricoh multi-function R5C832 works. This chip implements
> + * firewire and four different memory card controllers. Two of those
> + * controllers are an SDHCI controller and a proprietary MMC
> + * controller. The linux SDHCI driver supports MMC cards but the chip
> + * detects MMC cards in hardware and directs them to the MMC
> + * controller - so the SDHCI driver never sees them. To get around
> + * this, we must disable the useless MMC controller.  At that point,
> + * the SDHCI controller will start seeing them. As a bonus, a
> + * detection event occurs immediately, even if the MMC card is already
> + * in the reader.
> + *
> + * The relevant registers live on the firewire function, so this is
> + * unavoidably ugly. Such is life.
> + */
> +
> +static void quirk_ricoh_rl5c476_mmc_disable(struct pci_dev *dev)
> +{
> +	u8 write_enable;
> +	u8 write_target;
> +	u8 disable;
> +
> +	pci_read_config_byte(dev, 0xB7, &disable);
> +
> +	if (disable & 0x02)
> +		/* Already disabled */
> +		return;
> +
> +	pci_read_config_byte(dev, 0x8E, &write_enable);
> +	pci_write_config_byte(dev, 0x8E, 0xAA);
> +	pci_read_config_byte(dev, 0x8D, &write_target);
> +	pci_write_config_byte(dev, 0x8D, 0xB7);
> +	pci_write_config_byte(dev, 0xB7, disable | 0x02);
> +	pci_write_config_byte(dev, 0x8E, write_enable);
> +	pci_write_config_byte(dev, 0x8D, write_target);
> +}
> +
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_RICOH,
> +			 PCI_DEVICE_ID_RICOH_RL5C476,
> +			 quirk_ricoh_rl5c476_mmc_disable);
> +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH,
> +			       PCI_DEVICE_ID_RICOH_RL5C476,
> +			       quirk_ricoh_rl5c476_mmc_disable);
> +
> +static void quirk_ricoh_rl5c832_mmc_disable(struct pci_dev *dev)
> +{
> +	u8 disable;
> +	u8 write_enable;
> +
> +	pci_read_config_byte(dev, 0xCB, &disable);
> +
> +	if (disable & 0x02)
> +		return;
> +
> +	pci_read_config_byte(dev, 0xCA, &write_enable);
> +	pci_write_config_byte(dev, 0xCA, 0x57);
> +	pci_write_config_byte(dev, 0xCB, disable | 0x02);
> +	pci_write_config_byte(dev, 0xCA, write_enable);
> +}
> +
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_RICOH,
> +			 PCI_DEVICE_ID_RICOH_RL5C476,
> +			 quirk_ricoh_rl5c832_mmc_disable);
> +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH,
> +			       PCI_DEVICE_ID_RICOH_RL5C476,
> +			       quirk_ricoh_rl5c832_mmc_disable);
> +
>  #ifdef CONFIG_PCI_MSI
>  /* Some chipsets do not support MSI. We cannot easily rely on setting
>   * PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually


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

end of thread, other threads:[~2008-11-14  1:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-28 19:46 sdhci: Loads of scary messages during suspend/resume with SD card inserted Frans Pop
2008-09-28 20:04 ` Frans Pop
2008-09-28 22:42   ` Rafael J. Wysocki
2008-09-29 11:38 ` Matthew Garrett
2008-09-29 12:11   ` Matthew Garrett
2008-09-29 18:00     ` Frans Pop
2008-10-07 18:01       ` Alex Riesen
2008-11-14  1:41     ` Frans Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox