NetBSD Problem Report #54959
From www@netbsd.org Thu Feb 13 14:51:44 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 27CC61A9213
for <gnats-bugs@gnats.NetBSD.org>; Thu, 13 Feb 2020 14:51:44 +0000 (UTC)
Message-Id: <20200213145142.DA3941A9259@mollari.NetBSD.org>
Date: Thu, 13 Feb 2020 14:51:42 +0000 (UTC)
From: prlw1@cam.ac.uk
Reply-To: prlw1@cam.ac.uk
To: gnats-bugs@NetBSD.org
Subject: sdmmc_mem_enable failed with error 60
X-Send-Pr-Version: www-1.0
>Number: 54959
>Category: kern
>Synopsis: sdmmc_mem_enable failed with error 60
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 13 14:55:00 +0000 2020
>Last-Modified: Mon Mar 30 21:05:01 +0000 2020
>Originator: Patrick Welche
>Release: NetBSD-9.99.46 RPI kernel
>Organization:
>Environment:
>Description:
Essentially sdmmc1 is unhappy which means that useful things like bwfm
wireless interface can't attach. Apparently not a local problem:
https://mail-index.netbsd.org/port-arm/2020/02/13/msg006499.html
Oddly given below, the ld0 attached to sdmmc0 seems to behaving properly.
[ 1.0400710] sdmmc0 at bcmsdhost0
[ 1.0501180] sdhc0: SDHC 3.0, rev 153, platform DMA, 200000 kHz, HS 3.3V, re-tuning mode 1, 1024 byte blocks
[ 1.0601610] sdmmc1 at sdhc0 slot 0
[ 1.1917650] sdmmc0: direct I/O error 5, r=6 p=0xc96f8f24 write
[ 1.2045570] sdmmc_io_send_op_cond: ocr = 0
[ 1.2045570] sdmmc_io_send_op_cond: error = 5
[ 1.2045570] sdmmc0: sdmmc_mem_send_op_cond: ocr=0
[ 1.2177810] sdmmc0: sdmmc_mem_send_op_cond: error=0, ocr=0xff8000
[ 1.2177810] sdmmc0: host_ocr 0x40300000
[ 1.2278210] sdmmc0: card_ocr 0x00ff8000
[ 1.2278210] sdmmc0: sdmmc_mem_send_if_cond: error=0, ocr=0x1aa
[ 1.2278210] sdmmc0: sdmmc_mem_send_op_cond: ocr=0x40300000
[ 1.2431540] sdhc0: cmd crc error
[ 1.2566310] sdmmc_io_send_op_cond: ocr = 0
[ 1.2566310] sdmmc0: sdmmc_mem_send_op_cond: error=0, ocr=0xc0ff8000
[ 1.2666650] sdmmc_dump_data: CID
[ 1.2666650] --------+--------------------------------------------------+------------------+
[ 1.2781520] offset | +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f | data |
[ 1.2781520] --------+--------------------------------------------------+------------------+
[ 1.2950730] 00000000| 2c 01 f5 14 d4 da 60 47 32 33 44 53 48 50 27 00 | ,.....`G23DSHP'. |
[ 1.2950730] --------+--------------------------------------------------+------------------+
[ 1.3119880] sdmmc0: couldn't read CID
[ 1.3119880] sdmmc_dump_data: CSD
[ 1.3119880] --------+--------------------------------------------------+------------------+
[ 1.3277820] offset | +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f | data |
[ 1.3277820] --------+--------------------------------------------------+------------------+
[ 1.3447060] 00000000| 00 40 0a 80 7f df e8 00 00 59 5b 32 00 0e 40 00 | .@.......Y[2..@. |
[ 1.3447060] --------+--------------------------------------------------+------------------+
[ 1.3616320] sdmmc0: SD Ver.2.0
[ 1.3616320] sdmmc0: CID: mid=0x27 oid=0x5048 pnm="SD32G" rev=0x60 psn=0xdad414f5 mdt=12c
[ 1.3729040] sdmmc0: sdmmc_mem_set_blocklen: read_bl_len=512 sector_size=512
[ 1.3729040] sdhc0: cmd crc error
[ 1.3932800] sdmmc_io_send_op_cond: error = 60
[ 1.3932800] sdmmc0: sdmem_mem_send_scr: error = 0
[ 1.3932800] sdmmc_dump_data: SCR
[ 1.4050230] --------+--------------------------------------------------+------------------+
[ 1.4050230] offset | +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f | data |
[ 1.4219430] --------+--------------------------------------------------+------------------+
[ 1.4219430] 00000000| 02 05 80 83 01 00 00 00 | ........ |
[ 1.4326090] --------+--------------------------------------------------+------------------+
[ 1.4473220] sdmmc0: sdmmc_mem_decode_scr: 0002058083010000 ver=0, spec=2, bus width=5
[ 1.4473220] sdmmc0: change bus width
[ 1.4588680] sdmmc0: switch func mode 0
[ 1.4588680] sdhc0: cmd crc error
[ 1.4588680] sdhc0: cmd timeout error
[ 1.4795930] sdmmc1: sdmmc_mem_send_op_cond: ocr=0
[ 1.4795930] sdmmc0: card supports mode Default/SDR12
[ 1.4795930] sdmmc0: card supports mode High-Speed/SDR25
[ 1.4939790] sdmmc0: using mode High-Speed/SDR25
[ 1.4939790] sdmmc0: switch func mode 1(func=1)
[ 1.4939790] sdhc0: cmd crc error
[ 1.5163900] sdmmc1: sdmmc_mem_send_op_cond: error=60, ocr=0
[ 1.5163900] sdmmc1: switch to MMC mode
[ 1.5163900] sdmmc1: sdmmc_mem_send_op_cond: ocr=0
[ 1.5299200] sdhc0: cmd crc error
[ 1.5432470] sdmmc1: sdmmc_mem_send_op_cond: error=60, ocr=0
[ 1.5432470] sdmmc1: couldn't read memory OCR
[ 1.5432470] sdmmc1: sdmmc_mem_enable failed with error 60
[ 1.5580110] sdmmc1: couldn't enable card: 60
[ 1.5580110] sdmmc0: sdmem_mem_send_ssr: error = 0
[ 1.5580110] sdmmc_dump_data: SSR
[ 1.5703480] --------+--------------------------------------------------+------------------+
[ 1.5703480] offset | +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f | data |
[ 1.5872630] --------+--------------------------------------------------+------------------+
[ 1.5872630] 00000000| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ |
[ 1.5979280] 00000010| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ |
[ 1.6079730] 00000020| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ |
[ 1.6181080] 00000030| 00 19 33 01 00 90 03 04 00 00 00 05 00 00 00 80 | ..3............. |
[ 1.6281590] --------+--------------------------------------------------+------------------+
[ 1.6281590] sdmmc0: SD card status: 4-bit, C10, U1
[ 1.6400650] ld0 at sdmmc0: <0x27:0x5048:SD32G:0x60:0xdad414f5:0x12c>
[ 1.6501120] ld0: 29808 MB, 7570 cyl, 128 head, 63 sec, 512 bytes/sect x 61046784 sectors
>How-To-Repeat:
e.g. build earmv6hf release, dd rpi.img to a card, and boot a rpi 0 w.
Note lack of bwfm.
>Fix:
>Audit-Trail:
From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/54959: sdmmc_mem_enable failed with error 60
Date: Mon, 30 Mar 2020 22:00:20 +0100
Just tried
http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/latest/evbarm-earmv6hf/binary/gzimg/rpi.img.gz
and symtoms persist:
NetBSD 9.99.52 (RPI) #0: Sat Mar 28 18:37:18 UTC 2020
mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/RPI
simplebus0 at armfdt0: Raspberry Pi Zero W Rev 1.1
sdhc0: SDHC 3.0, rev 153, platform DMA, 200000 kHz, HS 3.3V, re-tuning mode 1, 1024 byte blocks
sdmmc1 at sdhc0 slot 0
sdmmc1: sdmmc_mem_enable failed with error 60
sdmmc1: autoconfiguration error: couldn't enable card: 60
=> no bwfm
(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.