Page MenuHomeFreeBSD

Make sdhci(4) work after suspend/resume.
ClosedPublic

Authored by trasz on May 9 2016, 9:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 17 2024, 9:15 AM
Unknown Object (File)
Mar 17 2024, 8:52 AM
Unknown Object (File)
Dec 20 2023, 4:39 AM
Unknown Object (File)
Nov 30 2023, 7:15 AM
Unknown Object (File)
Nov 6 2023, 7:26 PM
Unknown Object (File)
Oct 19 2023, 10:43 PM
Unknown Object (File)
Oct 19 2023, 6:19 PM
Unknown Object (File)
Jan 9 2023, 7:09 AM
Subscribers

Details

Summary

Make sdhci(4) work after suspend/resume for chipsets that require
the frequency quirk. This makes it work on eg ThinkPad T420.

Without it, after resume one can see this:

mmc0: ACMD42 failed, RESULT: 4
mmcsd0: Error indicated: 1 Timeout
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
sdhci_pci0-slot0: Got data interrupt 0x00200000, but there is no active command.
sdhci_pci0-slot0: ============== REGISTER DUMP ==============
sdhci_pci0-slot0: Sys addr: 0x06317200 | Version: 0x00000502
sdhci_pci0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000010
sdhci_pci0-slot0: Argument: 0x00000200 | Trn mode: 0x00000037
sdhci_pci0-slot0: Present: 0x01ff0000 | Host ctl: 0x00000007
sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000
sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00000007
sdhci_pci0-slot0: Timeout: 0x0000000d | Int stat: 0x00000000
sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb
sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000
sdhci_pci0-slot0: Caps: 0x21e8c8b2 | Max curr: 0x00000040
sdhci_pci0-slot0: ===========================================
sdhci_pci0-slot0: Got data interrupt 0x00200000, but there is no active command.
sdhci_pci0-slot0: ============== REGISTER DUMP ==============
sdhci_pci0-slot0: Sys addr: 0x06317200 | Version: 0x00000502
sdhci_pci0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000001
sdhci_pci0-slot0: Argument: 0x00000040 | Trn mode: 0x00000013
sdhci_pci0-slot0: Present: 0x01ff0000 | Host ctl: 0x00000007
sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000
sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00000007
sdhci_pci0-slot0: Timeout: 0x0000000d | Int stat: 0x00000000
autofs_flush: /net flushed
sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb
autofs_flush: /media flushed
sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000
sdhci_pci0-slot0: Caps: 0x21e8c8b2 | Max curr: 0x00000040
sdhci_pci0-slot0: ===========================================

Afterwards all operations on /dev/mmcsd0 fail with EIO.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz retitled this revision from to Make sdhci(4) work after suspend/resume..
trasz updated this object.
trasz edited the test plan for this revision. (Show Details)
trasz added a reviewer: mav.

Hmm, I wonder if we ought to sdhci_restore_frequency in suspend as well?

jhb edited edge metadata.

My guess is we don't need to restore the frequency in suspend.

This revision is now accepted and ready to land.May 10 2016, 4:22 PM
This revision was automatically updated to reflect the committed changes.