Page MenuHomeFreeBSD

Solve problems with rk3399 dwmmc failing to update clock.
AbandonedPublic

Authored by kjopek_gmail.com on Jan 22 2021, 12:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 8:13 PM
Unknown Object (File)
Sat, Nov 23, 2:30 PM
Unknown Object (File)
Sat, Nov 23, 2:30 PM
Unknown Object (File)
Nov 18 2024, 3:41 AM
Unknown Object (File)
Nov 14 2024, 4:06 AM
Unknown Object (File)
Nov 13 2024, 10:55 AM
Unknown Object (File)
Nov 7 2024, 5:24 PM
Unknown Object (File)
Oct 18 2024, 7:26 AM
Subscribers

Details

Summary

It appears dwmmc device landed in a state signaled by interrupt with flag SDMMC_INTMASK_HTO turned on.
The flag informs that device suffered buffer starvation which led to total deadlock of the controller
due to stopping the clock. dwmmc does not currently have any recovery mechanism from such situation.

Problem mainly manifested while using of fsck when large portions of data were directly read from SD card.

Solve this problem for now by returning number of slots in descriptor ring as a number of sectors device can
save/read at once for. In my experiments, value 512 also worked well. On the other hand, value 1024 was
too high and problem reappeared.

This is also believed to be a result from changing MAXPHYS in commit baa2cd58a6d2.

Test Plan

Tested on RockPro64.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped