Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157391919
D24740.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1000 B
Referenced Files
None
Subscribers
None
D24740.diff
View Options
diff --git a/sys/dev/mmc/mmc_subr.c b/sys/dev/mmc/mmc_subr.c
--- a/sys/dev/mmc/mmc_subr.c
+++ b/sys/dev/mmc/mmc_subr.c
@@ -193,7 +193,7 @@
mmc_switch_status(device_t busdev, device_t dev, uint16_t rca, u_int timeout)
{
struct timeval cur, end;
- int err;
+ int err, crc_timeout;
uint32_t status;
KASSERT(timeout != 0, ("%s: no timeout", __func__));
@@ -205,7 +205,19 @@
*/
end.tv_sec = end.tv_usec = 0;
for (;;) {
- err = mmc_send_status(busdev, dev, rca, &status);
+ crc_timeout=0;
+ do {
+ /*
+ * CRC errors indicate that the command wasn't accepted
+ * and executed due to a communications error. Retry
+ * CRC errors a couple of times to cope with transient
+ * failures.
+ *
+ * This is required for some cheap laptops to boot.
+ */
+ err = mmc_send_status(busdev, dev, rca, &status);
+ crc_timeout++;
+ } while (err == MMC_ERR_BADCRC && crc_timeout < 10);
if (err != MMC_ERR_NONE)
break;
if (R1_CURRENT_STATE(status) == R1_STATE_TRAN)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 21, 10:34 PM (15 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33407407
Default Alt Text
D24740.diff (1000 B)
Attached To
Mode
D24740: mmc: Ignore BADCRC errors in CMD13 when switching to HS200
Attached
Detach File
Event Timeline
Log In to Comment