I just got my apu2c4 boxes, and plan to make them boot from SD card. It seems the SD cards are ok, the system boots. But occationally writing to SD card just hangs. Tested with linux kernel 4.1.y and 4.4.y.
[ 3.082221] sdhci: Secure Digital Host Controller Interface driver
[ 3.082228] sdhci: Copyright(c) Pierre Ossman
[ 3.083135] sdhci-pci 0000:00:14.7: SDHCI controller found [1022:7813] (rev 1)
[ 3.083495] sdhci-pci 0000:00:14.7: No vmmc regulator found
[ 3.083503] sdhci-pci 0000:00:14.7: No vqmmc regulator found
[ 3.084994] mmc0: SDHCI controller on PCI [0000:00:14.7] using ADMA 64-bit
[ 3.156461] mmc0: new high speed SDHC card at address 0007
[ 3.347692] mmcblk0: mmc0:0007 SD04G 3.71 GiB
[ 3.349924] mmcblk0: p1
When writing to SD hangs, what happens is that the kernel [mmcqd/0] task is hogging CPU, and mmc0 interrupts are coming in at fast pace. In dmesg I see first:
mmc0: Timeout waiting for hardware interrupt.
mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x400e00
And after considerable wait, I see further logging:
[ 896.871617] mmc0: Card stuck in programming state! mmcblk0 card_busy_detect
[ 898.235070] mmc0: card never left busy state
[ 898.235078] mmc0: tried to reset card
[ 898.235087] blk_update_request: I/O error, dev mmcblk0, sector 16384
[ 898.235098] Buffer I/O error on dev mmcblk0p1, logical block 8192, lost async page write
[ 898.235107] blk_update_request: I/O error, dev mmcblk0, sector 16385
and finally the SD card becomes non-responsive until reboot.
Any suggestions for sd quirks to try, or any further debug ideas?