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)
Wed, Apr 17, 7:52 AM
Unknown Object (File)
Tue, Apr 16, 3:17 AM
Unknown Object (File)
Tue, Apr 16, 2:34 AM
Unknown Object (File)
Mon, Apr 15, 6:07 AM
Unknown Object (File)
Thu, Apr 11, 6:58 PM
Unknown Object (File)
Tue, Apr 9, 10:48 PM
Unknown Object (File)
Tue, Apr 9, 9:40 PM
Unknown Object (File)
Feb 27 2024, 7:42 PM
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