NetBSD Problem Report #50388
From www@NetBSD.org Sun Nov 1 21:10:27 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id A02A8A5858
for <gnats-bugs@gnats.NetBSD.org>; Sun, 1 Nov 2015 21:10:27 +0000 (UTC)
Message-Id: <20151101211026.0AD58A6562@mollari.NetBSD.org>
Date: Sun, 1 Nov 2015 21:10:26 +0000 (UTC)
From: jmcneill@invisible.ca
Reply-To: jmcneill@invisible.ca
To: gnats-bugs@NetBSD.org
Subject: Recent sdhc(4) changes break BeagleBone / BeagleBone Black SD cards and eMMC
X-Send-Pr-Version: www-1.0
>Number: 50388
>Category: port-arm
>Synopsis: Recent sdhc(4) changes break BeagleBone / BeagleBone Black SD cards and eMMC
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: port-arm-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Nov 01 21:15:00 +0000 2015
>Closed-Date: Wed Jun 03 19:21:50 +0000 2020
>Last-Modified: Wed Jun 03 19:21:50 +0000 2020
>Originator: Jared McNeill
>Release: 7.99.21
>Organization:
NetBSD
>Environment:
NetBSD 7.99.21 (BEAGLEBONE)
>Description:
A -current kernel fails to detect SD card and the eMMC on BeagleBone and BeagleBone Black boards.
> sdhc0 at obio0 addr 0x48060100-0x48060fff intr 64sdhc0: EDMA tx channel 24, rx channel 25: SDHC controller (EDMA)
> sdhc0: SDHC 2.0, rev 49, platform DMA, 96000 kHz, HS 1.8V 3.0V, 1024 byte blocks
> sdmmc0 at sdhc0 slot 0
> ...
> sdmmc_io_send_op_cond: ocr = 0
> sdmmc_io_send_op_cond: error = 60
> sdmmc0: sdmmc_mem_send_op_cond: ocr=0
> sdmmc0: sdmmc_mem_send_op_cond: error=0, ocr=0x40ff8000
> sdmmc0: host_ocr 0x40060060
> sdmmc0: card_ocr 0x40ff8000
> sdmmc0: sdmmc_mem_send_if_cond: error=0, ocr=0x1aa
> sdmmc0: sdmmc_mem_send_op_cond: ocr=0x40060000
> sdmmc0: sdmmc_mem_send_op_cond: error=0, ocr=0xc0ff8000
> sdmmc_dump_data: CID
> --------+--------------------------------------------------+------------------+
> offset | +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f | data |
> --------+--------------------------------------------------+------------------+
> 00000000| 93 00 73 b1 f0 76 10 30 30 30 30 30 4d 53 1b 00 | ..s..v.00000MS.. |
> --------+--------------------------------------------------+------------------+
> sdmmc0: mem init failed
> sdmmc0: init failed
I've narrowed this down to revision 1.84 of dev/sdmmc/sdhc.c; a kernel with r1.83 works properly.
>How-To-Repeat:
Boot a -current kernel on BeagleBone or BeagleBone black.
>Fix:
>Release-Note:
>Audit-Trail:
From: "Michael van Elst" <mlelstv@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50388 CVS commit: src/sys/dev/sdmmc
Date: Tue, 3 Nov 2015 07:59:29 +0000
Module Name: src
Committed By: mlelstv
Date: Tue Nov 3 07:59:29 UTC 2015
Modified Files:
src/sys/dev/sdmmc: sdhc.c
Log Message:
Also wait for DAT when sending RSP_BSY commands. Fixes PR 50388.
To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/sdmmc/sdhc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 18 Aug 2019 05:07:43 +0000
State-Changed-Why:
Did the change by mlelstv help?
State-Changed-From-To: feedback->closed
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Wed, 03 Jun 2020 19:21:50 +0000
State-Changed-Why:
Seems to work now.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.