Page MenuHomeFreeBSD

Implement CMD53 block mode support for SDHCI and AllWinner-based boards
ClosedPublic

Authored by kibab on Apr 1 2019, 8:20 PM.

Details

Summary

If a custom block size requested, use it, otherwise revert to the previous logic
of using just a data size if it's less than MMC_BLOCK_SIZE, and MMC_BLOCK_SIZE otherwise.

Test Plan

Booted on Rpi3 and AllWinner NanoPi M1+, verified that mmc_da driver didn't break and
it's still possible to work with SD/MMC cards.
No code using the block mode exists in the tree now.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kibab created this revision.Apr 1 2019, 8:20 PM
bz accepted this revision.Apr 1 2019, 9:14 PM

The descriptions needs slightly rewording "is requested". I'd be a bit more verbose maybe explaining distinct use of block_size and block_count?

sys/dev/sdhci/sdhci.c
2814 ↗(On Diff #55697)

I'd put <blank>: 0 for the last three lines like for len : 0, but that's only a style nit.

This revision is now accepted and ready to land.Apr 1 2019, 9:14 PM
kibab updated this revision to Diff 55903.Apr 7 2019, 12:21 PM
  • Implement CMD53 block mode support for SDHCI and AllWinner-based boards
  • Use the new MMC_DATA_BLOCK_SIZE
  • Put blank before colon when printing command args
This revision now requires review to proceed.Apr 7 2019, 12:21 PM
kibab marked an inline comment as done.Apr 7 2019, 12:22 PM

Updated to use MMC_DATA_BLOCK_SIZE.

sys/dev/sdhci/sdhci.c
2814 ↗(On Diff #55697)

Ack

imp accepted this revision.Apr 8 2019, 7:58 PM

OK. this looks good, and you are using the flag I was complaining about not being used , so ignore that bit.
This is conditional on D19779.
and I'm ENOCLUE on the hardware, but it looks like it might be right.

This revision is now accepted and ready to land.Apr 8 2019, 7:58 PM
This revision was automatically updated to reflect the committed changes.
kibab marked an inline comment as done.