From nobody Wed Jul 07 00:45:02 2021 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A84858D3482 for ; Wed, 7 Jul 2021 00:45:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GKLLC3lp1z4RGt for ; Wed, 7 Jul 2021 00:45:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 9A13C8D4A172; Wed, 7 Jul 2021 00:45:05 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id B9BCCE707CF; Wed, 7 Jul 2021 00:45:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id FmnX7U1Cv_qC; Wed, 7 Jul 2021 00:45:03 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 482C8E707C8; Wed, 7 Jul 2021 00:45:03 +0000 (UTC) Date: Wed, 7 Jul 2021 00:45:02 +0000 (UTC) From: "Bjoern A. Zeeb" To: Warner Losh cc: "freebsd-arm@freebsd.org" Subject: Re: MMCCAM sdhci_fdt0 panic on boot In-Reply-To: Message-ID: References: X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 4GKLLC3lp1z4RGt X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Tue, 6 Jul 2021, Warner Losh wrote: > On Tue, Jul 6, 2021 at 5:31 PM Bjoern A. Zeeb < > bzeeb-lists@lists.zabbadoz.net> wrote: > >> On Tue, 6 Jul 2021, Bjoern A. Zeeb wrote: >> >>> Hi, >>> >>> something has recently changed which causes this (last kernel was from >>> April 20 imho and was fine)? >>> I am wondering if it is because of MMCCAM/CAM updates or a DTS update I >>> didn't fully do and we don't handle well? >>> My guess is the former... >> >> replying to myself after looking at the code; >> I am almost certain it's this one: >> >> https://cgit.freebsd.org/src/commit/sys/dev/sdhci/sdhci.c?id=a72af82e3169fcacfedf9047120679300a4296f8 >> >> Given the previous version did pass that: >> >> https://cgit.freebsd.org/src/commit/sys?id=aeb04e88f51a706ef4b6a380bf5e82d15203fb6a >> >> I'll run a quick test using this before committing. >> >> diff --git sys/dev/sdhci/sdhci.c sys/dev/sdhci/sdhci.c >> index bd30175e9f8..d075c2e0500 100644 >> --- sys/dev/sdhci/sdhci.c >> +++ sys/dev/sdhci/sdhci.c >> @@ -2484,7 +2484,7 @@ sdhci_start_slot(struct sdhci_slot *slot) >> >> mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF); >> slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll, >> - "sdhci_slot", slot, device_get_unit(slot->dev), >> + "sdhci_slot", slot, device_get_unit(slot->bus), >> &slot->sim_mtx, 1, 1, slot->devq); >> >> if (slot->sim == NULL) { >> > > > You're correct. slot->dev is unused for MMCCAM it seems. I don't know > what I was thinking when I made the earlier change. Thanks for the ACK. tested to boot and fixed in da2f833f7a0bef3cde7d5fc2a05e4646e873567f 'Night /bz -- Bjoern A. Zeeb r15:7