From nobody Sun Jun 15 09:28:38 2025 X-Original-To: dev-commits-src-all@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 4bKnrK4R8fz5sL1X; Sun, 15 Jun 2025 09:28:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bKnrK36CDz3R7w; Sun, 15 Jun 2025 09:28:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749979729; 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: in-reply-to:in-reply-to:references:references; bh=wGk6cYtTiHld/H/t7CeBSfEUh8MHOV5k93mNEwStOqI=; b=JRyIseeujP0Et/cCGd8VTQMhayunWqr2KoRxfMUocCBGc1wSM0XRRuzw+/ZOtkKNRi7xhm T+mTpFqtKjBXFSBKgENhRVsc2ilSy5r1V1snnf1liBBa4OlhFW24G4amCXuHQ19J3MsDdW 9oxPKhnbaEh307NZwJrk5+qICmQWnE4HNnKZEAhwgXQ173NSf8BxQqy8X17n79ab86o0Xs IO3JJWSL4W2+BNzYfAAj/htOjvv5ngRVXX2PsGT2qLHK+s6imSCeYT8aEmaBuOaB+1zeMZ KXwBfK5Rjuf8ZschGWv5VS/sohBewSavi/QpTJjqfcHZmdqbwEpw/luUwdMdrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749979729; 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: in-reply-to:in-reply-to:references:references; bh=wGk6cYtTiHld/H/t7CeBSfEUh8MHOV5k93mNEwStOqI=; b=PEUXWnnqJimKac+DFXluAvI1PRntQClFYPf7IwUkumnZMjHF/cNbPiXf5ukIDx/tRfOKWD oZmUJDwD2uucNub3ckFlvwjbopum0KQsjeWwoGzJ/uitwZmxhelwMSILD36d4i5X6VhtHU 5J2qDbNZzCVGC3PNp4xt6SXvKfF7xHx2HLSk88C0/Xmbet69jnbpWe4qp94zCzHI6nQUtS HNRQ8AlNY9O4cC3T2fEZb1GFqMCDndnP+zYvTbGUNIedGU1RybEQp+n9PKx61gX5+N6pD1 K/4x9QI1azPBY29boNzZrdDhrkOa9duNVubK9SJczwKVsNuI9lJxCTuiHXzfcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749979729; a=rsa-sha256; cv=none; b=iIEkRu+YA/n7kx8bWiLpkaGeztMpxUYB515IRnHmkNizJOeyodiyvcQblCM0kuXejLJ6h6 bJ+46x5YaPZgkIqTsN/gMBmk21Bw5p66fZ4Yq7STQckHPcAmJ7N8V/NszpZX+DUA81hrxC QdBoDYqn+BYdyByVm13mtci3LS0JXcX/kKnXANAiZi7WbzJfAftECPOxUtoqjtGPlWGsn3 8kxw+vb3ou6erI/G9feAu3GTHTQahreTgyT6caFyc+MUjxXPk+VD/tERXiVzn3AKN9iZg2 ys8cNzRJFjIzKYqChoe9UGx3Lo9gN7Olq8iu43fWDYl2CMo2/K6+s7c/mnUkjg== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (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-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E5" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bKnrK0mvsz13Nf; Sun, 15 Jun 2025 09:28:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id C2391A64805; Sun, 15 Jun 2025 09:28:39 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (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) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 781C52D029E0; Sun, 15 Jun 2025 09:28:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id RgM1O-GiKEkX; Sun, 15 Jun 2025 09:28:39 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:a66b:b6ff:fe40:39a9]) (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) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 953672D029D8; Sun, 15 Jun 2025 09:28:38 +0000 (UTC) Date: Sun, 15 Jun 2025 09:28:38 +0000 (UTC) From: "Bjoern A. Zeeb" To: A FreeBSD User cc: Warner Losh , Jaeyoon Choi , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1349a733cf28 - main - ufshci: Introduce the ufshci(4) driver In-Reply-To: <20250615103251.2221265b@thor.sb211.local> Message-ID: <95r7ros1-5296-8orq-sqp5-s7p4935p6039@SerrOFQ.bet> References: <202506150609.55F69dn3021406@gitrepo.freebsd.org> <20250615103251.2221265b@thor.sb211.local> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Sun, 15 Jun 2025, A FreeBSD User wrote: > Am Tage des Herren Sun, 15 Jun 2025 06:09:39 GMT > Warner Losh schrieb: > >> The branch main has been updated by imp: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=1349a733cf2828e0040cabef89eeadc3ff00c40b >> >> commit 1349a733cf2828e0040cabef89eeadc3ff00c40b >> Author: Jaeyoon Choi >> AuthorDate: 2025-06-13 18:33:01 +0000 >> Commit: Warner Losh >> CommitDate: 2025-06-15 06:08:56 +0000 >> >> ufshci: Introduce the ufshci(4) driver >> >> This commit adds a storage driver that supports the Universal Flash >> Storage Host Controller Interface (UFSHCI) on FreeBSD. >> >> Universal Flash Storage (UFS) is a flash-based mobile storage device >> that replaces eMMC, aiming for high performance with low power. The UFS >> Host Controller Interface (UFSHCI) is the host side controller and >> connects UFS device to a system bus, such as PCIe. >> >> The code targets the latest standards: >> - UFS 4.1: https://www.jedec.org/standards-documents/docs/jesd220g >> - UFSHCI 4.1: https://www.jedec.org/standards-documents/docs/jesd223f >> >> The ufshci(4) driver implements controller/device initialization, >> interrupt, single-doorbell(SDB) queue based IO requests. Support for >> multi-queue (MCQ) IO requests is planned for a later commit. >> >> Implemented features: >> - PCIe bus support >> - legacy(INTx) Interrupt Handling >> - UIC command support >> - UTP Transfer Request (UTR) support >> - UTP Task Management Request (UTMR) support >> - single doorbell queue (SDB) with multiple queue depth >> - SCSI command set support >> - sysctl >> >> Work in progress: >> - multi-Circular Queue (per-CPU IO queues) >> - MSI-X interrupt Support >> - write booster >> - write Protect >> - Host Performance Booster (HPB) >> - interrupt aggregation >> - ARM based system bus support >> - ufs-utils port >> >> Tests were performed on QEMU and an Intel-based laptop. >> Since QEMU has an emulated UFS device, I tested on QEMU. >> >> How to test on QEMU: >> 1. Run QEMU >> $ qemu-system-x86_64 ... -device ufs -drive >> file=blk1g.bin,format=raw,if=none,id=luimg -device ufs-lu,drive=luimg,lun=0 2. >> Loading/unloading the ufshci module on QEMU $ kldload >> /usr/obj/usr/src/amd64.amd64/sys/modules/ufshci/ufshci.ko $ kldunload ufshci >> >> Testing on real hardware: >> - Samsung Galaxy Book S (Intel Lakefield) with UFS 3.0 >> - Lenovo duet 3 11ian8 (Intel N100) with UFS 2.1 >> >> Sponsored by: Samsung Electronics >> Reviewed by: imp >> Differential Revision: https://reviews.freebsd.org/D50370 >> --- >> sbin/camcontrol/camcontrol.c | 13 + > > It seems changes to sources breaks buildkernel (at least for me) on customized kernel config: > > [...] > --- camcontrol.pieo --- > /usr/src/sbin/camcontrol/camcontrol.c:5407:23: error: use of undeclared identifier > 'CTS_UFSHCI_VALID_MODE' --- all_subdir_bin --- > --- all_subdir_bin/sleep --- > ===> bin/sleep (all) > --- all_subdir_sbin --- > 5407 | if (ufshci->valid & CTS_UFSHCI_VALID_MODE) { > | ^ > [...] > > Kind regards, I am running a test build just to be sure but I think this should do: commit 78f12afc38eabea82fd247c157d340e289dceeb8 Author: Bjoern A. Zeeb AuthorDate: Sun Jun 15 09:25:56 2025 +0000 Commit: Bjoern A. Zeeb CommitDate: Sun Jun 15 09:25:56 2025 +0000 ufshci: camcontrol: use correct define to fix the build Fixes: 1349a733cf28 diff --git sbin/camcontrol/camcontrol.c sbin/camcontrol/camcontrol.c index 19684c044ef5..15a5d42a2ba5 100644 --- sbin/camcontrol/camcontrol.c +++ sbin/camcontrol/camcontrol.c @@ -5404,7 +5404,7 @@ cts_print(struct cam_device *device, struct ccb_trans_settings *cts) struct ccb_trans_settings_ufshci *ufshci = &cts->xport_specific.ufshci; - if (ufshci->valid & CTS_UFSHCI_VALID_MODE) { + if (ufshci->valid & CTS_UFSHCI_VALID_LINK) { fprintf(stdout, "%sHigh Speed Gear: %d (%d max)\n", pathstr, ufshci->hs_gear, ufshci->max_hs_gear); fprintf(stdout, "%sUnipro TX lanes: %d (%d max)\n", pathstr, -- Bjoern A. Zeeb r15:7