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)
Thu, Nov 14, 4:06 AM
Unknown Object (File)
Wed, Nov 13, 10:55 AM
Unknown Object (File)
Thu, Nov 7, 5:24 PM
Unknown Object (File)
Oct 18 2024, 7:26 AM
Unknown Object (File)
Oct 16 2024, 6:49 AM
Unknown Object (File)
Oct 13 2024, 10:59 AM
Unknown Object (File)
Oct 12 2024, 3:59 PM
Unknown Object (File)
Oct 11 2024, 7:52 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