From nobody Sun Jun 7 22:20:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1780531702; cv=none; d=zohomail.com; s=zohoarc; b=ZzFPQXqRyxe29FGTxqn9AbQoE0JEs4oHkeUy0suqpBg5M9uYKTJevIZgWXIvt4zLvaW2DBXVSKERjviVKyyIqdH0ZdA6XZVMim6OFjiY+CWFpn+t+I8FaXuMGlKT4ohW5vSNwffJeTtCWNfc9HgCoTNCO9a3Arv30SED3aXmQ0o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780531702; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=W3plxZB95bOYBv8PsvF1VYB1qsttARz/uMLqwisAwgo=; b=SLVYfB3EYwT9e+2peN8id8g6Tl5JbYEiv8x1Ewv+9JYFNOTPA3ZW859Eu5cBrwHJhaviW0nEimtZvFuucOnaaMkdcelUZ742OV68TPGOD2RnUyOApMkbEZPdCOwrW3txjhZA7tCDjRCoxGoc2wgAzev96GnOIaobMbFO5rCta3E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780531702465634.9956138977733; Wed, 3 Jun 2026 17:08:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wUvcg-0001qw-2t; Wed, 03 Jun 2026 20:07:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUvce-0001pw-1V for qemu-devel@nongnu.org; Wed, 03 Jun 2026 20:07:44 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUvcb-0006YC-MC for qemu-devel@nongnu.org; Wed, 03 Jun 2026 20:07:43 -0400 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 653I6h1V1993965 for ; Thu, 4 Jun 2026 00:07:38 GMT Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ejs8ps5uw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 04 Jun 2026 00:07:38 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-307625ee07fso283873eec.1 for ; Wed, 03 Jun 2026 17:07:38 -0700 (PDT) Received: from hu-jithjose-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3074dfa3a2asm5374960eec.31.2026.06.03.17.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 17:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=W3plxZB95bO YBv8PsvF1VYB1qsttARz/uMLqwisAwgo=; b=edlGC6+taAGpW1XqLXqWJ2mOrDO WrGQ6raD16SHqwnl8AP9ORcfWaQiwpSsLVd9GlJI5JfZetjoOKfmibhTHlFx5ITd EzdRfbXmbcV4BDoRNFKi1CySX3oDXpFlpaHIquigoJxOlrMIUWZYYV8IoaqFxOQ0 mewFWnqnP15j6nl+beTlzq2vvyShm2JV05jgYtPTRtZok4H8Sw9tMXffuOqUNVAR 9EqziFuo8ccseB71XRZzwzQS6X9zPhBEGFue45+1Z0gQuMS+yLaWpEdSxnC4ioH7 y3r5+ZfWPQl3JILjQm3kU4LggoTYE9OLqsyQWm03R0VScUUA+ZuZWZ304/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780531658; x=1781136458; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=W3plxZB95bOYBv8PsvF1VYB1qsttARz/uMLqwisAwgo=; b=BZVyObOnIiwYusIEX1VtLj0K1Wa0A5hD1zFngmHodhySZ4IYRDHWDsiXK16Qtz1fKz P+b3hhPA5SnM9jpqOQoxfC+5LdPkSPOdWbNgs6vc3tIypakqL6rkXV39OgVKeTVk3fzX 65d5HDU7OPqdMS5bfw43x9+mqUN6epOXMT+7CksQ7er06NzYn8k4vckbbvvGZTNekrt6 vde6IO0/NZWX7rpkaaZ3wZ6gi4yDTIp6K3PJzV9M6g4pMafrbGAsLu1Zlmqq2ZH9k+78 8VWlxeX2chT+DGk0L+nIVSpTU2xGY3UPCr987LH1Uvs39i8R4iYw/ihkc4olh1f4t68Q AcdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780531658; x=1781136458; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=W3plxZB95bOYBv8PsvF1VYB1qsttARz/uMLqwisAwgo=; b=Ky0UaDbUASw0E4hKipwkHbC/iFOPP0XOUMH0Bsl/IlAdipX/hgcr4PZ3iTZUPOumRl 9HIKERPSWJQ0WA9LWBwbhNWNh53caN11rXrnxBGXz2zaKq3p1NQ6iIFnN7uMSqR5QMFA LYxZs6tEv6kQL3nIl4Hrzusc3ZUbbWNew4LsqD1lJ64jNHEXfphzvlWXP0eCEtQb/q8R WY+V+GMzhS73E6K31VWUiWjVRr9BLwWKgiQDUzlNe4tY7shkZ0I43pkb0dbQpu5icBHb 7RXyJHG9lr4DTsQ9XheM0m18jFB3uh5G2wBiKJqHmqhIOqAUPiIU1I/zaNoZhtt7Y6mx L/Cw== X-Forwarded-Encrypted: i=1; AFNElJ8xyE0MYi6L6o0AdPEIy+ZCJzaEIS1ejdoHzev+XSymNYS4Sj27uV2Bve3GhwicVIDTdZ7weAmDvp2h@nongnu.org X-Gm-Message-State: AOJu0YxMTr+lmMeYcPFK7PKB2f7wP5bpewqcfQFEqCC+S2zDttl7k/rO 5VyQd9c5Si0XYs/pQALJ8X7Q0t3hzOJuASUbJhVCqgTRo9gfo0p680PNW2uoqZ9bNE55+TAbJRJ yQKDnTFk8QLQJO3k2fDjIFElkhlCVxDLkIXHEef1EsZUypfo/3OneIqymEg== X-Gm-Gg: Acq92OH2+/GFzDU9fxROKBNf6HdpmCEdukZpf2IX64jlXzv0olAvrIGTiUmtu7PaYSr joJOCnITifjy2F5KLmX+ZwP1zn4BBx6Vck1J/kiQR2UjFM76TORbh9wSgdSumicDOZ04d7JYdQd Cd65yEsdF6i7PXww38cPF6CDtfptuwpJJEcpbZze7hzGUj8eNyCPR7o8VWyzlyUvDrZauEwGdeC zjLvFwSwsu7HmKdTjc18W948vOPF8ga0SgAEkX2+D/xXSiYBABcvjzAoHrFUy1/jgbCFjDPiRbU W7pdzOU9SUrWJXUKr4XgshdHynUJcGQOY4PWNjs2ouP7/pkZmm4i9g2xYdMpyqb8s4b+dibRS98 WyKovHbFtua3Yqn5GPJneL0okxHmWtzFxe+rjHkrsp49k4G4K89KvbxHbqva90ulYsH54nLBQJX BAxPyDBXA5+lo= X-Received: by 2002:a05:7301:22a8:b0:304:641b:12fd with SMTP id 5a478bee46e88-3074fbcadfamr2997490eec.27.1780531657726; Wed, 03 Jun 2026 17:07:37 -0700 (PDT) X-Received: by 2002:a05:7301:22a8:b0:304:641b:12fd with SMTP id 5a478bee46e88-3074fbcadfamr2997472eec.27.1780531657241; Wed, 03 Jun 2026 17:07:37 -0700 (PDT) From: Jithu Joseph To: clg@kaod.org, jamin_lin@aspeedtech.com, komlodi@google.com Cc: nabihestefan@google.com, philmd@linaro.org, jithu.joseph@oss.qualcomm.com, qemu-devel@nongnu.org Subject: [PATCH v2 1/3] hw/i3c: fix CMD/data FIFO depth reset values to match real silicon Date: Wed, 3 Jun 2026 17:07:32 -0700 Message-ID: <20260604000734.1094382-2-jithu.joseph@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260604000734.1094382-1-jithu.joseph@oss.qualcomm.com> References: <20260529014034.864722-1-jithu.joseph@oss.qualcomm.com> <20260604000734.1094382-1-jithu.joseph@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: KsCIobLB-gWmNxwkCE5wwd8oPg5OP5rh X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjAzMDIzNSBTYWx0ZWRfX9bxQpw9GhG0N N4qjqproVfitetWFcQFemnjZwU8O1mpSaUfKy9SV6OjSHx89PxibS5EfTonCtYkDMZsPF5JSDgg 7u6FJ6wV9MTePyKLpc5OXQcI7rzWD77w9CQ9PYY7DUviCg0k+rBAE9vn/FHilI/bUp+1ulpRBfl A3vjfGxrV8Dm5eqOqIzEAO2r6syXXUlX0p4VRef2h+sKFIB0IF0R7uKZHLJWJSko2sFYK917dhk CD7PL/Mph1soWEnzpSWRHdQ4LnDDnlvihYHuf2RzZd6Gz9Krw7GRKKzRuJ6NfjL58E3gVsCUXEa X7EdHxBRO2Nb+qF6074Io5YNrO+YYSK/4eTRFS/dFj76YX85mBOm+Z8VtGgu8kyij/rz+Rh3xbu T+vReLsHSpB0z5HfUYMY5jXY7nOZxAxic+CnqT8MvTm+qe7xJTWzsrGIpB5or2MuEL/cf6URDvj ZoAwb98yoPC79SpF5FA== X-Authority-Analysis: v=2.4 cv=E779Y6dl c=1 sm=1 tr=0 ts=6a20c1ca cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=69wJf7TsAAAA:8 a=EUspDBNiAAAA:8 a=1Cgkl99JUvOo6gf9qOkA:9 a=PxkB5W3o20Ba91AHUih5:22 a=Fg1AiH1G6rFz08G2ETeA:22 X-Proofpoint-GUID: KsCIobLB-gWmNxwkCE5wwd8oPg5OP5rh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-03_06,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 adultscore=0 impostorscore=0 malwarescore=0 spamscore=0 phishscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606030235 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=jithu.joseph@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1780531704967154100 Content-Type: text/plain; charset="utf-8" The Linux DW-I3C master driver infers controller queue depths at probe by reading two status registers that report free queue slots, which at probe (queues empty) equals the full depth. It then uses those values to gate every I3C transfer -- any batch whose word count exceeds the advertised depth is rejected with -EOPNOTSUPP. QUEUE_STATUS_LEVEL (0x4c) [7:0] -> cmdfifodepth (cmd slots) DATA_BUFFER_STATUS_LEVEL (0x50) [7:0] -> datafifodepth (32-bit words) Per the AST2600 datasheet the reset values are 0x10 and 0x40 (16 cmd slots, 64 words =3D 256 B). QEMU was advertising 0x02 and 0x10, making the kernel believe the controller can only do 64-byte transfers. The visible symptom was -EOPNOTSUPP on any I3C transfer whose payload exceeded 64 B (datafifodepth =3D 0x10 =3D 16 words =3D 64 B). The underlying FIFOs in QEMU were already allocated at the right size (fifo32_create takes word counts; the existing defaults give 16 cmd slots and 64 data words). Only the advertised reset values were wrong. Correct the reset values in dw_i3c_resets[], and additionally drive the advertised depths from the queue-capacity configs in the reset handlers (as is already done for the device/char table pointers), so a configured override is reflected in what the guest reads instead of being silently ignored. The advertised fields are 8-bit, so the depth saturates at 255 regardless of the wider capacity configs. With this fix the guest sees datafifodepth=3D64 words and accepts transfers up to 256 B. Fixes: e974c6957576 ("hw/i3c/dw-i3c: Add more reset values") Cc: qemu-stable@nongnu.org Signed-off-by: Jithu Joseph Reviewed-by trailers it would be nice. Reviewed-by: Jamin Lin --- hw/i3c/dw-i3c.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/i3c/dw-i3c.c b/hw/i3c/dw-i3c.c index 17ff484c5df1..06c2d55f5958 100644 --- a/hw/i3c/dw-i3c.c +++ b/hw/i3c/dw-i3c.c @@ -282,8 +282,8 @@ static const uint32_t dw_i3c_resets[DW_I3C_NR_REGS] =3D= { [R_QUEUE_THLD_CTRL] =3D 0x01000101, [R_DATA_BUFFER_THLD_CTRL] =3D 0x01010100, [R_SLV_EVENT_CTRL] =3D 0x0000000b, - [R_QUEUE_STATUS_LEVEL] =3D 0x00000002, - [R_DATA_BUFFER_STATUS_LEVEL] =3D 0x00000010, + [R_QUEUE_STATUS_LEVEL] =3D 0x00000010, + [R_DATA_BUFFER_STATUS_LEVEL] =3D 0x00000040, [R_PRESENT_STATE] =3D 0x00000003, [R_I3C_VER_ID] =3D 0x3130302a, [R_I3C_VER_TYPE] =3D 0x6c633033, @@ -947,6 +947,10 @@ static void dw_i3c_reset(DeviceState *dev) s->cfg.dev_char_table_pointer); ARRAY_FIELD_DP32(s->regs, DEV_CHAR_TABLE_POINTER, DEV_CHAR_TABLE_DEPTH, s->cfg.dev_char_table_depth); + ARRAY_FIELD_DP32(s->regs, QUEUE_STATUS_LEVEL, CMD_QUEUE_EMPTY_LOC, + s->cfg.cmd_resp_queue_capacity_bytes); + ARRAY_FIELD_DP32(s->regs, DATA_BUFFER_STATUS_LEVEL, TX_BUF_EMPTY_LOC, + s->cfg.tx_rx_queue_capacity_bytes); =20 dw_i3c_cmd_queue_reset(s); dw_i3c_resp_queue_reset(s); @@ -1793,6 +1797,10 @@ static void dw_i3c_reset_enter(Object *obj, ResetTyp= e type) s->cfg.dev_char_table_pointer); ARRAY_FIELD_DP32(s->regs, DEV_CHAR_TABLE_POINTER, DEV_CHAR_TABLE_DEPTH, s->cfg.dev_char_table_depth); + ARRAY_FIELD_DP32(s->regs, QUEUE_STATUS_LEVEL, CMD_QUEUE_EMPTY_LOC, + s->cfg.cmd_resp_queue_capacity_bytes); + ARRAY_FIELD_DP32(s->regs, DATA_BUFFER_STATUS_LEVEL, TX_BUF_EMPTY_LOC, + s->cfg.tx_rx_queue_capacity_bytes); } =20 static void dw_i3c_realize(DeviceState *dev, Error **errp) --=20 2.43.0 From nobody Sun Jun 7 22:20:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1780531718; cv=none; d=zohomail.com; s=zohoarc; b=IMPilRvUVdcpg8HlyB4eACVPPgKoSTQtsFgVpzHC5Kl91qRwLCdHvWsgEz3FnZmn3tiTGv50x2keX5oJDrj/P34BpD7G9j5+Y+4RzCTbAgW1EQ3p1lDSz/T1y3n2o79Pcr3bsBijiiN5Gp302roQMt8uA5kyzkjw4o3YOAJDqIQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780531718; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jcweNIUM6t+6hjcfD8RzLfViWzwnEXy7lBw9Fk6zniI=; b=MWsYF2ZfcRd6Hhe/s+OZyHuW350Uo24kj2OZ5XaNzcN89hy5DrTSJiirdbx+UoUwUMMhD7Qy4rZn2FTCX3gmDFdQCHMxb96Wam+8MkAkv7e6ryf9ZmVc272frmFRq1OoocKcVYsJc2a4MmZp0PDFkDW6Msyjwcb4JcnHwy5Rrys= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178053171842385.00964326118367; Wed, 3 Jun 2026 17:08:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wUvch-0001rL-1t; Wed, 03 Jun 2026 20:07:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUvcf-0001qN-K1 for qemu-devel@nongnu.org; Wed, 03 Jun 2026 20:07:45 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUvcb-0006YQ-Qg for qemu-devel@nongnu.org; Wed, 03 Jun 2026 20:07:45 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 653L1b9H1947093 for ; Thu, 4 Jun 2026 00:07:40 GMT Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ejabgn3rv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 04 Jun 2026 00:07:39 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-304ec73b015so173351eec.1 for ; Wed, 03 Jun 2026 17:07:39 -0700 (PDT) Received: from hu-jithjose-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3074dfa3a2asm5374960eec.31.2026.06.03.17.07.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 17:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=jcweNIUM6t+ 6hjcfD8RzLfViWzwnEXy7lBw9Fk6zniI=; b=azVHYlWWTXKH+fNEQVRC+82Gmqs DbESNnFZkxRVL538QUBqKSQ6MGA5YPQv97W1VJ1YXW0ag9Vn0qb8AkTv589UO2ZB XLXe6IQv4bc9iEj+Oq8C8OxQKdn39llXA1toYuqIKD8ldYd27cindm6+4bsEUNml Q0XKvFpyJ2c+4gy4QNt4FX8xMUP3bY3vSx5bZ7foa0Naz18/F+OoIN8BjrhTBv7E yLdD9oDUgZXu3pnS9X/g6EdU9bc4FO7u7YpWplKglvzUcVKoXctVV5LT27ScZpn0 hHya4LW1rvg2pKmPlZZWc+Cszb/5SEJfDfFIU2iluC7OaYP3k5o36jekxPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780531659; x=1781136459; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jcweNIUM6t+6hjcfD8RzLfViWzwnEXy7lBw9Fk6zniI=; b=Nsas7arOxH8CbUVh77yx/5xkTHwgdsxm1VJyyrzYIDVkbX6rB9jtyokFqxrSo4C6Lm /NpmbnYCnHU3ex8QR/jgB/v0JDxX61QUTbhUSTWxRGSh4V4llYIDzJE26OFEX8yZHwYc k9OWyg+vVIvBkkkO6xpTuMq3y2/yfagfDYpnVmy8PZjUC+NGhHJ2OCBg2do7SYg6BFBn jVSpO1Yq+2LsBVd6KR+f0NqY6eBAwhZG1afj2zy0MXE24cJgue1aMMqOHOhLyaCXxk5j TqD049kWt0oWBSYTbRCP3N5Ix5sQSamP11mK6zWUzr1Ir2PibjfQSvjdgAyLoIVyxtJc 8H6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780531659; x=1781136459; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jcweNIUM6t+6hjcfD8RzLfViWzwnEXy7lBw9Fk6zniI=; b=lQsSUyRe1v/9hbv6BZtp994Qoxv6jtKZl15GHzyGYye9407VXOODiXQq3u9U6UGCA7 BWLSHq8dUcpbIX9CX1PJpamS1O7+LYvomXFWSvKchUFzU3IxabUZp2LAG9JBIE9JddGq eH5BAIYTLCb1yNPaQI5Ds1NKxV1CHht3mie9hL9NLgh2EF+5Mf17UW0gELe5vuzkLGws pykZmgL50KGSj5lhEJSZk7jveH+G2zUy/vl/D1z+pS2DEZYwx47chglaj4a2gy+VjcRg AVg/6uSay46+ttbJVJi+955AE4tqEfTh+HYD3thYS405rr+27teWO6yYJKK7xGwOkhoq x3cQ== X-Forwarded-Encrypted: i=1; AFNElJ+sDGOeEdQwJyin7q+3ts7cCp5YW3jLLYtSqT6ndHHhqgrxleiBcCH125HkK08dSxQpKt5aFN/JDL68@nongnu.org X-Gm-Message-State: AOJu0YyyvlFjBFCOnm/6X/NZMvjCeGZhwqWlZ+MS3qpdwuCafI6iUTd1 KvcwCGEc77LSy4/5xunwMIqP6OCFBZR2I/JC+VRegSbfiXl67l+ln8/Of3zr0s7nkfov4rkmYFY bFyYofAqZkh8+CLSiBxL+cQbNkZzPEEcUaCbTX4tPBaPLn07QUw8JoepP4w== X-Gm-Gg: Acq92OHGwZniev7X4GiPfbtM+b3OnyrYzdYms0/g6zVuDKFr7hhaahbjpnw7JHpOd9L h2p+liY/SVBaY4CPkNhak0VdoQ/hB4L8O0X9djHYUA9EplAM22pli3PpUgXNyf9mfwT3EYn6p1a IeTi7Lhw93DJirMCH4tPuQ3ZypQInDc2MqWn4zL2C7YJXVzdKuFexfx+OwsTbhivUoXYWVkbAZZ FxBCjUMgpKkDe3DGsrHSgZuTP7Aj4pSUJxu7I3aAWb/SYrOx3Z2MXXMSe0oGTTMMnT211foLGq4 w2z81cuw6bDT1LR2tn+NcHzY/VUOtervVdleBMhrDkVcn6pQ9sL0FeIaLHIN85YchZrjlw5RdHM UbevqWsLrwT17CuMxNGKCgv2ImNcMI1CYJ3u7REuDFyv3zQkEgLPdmVyHXLXbY5nrZjY/bx48lq Uh4L95hJRCAsI= X-Received: by 2002:a05:7300:3254:b0:304:e6f8:7ccf with SMTP id 5a478bee46e88-3074fbebfdfmr3027592eec.27.1780531659098; Wed, 03 Jun 2026 17:07:39 -0700 (PDT) X-Received: by 2002:a05:7300:3254:b0:304:e6f8:7ccf with SMTP id 5a478bee46e88-3074fbebfdfmr3027571eec.27.1780531658509; Wed, 03 Jun 2026 17:07:38 -0700 (PDT) From: Jithu Joseph To: clg@kaod.org, jamin_lin@aspeedtech.com, komlodi@google.com Cc: nabihestefan@google.com, philmd@linaro.org, jithu.joseph@oss.qualcomm.com, qemu-devel@nongnu.org Subject: [PATCH v2 2/3] hw/i3c: rename DW-I3C queue capacity fields from _bytes to _words Date: Wed, 3 Jun 2026 17:07:33 -0700 Message-ID: <20260604000734.1094382-3-jithu.joseph@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260604000734.1094382-1-jithu.joseph@oss.qualcomm.com> References: <20260529014034.864722-1-jithu.joseph@oss.qualcomm.com> <20260604000734.1094382-1-jithu.joseph@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=R6sz39RX c=1 sm=1 tr=0 ts=6a20c1cb cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=Au2XYW2znXaePupJvy4A:9 a=scEy_gLbYbu1JhEsrz4S:22 X-Proofpoint-GUID: 3s_8yvqSn4Md_6uhvEvaXvIr89Ex99If X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjAzMDIzNSBTYWx0ZWRfX4kjrYhQWDvR+ 0LnSgi53r3OlgwlWhjWv3rmnJNyK3cvmEDVW3cZ8mUtNlO+H4qZFNzrfVLoxFVpGHXm/wqurHTQ P31PUxeP3wmk8EPXydcEmFhRzisyqsUA16Gl0mM+z4E+B5gWlnC2/akpSxRax23Bvgx6yqbFiR9 wdIhDk/KDnLTYkdeggvYu9DO2mJ0Dw5IlPWCjtdMsBnhs2HmP7r7PNKi19J9FBQIsxIM+Dhw6g4 3kBaWZCoTv/8G2ZpDvcMtGR2QL5o+JPAzNGWywLvD945Fhq51BN0qww47o8Y43SHz/ksOwwklfW 7pzhyBlyQwDc2J2EcVNPSdVyk6KuVpsvnQoqS+ddXX4El83XG6tYpn+rmPio6cNNeX+Iaq/45X5 D61hs6F02L0B5WQ8BLw4G+ZTwXjnrADrxVJ/gAULChd7pny3LtoJE9aKL6du/KhS9MDLUzDZZPO JGL3fh/9olP3T6rPzXQ== X-Proofpoint-ORIG-GUID: 3s_8yvqSn4Md_6uhvEvaXvIr89Ex99If X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-03_06,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 impostorscore=0 suspectscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606030235 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=jithu.joseph@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1780531720256158500 Content-Type: text/plain; charset="utf-8" The cmd/resp, tx/rx, and IBI queue capacity values are passed straight to fifo32_create(), which interprets its capacity argument as a 32-bit word count. The fields and device properties were therefore misnamed: setting e.g. tx-rx-queue-capacity-bytes=3DN sized the backing FIFO to N words, not N bytes. Rename the three struct fields and matching device-property strings: cmd_resp_queue_capacity_bytes -> cmd_resp_queue_capacity_words tx_rx_queue_capacity_bytes -> tx_rx_queue_capacity_words ibi_queue_capacity_bytes -> ibi_queue_capacity_words Defaults are unchanged (0x10 / 0x40 / 0x10) -- they were being interpreted as word counts by fifo32_create() all along, just under a misleading label. No behavioral change. Signed-off-by: Jithu Joseph Reviewed-by trailers it would be nice. Reviewed-by: Jamin Lin --- include/hw/i3c/dw-i3c.h | 6 +++--- hw/i3c/dw-i3c.c | 32 ++++++++++++++++---------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/hw/i3c/dw-i3c.h b/include/hw/i3c/dw-i3c.h index d26f60580f02..391470207c43 100644 --- a/include/hw/i3c/dw-i3c.h +++ b/include/hw/i3c/dw-i3c.h @@ -181,9 +181,9 @@ struct DWI3C { =20 struct { uint8_t id; - uint8_t cmd_resp_queue_capacity_bytes; - uint16_t tx_rx_queue_capacity_bytes; - uint8_t ibi_queue_capacity_bytes; + uint8_t cmd_resp_queue_capacity_words; + uint16_t tx_rx_queue_capacity_words; + uint8_t ibi_queue_capacity_words; uint8_t num_addressable_devices; uint16_t dev_addr_table_pointer; uint16_t dev_addr_table_depth; diff --git a/hw/i3c/dw-i3c.c b/hw/i3c/dw-i3c.c index 06c2d55f5958..0d32d9ce78a0 100644 --- a/hw/i3c/dw-i3c.c +++ b/hw/i3c/dw-i3c.c @@ -948,9 +948,9 @@ static void dw_i3c_reset(DeviceState *dev) ARRAY_FIELD_DP32(s->regs, DEV_CHAR_TABLE_POINTER, DEV_CHAR_TABLE_DEPTH, s->cfg.dev_char_table_depth); ARRAY_FIELD_DP32(s->regs, QUEUE_STATUS_LEVEL, CMD_QUEUE_EMPTY_LOC, - s->cfg.cmd_resp_queue_capacity_bytes); + s->cfg.cmd_resp_queue_capacity_words); ARRAY_FIELD_DP32(s->regs, DATA_BUFFER_STATUS_LEVEL, TX_BUF_EMPTY_LOC, - s->cfg.tx_rx_queue_capacity_bytes); + s->cfg.tx_rx_queue_capacity_words); =20 dw_i3c_cmd_queue_reset(s); dw_i3c_resp_queue_reset(s); @@ -1798,9 +1798,9 @@ static void dw_i3c_reset_enter(Object *obj, ResetType= type) ARRAY_FIELD_DP32(s->regs, DEV_CHAR_TABLE_POINTER, DEV_CHAR_TABLE_DEPTH, s->cfg.dev_char_table_depth); ARRAY_FIELD_DP32(s->regs, QUEUE_STATUS_LEVEL, CMD_QUEUE_EMPTY_LOC, - s->cfg.cmd_resp_queue_capacity_bytes); + s->cfg.cmd_resp_queue_capacity_words); ARRAY_FIELD_DP32(s->regs, DATA_BUFFER_STATUS_LEVEL, TX_BUF_EMPTY_LOC, - s->cfg.tx_rx_queue_capacity_bytes); + s->cfg.tx_rx_queue_capacity_words); } =20 static void dw_i3c_realize(DeviceState *dev, Error **errp) @@ -1814,14 +1814,14 @@ static void dw_i3c_realize(DeviceState *dev, Error = **errp) DW_I3C_NR_REGS << 2); sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mr); =20 - fifo32_create(&s->cmd_queue, s->cfg.cmd_resp_queue_capacity_bytes); - fifo32_create(&s->resp_queue, s->cfg.cmd_resp_queue_capacity_bytes); - fifo32_create(&s->tx_queue, s->cfg.tx_rx_queue_capacity_bytes); - fifo32_create(&s->rx_queue, s->cfg.tx_rx_queue_capacity_bytes); - fifo32_create(&s->ibi_queue, s->cfg.ibi_queue_capacity_bytes); + fifo32_create(&s->cmd_queue, s->cfg.cmd_resp_queue_capacity_words); + fifo32_create(&s->resp_queue, s->cfg.cmd_resp_queue_capacity_words); + fifo32_create(&s->tx_queue, s->cfg.tx_rx_queue_capacity_words); + fifo32_create(&s->rx_queue, s->cfg.tx_rx_queue_capacity_words); + fifo32_create(&s->ibi_queue, s->cfg.ibi_queue_capacity_words); /* Arbitrarily large enough to not be an issue. */ fifo8_create(&s->ibi_data.ibi_intermediate_queue, - s->cfg.ibi_queue_capacity_bytes * 8); + s->cfg.ibi_queue_capacity_words * 8); =20 s->bus =3D i3c_init_bus(DEVICE(s), name); I3CBusClass *bc =3D I3C_BUS_GET_CLASS(s->bus); @@ -1832,12 +1832,12 @@ static void dw_i3c_realize(DeviceState *dev, Error = **errp) =20 static const Property dw_i3c_properties[] =3D { DEFINE_PROP_UINT8("device-id", DWI3C, cfg.id, 0), - DEFINE_PROP_UINT8("command-response-queue-capacity-bytes", DWI3C, - cfg.cmd_resp_queue_capacity_bytes, 0x10), - DEFINE_PROP_UINT16("tx-rx-queue-capacity-bytes", DWI3C, - cfg.tx_rx_queue_capacity_bytes, 0x40), - DEFINE_PROP_UINT8("ibi-queue-capacity-bytes", DWI3C, - cfg.ibi_queue_capacity_bytes, 0x10), + DEFINE_PROP_UINT8("command-response-queue-capacity-words", DWI3C, + cfg.cmd_resp_queue_capacity_words, 0x10), + DEFINE_PROP_UINT16("tx-rx-queue-capacity-words", DWI3C, + cfg.tx_rx_queue_capacity_words, 0x40), + DEFINE_PROP_UINT8("ibi-queue-capacity-words", DWI3C, + cfg.ibi_queue_capacity_words, 0x10), DEFINE_PROP_UINT8("num-addressable-devices", DWI3C, cfg.num_addressable_devices, 8), DEFINE_PROP_UINT16("dev-addr-table-pointer", DWI3C, --=20 2.43.0 From nobody Sun Jun 7 22:20:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1780531703; cv=none; d=zohomail.com; s=zohoarc; b=kY3xusNcxnsTqfwrDPkMzbb67pzdAfuEH3cF1NBa6BYRUawPK2khFmnhS1ZVFh5ItwwBfyWBZV2IfM6WQwbzHmchoQ9mSaR80vsPiLEvel2GtfOBZFszVSS2c5xPuijqh4Dl97KlFBWVWKK0WBXOgm5yo/TKlEhtYvNH5o+uxeM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780531703; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ydDfqW3HQgMm0aCoNggM+YWoFrc02YxYTfBAg6WQgd8=; b=DDOBXFRlvaL3tN6muG1im9orrMZNZ3ayNF3Y/2hVZFWVTReb2/ZUlKa7Oa1Et2AoG1qbSuvnaslG4fTzPHSJ7iN9S8R4c3ZYfpHztuvmyLN3XqcMqQMXIylPiPAAeqWqka9sYR1sIqEvv4kmX72YVNO7QmcZXSOI5q1eCgxowFI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780531702920649.4073531822035; Wed, 3 Jun 2026 17:08:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wUvcj-0001ss-86; Wed, 03 Jun 2026 20:07:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUvcf-0001qK-Gu for qemu-devel@nongnu.org; Wed, 03 Jun 2026 20:07:45 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUvcc-0006YY-ET for qemu-devel@nongnu.org; Wed, 03 Jun 2026 20:07:45 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 653GusRw3552126 for ; Thu, 4 Jun 2026 00:07:41 GMT Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ejj9mu89n-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 04 Jun 2026 00:07:40 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-304b8d0ee63so86901eec.0 for ; Wed, 03 Jun 2026 17:07:40 -0700 (PDT) Received: from hu-jithjose-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3074dfa3a2asm5374960eec.31.2026.06.03.17.07.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 17:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=ydDfqW3HQgM m0aCoNggM+YWoFrc02YxYTfBAg6WQgd8=; b=d4KXUSdicZ/SlPvS2joMb3E6W39 +e6rczSV7+Lt/U/Tbn9NTg52tvhTJfU5eJ5/CpDjgK43zgPCti8amFIgXAuuaM8t +69H1bbzBkb8NL9Z/mP0odMFmNQMw/hjmAhrKRZ7PK17wDxHQqYTvOTmLGSwfX8E ffdYcxrnZUlLv3FfXZ3mYjYTlTDfgfeRU1EtXFl9Hhk3B41NmWAMCTIiEmbMpQhg 0+Ct8bPArF4V2nliTeLHj6oSrF/IVnfZIBxJEfiagrhj/RE+Dr6kEyuhp4W800gI Zq6d11AqmSAS5PiT/eH4I7dmwAx/2viqslW1+VWD/WhyiFBH+ACQ2xQzO9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780531660; x=1781136460; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ydDfqW3HQgMm0aCoNggM+YWoFrc02YxYTfBAg6WQgd8=; b=MJffcBvmXKfsrJ3oEpmvbQCaQAZSDIwT5zCh3p9Agggo1Idpnpf+1v5pHtpWrhtOPI Ab/VVRf8zZCSQN51oCsUTiGgjUg1ZKoNlufsZHFm6yfX04Q7kR4sfgf2J7c085w9C7Bn cdUpe12hM4PIkQy4Sv7CzL1YiGmYg6iM87GCLN28ulmUOk3Hy6t/QD+v7/s9tPhpjUA0 brePoNdy8/WbWTi1a4HKTM43WENzZ4iHAJQEzUXfqrR9B117aNEkL441bxzOWtZ/LcZi oZYV16CEKKnSbEJr2FpVWtUhJ6VNibIaqSCYU45AAIvOlpI/WilL+c+GmS5346Qa/YPF EQmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780531660; x=1781136460; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ydDfqW3HQgMm0aCoNggM+YWoFrc02YxYTfBAg6WQgd8=; b=QrL4dLhuAQJh/n1FLd7D5gQfbxKSOV9GCW3/UnQWuJXcbgW3ZuxcDKhn2b0COuduJu a0JW3cH9agjsKmntNQeNR38c+m4vvx4/QSAgPHLh2GWQEFVJ83x8XBMpohf0XHSdHxLt rycahyMUVW3JFV39LdQbG+kBINnGuzsyvWoALjxXpPMzuzsEb+W/NYeqHszuf49xXIfQ YrBozjY81S8N6FvOvOLth8DFaIIr27oV4Nh5ja+gcBOdWokJnj71mtO5jLc4QjrYpBYs CH6MFdM4buWCQ/P83jOoXLAXJgoz6cKb02h2u5gzk3UDnvW/4K6MMeKJ9wWtnhcwLx2I 9fgw== X-Forwarded-Encrypted: i=1; AFNElJ9D4mJpkoBoYmpMbpfoOuRjaqgpDv/fZh33bhRHKIBxjx8EFONCVAUhy5gam41THIyA8PNlRJL1w2kh@nongnu.org X-Gm-Message-State: AOJu0YzLqIK0DBtnWUsuos7+Vo0amDvgQEC6uq3EisY9ucB1q75AIZh8 3+nG/yG4/v/DTW5Xkb+PB4UWG+Iwf5gywlxWE0ezQS9wy/eSX5l96+aDl3ijOCAiVp7NfJqVTwj j/taCsUSP2CCuN+mRLt3lhj4uWHbt9qKCGH038trBnIkoEYgJAb3n6C/obg== X-Gm-Gg: Acq92OEhZAX63c7iN/7LptlHfF6Gp2HA1Z4C6eionNPtPccSYe8mBc3XXsk8AlXsF+R jVqjiESfq5TtvpMqEjeG4u0VW0J3YaRvIRlUoXQdxMonJQVd1iyKm60/z+qCPIrC8MUbN7F+8ZD mQluImgjHyyIxFFfYY8w79oYpxJJhZoEQK00Ll4Vw07y0V3uR3j33cGjf4tfOan6B1AMacbb//n 7Hbv1nX8SInL5y6k1PDGUhsZd/C3SP28mFW2E+0LzVLHhD2gj/DPAzaq6VPZTupfdtIdAoKX3WB ezUmNCjSpCETCE4dBijzUvTyyQrOIhSsolgsVltLtZhoeE6NAZpN8tCD5xkxEP4ZHL1xRnIG+ZG OspHhj13itLXItSP4doiWnRRsJaeWlDLaTyOMx2Cc0yf7uEvmf3j7fkKmvx9eWl5vhd+v8oEbFG yO89ISnAIZF/M= X-Received: by 2002:a05:7300:8182:b0:2ea:cd38:f921 with SMTP id 5a478bee46e88-3074fbc75dbmr2928064eec.26.1780531660077; Wed, 03 Jun 2026 17:07:40 -0700 (PDT) X-Received: by 2002:a05:7300:8182:b0:2ea:cd38:f921 with SMTP id 5a478bee46e88-3074fbc75dbmr2928049eec.26.1780531659547; Wed, 03 Jun 2026 17:07:39 -0700 (PDT) From: Jithu Joseph To: clg@kaod.org, jamin_lin@aspeedtech.com, komlodi@google.com Cc: nabihestefan@google.com, philmd@linaro.org, jithu.joseph@oss.qualcomm.com, qemu-devel@nongnu.org Subject: [PATCH v2 3/3] hw/i3c: keep _bytes aliases for renamed queue-capacity properties Date: Wed, 3 Jun 2026 17:07:34 -0700 Message-ID: <20260604000734.1094382-4-jithu.joseph@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260604000734.1094382-1-jithu.joseph@oss.qualcomm.com> References: <20260529014034.864722-1-jithu.joseph@oss.qualcomm.com> <20260604000734.1094382-1-jithu.joseph@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: YiEfzeZd7B-F-2P-ePl0xY9iwBivCR91 X-Authority-Analysis: v=2.4 cv=XK0AjwhE c=1 sm=1 tr=0 ts=6a20c1cc cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=gueeoCY6Jtxq1gdPNooA:9 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjAzMDIzNSBTYWx0ZWRfXy2rxd8F5YGgF QR3CRQAt4bu5M9dfS92SGIhZR+qqEyQ05o2Fr6mSyV6/gnFlpcGmt53d2prS487zE1Mni0Xpje9 jw96IgWIgez6bOUxF08t5nam10pcX2cKZIL+POvVVVmZQmHQLYaS0EvKeQJFLCl3VI7Pcsogd2D lwdjdLPdroNNMKLuSOlG1biwBJDI8OrdosKonr3QNbkrk9w8pZHCkZ03cQAeH6Sv96wza0G97aL QJDEQXevRnG7H1P4O73VmpZzA12dRYSbwa8KjB0ZYr+29EWjzvsLFzpJnoayN//aCrELf61cKXp k9lXUAdyi3iM4yXj6mL/sOVQKzsWjXqmZpvRYCYJFXAvqQ2+m76C1s9d0/0lIVkVH0xDYM6HssI 89bjlzmPFG8+IVCyMoyJ0F0IRQQxLy4akRbUpiv+6D7xLNOVrkqxPuFCjMkdxRw8lA3sObAapZE nPWnpD/tMNX8vo0xAYw== X-Proofpoint-ORIG-GUID: YiEfzeZd7B-F-2P-ePl0xY9iwBivCR91 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-03_06,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 phishscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606030235 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=jithu.joseph@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1780531704748158500 Content-Type: text/plain; charset="utf-8" The command-response/tx-rx/ibi queue-capacity properties were renamed from "-bytes" to "-words". The "-bytes" names are user-visible and shipped in v11.0.0 (reachable via e.g. -global driver=3Ddw.i3c,property=3Dtx-rx-queue-capacity-bytes,...), so register them as aliases of the new names to keep existing command lines working. object_property_add_alias() forwards both reads and writes to the target property, so the old names behave exactly as before; introspection and qom-get/qom-set continue to work under either name. Signed-off-by: Jithu Joseph Reviewed-by trailers it would be nice. Reviewed-by: Jamin Lin --- hw/i3c/dw-i3c.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/hw/i3c/dw-i3c.c b/hw/i3c/dw-i3c.c index 0d32d9ce78a0..6386499dd9fc 100644 --- a/hw/i3c/dw-i3c.c +++ b/hw/i3c/dw-i3c.c @@ -1830,6 +1830,27 @@ static void dw_i3c_realize(DeviceState *dev, Error *= *errp) bc->ibi_finish =3D dw_i3c_ibi_finish; } =20 +/* + * The *-queue-capacity-bytes properties shipped in v11.0.0 under names th= at + * implied a byte count, but the values are 32-bit word counts (they are p= assed + * straight to fifo32_create()). They were renamed to *-queue-capacity-wo= rds; + * keep the old names working as aliases so existing command lines using e= .g. + * -global driver=3Ddw.i3c,property=3Dtx-rx-queue-capacity-bytes,... don't= break. + */ +static void dw_i3c_init(Object *obj) +{ + static const char *const alias[][2] =3D { + { "command-response-queue-capacity-bytes", + "command-response-queue-capacity-words" }, + { "tx-rx-queue-capacity-bytes", "tx-rx-queue-capacity-words" }, + { "ibi-queue-capacity-bytes", "ibi-queue-capacity-words" }, + }; + + for (int i =3D 0; i < ARRAY_SIZE(alias); i++) { + object_property_add_alias(obj, alias[i][0], obj, alias[i][1]); + } +} + static const Property dw_i3c_properties[] =3D { DEFINE_PROP_UINT8("device-id", DWI3C, cfg.id, 0), DEFINE_PROP_UINT8("command-response-queue-capacity-words", DWI3C, @@ -1868,6 +1889,7 @@ static const TypeInfo dw_i3c_types[] =3D { .name =3D TYPE_DW_I3C, .parent =3D TYPE_SYS_BUS_DEVICE, .instance_size =3D sizeof(DWI3C), + .instance_init =3D dw_i3c_init, .class_init =3D dw_i3c_class_init, }, }; --=20 2.43.0