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)
Dec 20 2023, 6:40 AM
Unknown Object (File)
Dec 11 2023, 12:40 AM
Unknown Object (File)
Sep 6 2023, 3:00 AM
Unknown Object (File)
Aug 14 2023, 5:39 PM
Unknown Object (File)
Aug 14 2023, 7:24 AM
Unknown Object (File)
Aug 11 2023, 1:17 AM
Unknown Object (File)
Jun 24 2023, 8:19 AM
Unknown Object (File)
Jun 24 2023, 7:27 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