From nobody Tue Jan 9 10:48:22 2024 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 4T8SMk5f2Yz575bT for ; Tue, 9 Jan 2024 10:48:34 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4T8SMj4DJvz4btv for ; Tue, 9 Jan 2024 10:48:33 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=ejIS2mL9; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1704797306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZjqnPNveXPNohhbd8fOHP9skfXwRVIsC9gAPxHjVbuw=; b=ejIS2mL9Eao425sDRxAzwDv6qo936Ad7RiqkiqyewvQjyIFMKVtx9C260XRhBjFQPKLp5J gjuTWjVw+elOTmRcCBXPyarHIXzF3csipg9NiPY2Z5LhsdmecY1uON5+mU9rtEjoW/Wp2g w4C9FclvoKAAXZDZE10iB3G3BjgCU/E= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id b5e76d5c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 9 Jan 2024 10:48:26 +0000 (UTC) Date: Tue, 9 Jan 2024 11:48:22 +0100 From: Emmanuel Vadot To: =?ISO-8859-1?Q?S=F8ren?= Schmidt Cc: "freebsd-arm@freebsd.org" , "Bjoern A. Zeeb" , Warner Losh Subject: Re: MMCCAM hang Message-Id: <20240109114822.522d91fea8cf170af4d895b7@bidouilliste.com> In-Reply-To: <49DE81A1-7DF5-48BF-A334-961A73B91E53@gmail.com> References: <49DE81A1-7DF5-48BF-A334-961A73B91E53@gmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd15.0) 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=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: - X-Spamd-Result: default: False [-1.90 / 15.00]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32]; ONCE_RECEIVED(0.10)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_EQ_ADDR_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_TO(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; FREEFALL_USER(0.00)[manu]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[] X-Rspamd-Queue-Id: 4T8SMj4DJvz4btv On Tue, 9 Jan 2024 11:36:32 +0100 S=F8ren Schmidt wrote: > > On 28 Dec 2023, at 02.08, Warner Losh wrote: > > On Wed, Dec 27, 2023, 4:55?PM Bjoern A. Zeeb > wrote: > >> Hi, > >>=20 > >> sdhci_fsl_fdt0: Desired SD/MMC freq: 50000000, actual: 50000000; base = 700000000 prescale 1 divisor 14 > >> GEOM: new disk sdda0 > >> sdda0 at sdhci_slot0 bus 0 scbus0 target 0 lun 0 > >> sdda0: Relative addr: 00000002 > >> Card features: > >> Card random: unblocking device. > >> GEOM: new disk sdda0boot0 > >> memory OCR: 00ff8080 > >> sdda0: Serial Number ....... > >> sdda0: MMCHC .................................. by 17 0x0000 > >> GEOM: new disk sdda0boot1 > >> uhub0: 2 ports with 2 removable, self powered > >>=20 > >> at which point basically anything hangs. In auto-boot it is > >> before/during file-system checks. > >> In single user mode camcontrol devlist will show sdda0 > >> but > >>=20 > >> root@:/ # gpart show sdda0 > >> load: 6.06 cmd: gpart 24 [g_waitfor_event] 1.28r 0.00u 0.00s 0% 2088k > >> {forever} > >>=20 > >>=20 > >> Unclear at which point I broke to debugger and this is where it seems = to > >> hang: > >>=20 > >> db> trace 100088 > >> Tracing pid 4 tid 100088 td 0xffff0000dc527000 > >> ipi_stop() at ipi_stop+0x34 > >> arm_gic_v3_intr() at arm_gic_v3_intr+0xe4 > >> intr_irq_handler() at intr_irq_handler+0x80 > >> handle_el1h_irq() at handle_el1h_irq+0x14 > >> --- interrupt > >> spinlock_exit() at spinlock_exit+0x44 > >> callout_reset_sbt_on() at callout_reset_sbt_on+0x210 > >> sdhci_cam_action() at sdhci_cam_action+0x284 > >> xpt_run_devq() at xpt_run_devq+0x4c8 > >> xpt_action_default() at xpt_action_default+0x470 > >> sddastart() at sddastart+0x1bc > >> xpt_run_allocq() at xpt_run_allocq+0xa8 > >> xpt_done_process() at xpt_done_process+0x610 > >> xpt_done_td() at xpt_done_td+0x1a8 > >> fork_exit() at fork_exit+0x8c > >> fork_trampoline() at fork_trampoline+0x18 > >>=20 > >>=20 > >> Anyone an idea? > >=20 > >=20 > >=20 > > Looks like deadlock with another thread. Anybody else in the time keepi= ng / callout code? >=20 > I think this is related to the MMC driver having issues (MMCCAM or not). > If I try to use a MMC sdcard on any of my rk35X8 boards as the disk devic= e it will eventually hang on first access to the MMC controlled media. > I thought I had an issue here with my dev setup but clealy I'm not alone = :) SDCard on RK356X don't use sdhci but dwmmc so it's not related to what bz@ is seeing. That being said I have no problem using dwmmc as the root device on my nanopi r5s or quartz64. --=20 Emmanuel Vadot