From nobody Sun Jun 15 23:27:24 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 4bL8S40GRyz5y7nC for ; Sun, 15 Jun 2025 23:27:32 +0000 (UTC) (envelope-from j_yoon.choi@samsung.com) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout2.samsung.com", Issuer "DigiCert Global G2 TLS RSA SHA256 2020 CA1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bL8S32pHNz3s64 for ; Sun, 15 Jun 2025 23:27:31 +0000 (UTC) (envelope-from j_yoon.choi@samsung.com) Authentication-Results: mx1.freebsd.org; none Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20250615232726epoutp0284eb51a41079e788ef0bec8272f4bb58~JWw4bayY-0420304203epoutp02R for ; Sun, 15 Jun 2025 23:27:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20250615232726epoutp0284eb51a41079e788ef0bec8272f4bb58~JWw4bayY-0420304203epoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1750030046; bh=/7s6kFrFjAYLNIjEBFaya/Hu+rKfWBF7rSJG4Eq4T0w=; h=Date:Subject:Reply-To:From:To:CC:In-Reply-To:References:From; b=CS/UrQ0PaxzmxnQnpdSSjZA6hrPlt60zSJ3EvIXoBULb2Mv/SkNBk+B8UMkLWiTmK fSfBaAgHS3gCudZTb3xqWtPYKS+aZElimV/IRRHYtc8ChHiJe4RR7ROh1KMvMcBIsx Xs8KISW3e3kT1+tqr8bO3IqtlOfxxvezSuJR/53E= Received: from epsnrtp03.localdomain (unknown [182.195.42.155]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPS id 20250615232725epcas2p3cafbd0cfab9f3bfa451ac0cd86a0ccdd~JWw3xn5-A0199701997epcas2p3Y; Sun, 15 Jun 2025 23:27:25 +0000 (GMT) Received: from epcas2p1.samsung.com (unknown [182.195.36.97]) by epsnrtp03.localdomain (Postfix) with ESMTP id 4bL8Rx00gbz3hhT9; Sun, 15 Jun 2025 23:27:25 +0000 (GMT) Date: Mon, 16 Jun 2025 08:27:24 +0900 Message-ID: <446616643.2635777.1750030044474@v8mail-kr2-0.v8mail-kr2.knoxportal-kr-prod-green.svc.cluster.local> 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 Subject: RE: Re: git: 1349a733cf28 - main - ufshci: Introduce the ufshci(4) driver Reply-To: j_yoon.choi@samsung.com From: Jaeyoon Choi To: A FreeBSD User , "Bjoern A. Zeeb" CC: Warner Losh , Jaeyoon Choi , "src-committers@FreeBSD.org" , "dev-commits-src-all@FreeBSD.org" , "dev-commits-src-main@FreeBSD.org" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20250615135324.2fa38fba@thor.sb211.local> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N X-CMS-MailID: 20250615232724epcms2p23bafb40ecaa1a171b8192d9c10419682 Content-Type: multipart/mixed; boundary="----=_Part_2635776_1656598423.1750030044474" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P cpgsPolicy: CPGSC10-223,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20250615115418epcas2p2819354750666b01748ce41d903f25ca0 References: <20250615135324.2fa38fba@thor.sb211.local> <202506150609.55F69dn3021406@gitrepo.freebsd.org> <20250615103251.2221265b@thor.sb211.local> <95r7ros1-5296-8orq-sqp5-s7p4935p6039@SerrOFQ.bet> X-Rspamd-Queue-Id: 4bL8S32pHNz3s64 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6619, ipnet:203.254.224.0/24, country:KR] ------=_Part_2635776_1656598423.1750030044474 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" Am Tage des Herren Sun, 15 Jun 2025 09:28:38 +0000 (UTC) > "Bjoern A. Zeeb" schrieb: > > > 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://protect2.fireeye.com/v1/url?k=cb832e5e-aafec626-cb82a511-74fe485fffb1-e312001ade8edb13&q=1&e=a7ecea84-b060-48ec-b5d3-c775104b7c66&u=https%3A%2F%2Fwww.jedec.org%2Fstandards-documents%2Fdocs%2Fjesd220g > > >> - UFSHCI 4.1: https://protect2.fireeye.com/v1/url?k=b4fdaf27-d580475f-b4fc2468-74fe485fffb1-dfdf98856594733e&q=1&e=a7ecea84-b060-48ec-b5d3-c775104b7c66&u=https%3A%2F%2Fwww.jedec.org%2Fstandards-documents%2Fdocs%2Fjesd223f > > >> > > >> 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, > > > > > > > > > > Thank you very much, seems to work, at least, for me. > > Kind regards, > oh > Oh, that was my mistake, thanks for fixing it! Jaeyoon ------=_Part_2635776_1656598423.1750030044474 Content-Type: application/octet-stream Content-Disposition: attachment; filename="No File Name 0" Content-Transfer-Encoding: base64 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0KaUhVRUFSWUtBQjBXSVFSUWhlRHliVmt0 RzVlVy8xS3h6dnM4T3Fva3J3VUNhRTYwWUFBS0NSQ3h6dnM4T3Fvaw0KcjlDVUFQOWNXTEo3SnFT TjhkY2ZWNTBFbFNWZTExcGI2NXBDY0NsTTA3YzJCS0ZPQkFFQXRCWUdyczJaSURyTA0KVkxzeWVT VUY1Ulp1UTkzc3BNVVlvSDBzNXo1NUd3VT0NCj1XcFB0DQotLS0tLUVORCBQR1AgU0lHTkFUVVJF LS0tLS0NCg== ------=_Part_2635776_1656598423.1750030044474--