Bug 252735

Summary: Acer Aspire: mmc disk unusable on CURRENT (patch)
Product: Base System Reporter: Austin Shafer <ashafer>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Austin Shafer 2021-01-16 05:25:56 UTC
(I'm filing this bug to track a review I submitted in May 2020 that still hasn't gotten attention. Filing a bug to prevent the review from getting lost in space)

Problem:
I bought a cheap acer aspire (A114-32-P7E5) to hack freebsd on. The disk it comes with is some sort of low quality eMMC that freebsd doesn't like out of the box. I could boot from a usb drive, but couldn't use the mmc disk. I'm guessing that other cheap laptops have the same problem. The review I link fixes the problem.

Solution:

Patch at: https://reviews.freebsd.org/D24740
I've been running this (daily use) for ~9months with no problems.

From reading around online, it seems that some number of cards can not depend on
CMD13 to check for errors while switching to HS200. They generate BADCRC errors
for a short bit before CMD13 succeeds. It's my understanding that CMD13 is used after
CMD6 to verify switching has completed, and if these BADCRC errors are observed
we should ignore them and retry CMD13.

I've update mmc_switch_status to have an argument to ignore bad crc errors,
which the caller sets if we are switching to HS200. This seemed to be the best
place to do this.

Suspend/resume still doesn't work, but please let me know if there's anything I can do to improve/commit this. I'd love to see this committed so that I can stop having to track CURRENT on this laptop. Thanks!