From nobody Sun Jun 7 22:19:03 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=1780582983; cv=none; d=zohomail.com; s=zohoarc; b=JHD9T16KgNlDWugINSFsDX3lzUxiX5GiTMuO/u+9GRQojwFXyEsKIPt6vZ7OuIr+7wkKDvejMNTC8CksvPk6UAEZ+VChaoLRGQUZkqcJJNfD+LPsEEOFIZ/I/02DCKqaWpOzaT1vXcOx1LZX98CBQtVoUJounEtITgRjrG7m1ro= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780582983; 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=DGuKlp2kNQGhHzR0xLe/9sYZgagy6Ek1xTF0685bdgg=; b=lbml2BCi36P+vSB7AQ1qoVP40bFYsC8/FnG+Qd3tXqi42ENKaqqGLnIOdm+3DkI2lNoY1Xpuu5lZ74EVfj4Ba4qxAO2339s4xVqy+rgIuQLqmPkIzvZQYCIWkg7zgwM6h6oSFRYwE8iI+MU+TPQt5UjlB3J7FD2LiKIRU5YV1Pg= 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 1780582983309670.9499007691039; Thu, 4 Jun 2026 07:23:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wV8xk-00074g-2A; Thu, 04 Jun 2026 10:22:24 -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 1wV8xd-00073x-VO for qemu-devel@nongnu.org; Thu, 04 Jun 2026 10:22:18 -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 1wV8xa-0005RE-Rw for qemu-devel@nongnu.org; Thu, 04 Jun 2026 10:22:17 -0400 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 654CCVga3221049 for ; Thu, 4 Jun 2026 14:22:12 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 4ek95u8k17-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 04 Jun 2026 14:22:12 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-304d8613efbso701108eec.1 for ; Thu, 04 Jun 2026 07:22:12 -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-3074db528dcsm6179560eec.3.2026.06.04.07.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2026 07:22:10 -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=DGuKlp2kNQG hHzR0xLe/9sYZgagy6Ek1xTF0685bdgg=; b=Rkl4jrNEZCloRsIDcyvCx1IFgiL mftUmNpwVyXMr9pUaAlhwBYdLiVih6stqldvn2A8XBONpUKJ8yBQDIAIrzpAFka8 tjfbcymoaJrQ+Gr7flcR76BbQyNUE/HmfgkS9bOpGHNAjkUuPN3eg3Abc4i4cWuM Cpjb20TMGSMM9gnPOcPD8EM2JeyhEVTfHop/wrbclAF1xO5HI7Ju4FeH7UJ/UjZm fk6JrYHmEzGD+MR2OidFqiEBmuvDLF3OCpbQWSYOlv1Oc0oV+/3f3VshWbtkhCzL CJhjd/wZJq7g9K/vy5pAu7iCqcfz3BMCsyQLvs1cNL0hVW+QFGaC/zma6/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780582932; x=1781187732; 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=DGuKlp2kNQGhHzR0xLe/9sYZgagy6Ek1xTF0685bdgg=; b=JubwT07lLhxz1hjfhpUGgDWfiCwMADPjr5Aq53C5lqILtHsf8n/BN0vX8ltYtATuk9 UpOv2lRrkCmtwf8/o31YJVpuBKJketJs7MNAzOOkIg3WHjF7VbWqA9/jbSwWM1fAQwdW 3A+P+ys7AjXcQrecLof5zk6nkp5gqB1nTrMAaQjTm6j2j7AYhmLyvPk9p2KHuvZuhEVF Tc5yhVGuuv6IHjPp7JjQf2WHvtUpbLeovzLlPM4EIdt0ycxB76zZ2HObMHFHkqSkREwe tZHNWITsdehDHPHBDgUSJAO5HSbV/ATYTExAMoACiWNY6JW0uzpwBQbhMvQPT7lKg3uu 8a7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780582932; x=1781187732; 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=DGuKlp2kNQGhHzR0xLe/9sYZgagy6Ek1xTF0685bdgg=; b=capsp4Kq0prcARz5Eyc7F4at9nDyA5rtglZvUdM9uW05FnjDStxr0+ZjfKWqxhGgiN K70Eo3sqbpZN5HgCSfXLIffqUFdkbItftijal5Pnod04TQfvo0YynxwAgVY2tBMqLKQB vpOODN+tl0XOcRlhC74DFLOKnYMm58stkx9EUBv3VcpNwifNEaGQji/aXr+X/yJHUhKO ss/JiPJU7oAXPDvy3ZTGjlmXyAqddqMFbNr4IkYV4M7fFPqgNF1wGLz6lBH4nfzP8TXu nEDxAHMDU3Gnl08BzjciaxpYUTUBfhdkdo5YQrfJyXFQLGz/9pOrUPxYm9FO0xauMxT5 vmxg== X-Forwarded-Encrypted: i=1; AFNElJ+TS42z7lc32OYP0FN0PeQXx8HrmO0GvwksWNJTYEYbovbmZBZhlwh/jLWHjR4+bqXPeKG1SlGOhrS5@nongnu.org X-Gm-Message-State: AOJu0Yxthvd1xJIZp+OifpVmMdEx8w4NCeGtRYSLknOE7VpLTqPtDOkn lC3YYhjOS12o60W7+T/zTv4GzXfMFOCfsCBqKElo9pbT8Zc30y1++n+oN4JOrjo8H3WxHWSaw5Q Q/C3YV+yO1VMq4CiNyqNbu0jFieSy0oTUirMNrTavFMRduud95OhaqxZRcA== X-Gm-Gg: Acq92OGLK03zhTcbIsX1ObCPhOjo/sGtFcJ3sErzB5gSIaYoBV3+ukDwfR4x5mCpF6I /3B9xx9nJkfl5WZtPxrp1kyS/Swh02CUrg3vN24ac909VF+VcjYTbdgv8IZHrSyFbq2NX5AODtI 7/upJX4vFgTW04mMMiPOQJRw7GegibLxW9A/Be4RLJQsuiuCdea7MzcakiGtCVmINr7tAK7Gjt3 GcYnYEsjHWkUyVdNVdwZ3Gt/5uYHWaznGZVpawAaS//ZTFz+jCBmQo/jWtc8dA2MLAIKqeQNZ3E EZqdEDRc3LbQmszt4Pw/WhNx4Csxkge4il7C5t/JNyYCbaGKvsA+5h1DkkCqQgbmJTysyiZJE0h t9AjcmHUB63fVR8f6XKCItgsFWU90j49Q8xPzf1IvTPwyJoJPcRjADwV/W0DkCpnGB0nofg1nk2 7Zzyet0NtJwF0= X-Received: by 2002:a05:7300:320c:b0:2ed:e14:e956 with SMTP id 5a478bee46e88-3074fc018e6mr4841743eec.32.1780582931891; Thu, 04 Jun 2026 07:22:11 -0700 (PDT) X-Received: by 2002:a05:7300:320c:b0:2ed:e14:e956 with SMTP id 5a478bee46e88-3074fc018e6mr4841720eec.32.1780582931160; Thu, 04 Jun 2026 07:22:11 -0700 (PDT) From: Jithu Joseph To: clg@kaod.org, jamin_lin@aspeedtech.com, komlodi@google.com Cc: nabihestefan@google.com, philmd@mailo.com, jithu.joseph@oss.qualcomm.com, qemu-devel@nongnu.org Subject: [PATCH v3 1/3] hw/i3c: fix CMD/data FIFO depth reset values to match real silicon Date: Thu, 4 Jun 2026 07:22:04 -0700 Message-ID: <20260604142207.2118098-2-jithu.joseph@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260604142207.2118098-1-jithu.joseph@oss.qualcomm.com> References: <20260604142207.2118098-1-jithu.joseph@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=at2CzyZV c=1 sm=1 tr=0 ts=6a218a14 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=Um2Pa8k9VHT-vaBCBUpS:22 a=69wJf7TsAAAA:8 a=EUspDBNiAAAA:8 a=V2NxCb60AAAA:8 a=1Cgkl99JUvOo6gf9qOkA:9 a=PxkB5W3o20Ba91AHUih5:22 a=Fg1AiH1G6rFz08G2ETeA:22 a=3L6qF29SlnrayQqPM2jZ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjA0MDE0MCBTYWx0ZWRfX2eCt1qwuDesZ aI9513uP3QWOP6ULxTz7iwNnBMm7OrlqYLk3NDih0nud8VL8dw7vAFFGxJsjQ9t7FGj2QFAHHG7 2ABfHei1DJgmsamM3X0ZYuEy+AW79eUxtWjQ/DLyGpWTGGSnex7JkkdXe0VdkdUxXjxn6NSlicR s8bSKV50j7XZYMZkfnStlEQRS69V4w/PP8L1Mq5UtZ2VU9DlukwLSe+wcJB2cqYaV02Jf8cIncI a7c2meO7uUrqJgyp4X+ikRzPeO2pIjXRx+cTdi0MRiJL3+Fwwvtnk9YoB8WaX1udwnBL/Tbd7aR SCfKQxAbl5+/5HjL2pzslVWuN5KkuE5lPuatlOPcG2OSsHXq6FkvwXim8GFIMnhmakTX0VC/6Ua SihyF9OfgF1Uhho65BydFuF4/I13zHoh4BhJxaujR7iMHo2hss1oO/FLuxlCkQqFOVxQHyjlE6S GDxM9K0dMti5w7xHSUA== X-Proofpoint-GUID: MuagFOgmQTU_AkfPTDzdTyYRcxNhp7v8 X-Proofpoint-ORIG-GUID: MuagFOgmQTU_AkfPTDzdTyYRcxNhp7v8 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-04_04,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 spamscore=0 clxscore=1015 malwarescore=0 adultscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606040140 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: 1780582985150158500 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: 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:19:03 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=1780582983; cv=none; d=zohomail.com; s=zohoarc; b=CLPYKerQi7KUdHwislHBvaPoQD7visZud/nUkla6Tj5KQvtbvKfU4wPT6A9mT1msedaJ8T48NVu1ePtYMlfkxyoiAuL7vao/zfuJIV2h7Zuuc+ly72l5uqcxWjnia8rdXqw/jqkYaIit0sMqMTRdSw3Pk5CyJgW1VgCnFxI8pCY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780582983; 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=w1SrLefpxXw/Wm8HE57Tu43sQMGDtkCYW8TVg5vJM/Y=; b=XOMtbLDuN19XXIofS/Qkq91ODy6Qz9UN4XTf+KTd2NgLPZXc3wKxJYttLAH8oHu3rqV4i9NCiCPygiCb1c3RK8oXKa/l3UEYlAYbJSn0j6MagSNrt+U3dUCThDseLNJy6tTz5CztkKsS0QdOk1iDP4XZPEb9Hwc6FupoizG5qns= 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 1780582983387144.28604855828905; Thu, 4 Jun 2026 07:23:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wV8xs-00077U-LJ; Thu, 04 Jun 2026 10:22:32 -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 1wV8xd-00073y-Vy for qemu-devel@nongnu.org; Thu, 04 Jun 2026 10:22:18 -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 1wV8xa-0005RM-Ru for qemu-devel@nongnu.org; Thu, 04 Jun 2026 10:22:17 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 654BRQcv994536 for ; Thu, 4 Jun 2026 14:22:13 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 4ek374t0bx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 04 Jun 2026 14:22:13 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-304df51ff3eso585363eec.0 for ; Thu, 04 Jun 2026 07:22:13 -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-3074db528dcsm6179560eec.3.2026.06.04.07.22.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2026 07:22:11 -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=w1SrLefpxXw /Wm8HE57Tu43sQMGDtkCYW8TVg5vJM/Y=; b=VdNQH+8ZdBCbzYivXuNVs/805eC 6OFcxDQTKErNCNbDAiNo97XCaHqGqlbEqxK3qwSPZprDpNP6OdmB1prsD+INFXxp hsMTcjZZcVw3RCuxwgWf73XWvYmUfHuTGyNRxYa8hmQFey4xAHs+wTiXuqrJDA+e tLsJEyH1XfNVOANo3vJ13UQqDIH8UVjK6T7YlueKF7MpDunsLV74P3NbM6O9GeGO yGbGQNJhQne2TPE5fyke51fi4ktZaVszUnrrbcjbFMdlvHPLksQFE0A17a8lAQd4 KLZGGhWPYB9QY7uTyAY2l6sxoUOAhLdXodcqtNZh1v0oECWxwosB/DtERNA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780582932; x=1781187732; 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=w1SrLefpxXw/Wm8HE57Tu43sQMGDtkCYW8TVg5vJM/Y=; b=chHIg+x5IihSCraV17XkgjqVrAGPvNeA6S6jb5yAxnZaeqpNI0beIljBlPB2ftGIKk ePSxJQVCSArv/Ehcz7ZJJhdhqhk0BIpTM21WoPXQqidr7ySQ3Clw6KRs+7pfHD1KBWRr VG2D0i2sFCDr3Yn93YmxCl5ebtwj+tGdzAtCMQ6C136ZA1PbW6uJLOMM5qU9P5Yxlb2A CYP61Vc8qTDevDZnW0SHVFUHW3QM/lZKSJndOeXJF0kq6PSav6GpSbaei9RYn8c05UDs dgS7doBeANZHgOQPxnQY1unXx2cKUHjHC455mQ7ioPWVSwm78gjIx1u4y8FQtyeGQZc7 NvVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780582932; x=1781187732; 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=w1SrLefpxXw/Wm8HE57Tu43sQMGDtkCYW8TVg5vJM/Y=; b=lQAZu9jKKIvrtCWjG1riIEI5Er4MNkLwbdhc80kkIo1ug5nyMmzvaU3YVbUJ41KBQt M8rzLOe7TnFJWyigNrm6m7McU98aaOKcaipn8sjxusqzAMHFWY/CFq65VgBMRbOoiR2t AC3XUWm6ay9P0cYsi3JUHw4EPNTnExpEVumg42uPdpWgXcWrBNLpmh0G0XpGUYH34LsD Ff2cc4v5rOWvwaDOx1wnmZRDRvPImUwoTuD4wOFfkvDWqgbK7pKaqU9kCSE6MdH9tpzM liaIVPL9c9M2rYXSLuA+uxLVyjapItYyuHsDm2lS/t0RLFODWUcgdKqZZlpVH4WuvVnl xHVQ== X-Forwarded-Encrypted: i=1; AFNElJ8WiOmHlNTQhb7o37dsVf1+TznYDz0NOWbLd7HiV/c6Tm1Vq1jdXs/WnKEhIEAEHA6jyM/Cy4JN69FU@nongnu.org X-Gm-Message-State: AOJu0YygMRoI7mkDmjPqUhVytUuuYTmMUktWp89CmqQo1csbB9UADJZ6 JwEXR/3pUufOyDyudLoIVUquZadVKz1bg468KlNQvG9mOIchX4FJI2z+Surbi9exxbHZVQtHf8k Jc4i7edNvGCRkzXNhcQ0LDaJD1c4f9BE3TIQIu6vJmrk/KKvuGFg1UreazA== X-Gm-Gg: Acq92OFRZbEbeGoih/pp+ymme1dODxzBDlr1Geh5V5EBMCn9VOYUpWA4erSLkVaigdt BA/ff65TFMptOpS7jCumehrlbmn7zVJOABS0g+v2axshOFs5HyaSPFSdNGrORCpvpp9og3Qz1sG HIJoaN796sM4hVIusfm9rE+83nMNWxaMMgm3ae6BW/W5SNok02MS3Iml4TVfmD/zK0ThHaDf5K6 mB5wZgDqt/9L8D+I2bf3qreTInOaUixH9OmoPy67AjcZJznB5D8DTowp35AhAQYmxL+bNlZ7nay AZFrGWksjp9vpC4VOFNV3BPzS5OKRbobaCwdaK/bE6YGODFgdtJokCMhH6cz1I3Xc5KfhzCrJrx cFknUZLEaY2Rfw8pWhNIuxW2IxKEDf56SYnq7QMfgLBjLXgmi0ycK+OtJBPPlVCr9t3hUFE7fZU NMGqh/9HjzHts= X-Received: by 2002:a05:7300:dc03:b0:2ea:b85c:153d with SMTP id 5a478bee46e88-3074fbc7c7fmr3839131eec.27.1780582932433; Thu, 04 Jun 2026 07:22:12 -0700 (PDT) X-Received: by 2002:a05:7300:dc03:b0:2ea:b85c:153d with SMTP id 5a478bee46e88-3074fbc7c7fmr3839116eec.27.1780582931918; Thu, 04 Jun 2026 07:22:11 -0700 (PDT) From: Jithu Joseph To: clg@kaod.org, jamin_lin@aspeedtech.com, komlodi@google.com Cc: nabihestefan@google.com, philmd@mailo.com, jithu.joseph@oss.qualcomm.com, qemu-devel@nongnu.org Subject: [PATCH v3 2/3] hw/i3c: rename DW-I3C queue capacity fields from _bytes to _words Date: Thu, 4 Jun 2026 07:22:05 -0700 Message-ID: <20260604142207.2118098-3-jithu.joseph@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260604142207.2118098-1-jithu.joseph@oss.qualcomm.com> References: <20260604142207.2118098-1-jithu.joseph@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjA0MDE0MCBTYWx0ZWRfXx7wbeTbya/7N NbVDHeOpyG+saLGNprYc0wsLVvL0k+/mMLITzpNf8cKmTC9xBDm/F6xJ3G1PCLV8ibQzDCI1Xz4 lkqIznEFxqDDA+3KelrjZVNmwzidtz3IY1KWIt6e/Zu0x7DQPW+LFOL0itNX6hY/DPOYeDLkIS4 uhohrjIrKsH2sYtrLngH0pGAlqAhj2tdf8wYo+VPG3vfMta+1149K15ra+HtUDy74jSfp7CGPn5 ijsqUJGtnfNJK3ww01Cx0ufmJzuyvSTYssu5Hjqt/B6zzziX5AlNoBq6Od4aCdcxGhQga82Gg15 KHO8QbNDbaC1JwwOViHB1OTizqRtFWdHd9kn7LPco8csVNTrvYMiisDAiUTvj0UvR2LfguX6fXs eWq8JIdQWeidkz4hoq13/a6O174NIIivv/CSUYaCRYP70C2O+Gi2SrZH3ocuv0dhNeAVQ3BCd8X L/H2ELQGmKLAExMLX4g== X-Proofpoint-GUID: 8NvkdZu9psh37j7PicUPoTQK9OH2L88Y X-Proofpoint-ORIG-GUID: 8NvkdZu9psh37j7PicUPoTQK9OH2L88Y X-Authority-Analysis: v=2.4 cv=eJsjSnp1 c=1 sm=1 tr=0 ts=6a218a15 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=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=V2NxCb60AAAA:8 a=Au2XYW2znXaePupJvy4A:9 a=scEy_gLbYbu1JhEsrz4S:22 a=3L6qF29SlnrayQqPM2jZ:22 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-04_04,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 phishscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606040140 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: 1780582985155158500 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: 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:19:03 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=1780582983; cv=none; d=zohomail.com; s=zohoarc; b=OOAafdDq7VzbPt5cRD2gWDrgxE5/bXhTCryb74LluX7mlOiu+0WZ2MBQ5+MU0ZkcXZ7ng3UEphjKwxeLo9H77IXKJ1u+jqwgqU2o0IaJXRSjkXKXkVkA08Vxtb+tRXhsb2YzViFLBTdbsqnDXbAdOOyMUmz+kGYsH0OGvDurlrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780582983; 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=LdDLyB+vHFvxt62M17Q3Ldx+UeIjawb95Nhxjty98s0=; b=ALy1fH89trfsQftLgRGGVmedpRL8nspMfimMauY9LeE1vj49YkN9wVAPLhktg0yWNqLkf7lrHymH7/ozH0z5qdwq8qUiDNaYnsLJi4pyH/hP2FcYYrRMAtysxtrVS09NrO9Dz0WynBy97tILwMJd3v2gCHUp1CvpX1M/SbPSxGE= 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 1780582983309306.04756439078994; Thu, 4 Jun 2026 07:23:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wV8xo-000762-D9; Thu, 04 Jun 2026 10:22:29 -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 1wV8xe-00074H-Fx for qemu-devel@nongnu.org; Thu, 04 Jun 2026 10:22:18 -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 1wV8xc-0005Ri-IA for qemu-devel@nongnu.org; Thu, 04 Jun 2026 10:22:18 -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 6548c7XT598270 for ; Thu, 4 Jun 2026 14:22:14 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 4ejy8m2t6b-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 04 Jun 2026 14:22:14 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-304ea42b025so341137eec.0 for ; Thu, 04 Jun 2026 07:22:14 -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-3074db528dcsm6179560eec.3.2026.06.04.07.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2026 07:22:12 -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=LdDLyB+vHFv xt62M17Q3Ldx+UeIjawb95Nhxjty98s0=; b=Gxq9k3QKHx/b+9Xzko4aYWygRuo OHbCK9h3MxtrP/ui0vLfdCJDZvkwL4X3+WveExnatDjsJtdlQstbvQpdwF9t7PKT dYjKPze3w3zufQQH4EIiGrSQYag+x4SGk1sofYqbhW33P/WK4vAkzotMYlWF/QId AWvZaexYJvmkFSB0ump60EnOPuqZEU3aB4/nsrkwtFmXAp0//7sLBt1TNBe5wivG deB66DjrXtrueU1dq9DixFfNLmKES6w+RrcQOrn9uOGujWXxhQWklpD1IlhjHxtq 21vnoqobnLX4ElT7bngfuMS/28DBmc3HDTMk9XI7IWSaJUoFrSoBlkhkkqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780582934; x=1781187734; 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=LdDLyB+vHFvxt62M17Q3Ldx+UeIjawb95Nhxjty98s0=; b=hKlMWKlQhh2sJLvuPasNIzDKVZ5x4OwVZB/QwrkrOgQAiOiL2E04CTcDPmHLfNQm0s WQyiwSzGjotRXHT/AYD2ZvyKAX5Sjlj69u3qkOzr0GQqVfjQGx+pQqaz8NLVHnkGtsb4 7va0X7cW4bLieGNvGRv+6PSnyorZ0Py2cs2lhwxAPAzLWM/mwRfZWplcF+6gylZotXRO U57Bhis0E4GszfI1EJZoQ8+nWUjfsNrpOg1OxVlFsHE7XmWHiyUfb0YuPZTf0OyHVHOY 9Sa9gBbmkHYodA/7gdew5mAtftUdSTor6uHsQOyW+qeDPyh75rXJPnNrF8R4DAU3tm70 J6CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780582934; x=1781187734; 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=LdDLyB+vHFvxt62M17Q3Ldx+UeIjawb95Nhxjty98s0=; b=n8VcYA801TT8q7O9ltlSCbPdEaVCUVwU3npKjCbFvxcaFGw4B6+7yJJb7LviC1+BIJ +CAPWWozKKzKrY+qDq7kM5J3VTKoa6JIHiWH1HczcAPUgINEvKTCvT7dK5cMrgTfPXRg SV+xz/nXIf4+RIhblg6GL7n8l8/K+gYo8mv+jvOXIx9cFj4Tuq9AoD6VH7iHs2MXRxs3 iSQtI/w7OmlJKf77eGQCbA5x9+Iwixr4FumlMnevrc0S4yvQpqw+brOyRlEUt1QznsVd dSFwxmt3WXWY++wZONqqZFi/Chil0bsU9sCoS+k3oDMnERwP5mW4nTKWgzjLxxsI3MMt yQYw== X-Forwarded-Encrypted: i=1; AFNElJ9SbVbuQTbsmB09gE12PLB/UINViNxHq7QzQ6ccHkUg8VUN7mXpp+mXe1qZh7pf+6HaVG8CZGmJfBnx@nongnu.org X-Gm-Message-State: AOJu0YzSHAsumdI9hwbUTZn70EnsXFau2h8fPgrtZw9jkaYJUE3QSbGk KFqxPKAhQIs/BYFBnkF3Pce8piYIzHoehrmEzAqJNmNZfrdw7JtwmXPTOB+S3+Vltj1cKELEKeP jKAsnx6E0ItABwqPqxhYqBsTq9zdaPq5w4mnei+MpAkLua2kr5nigGVSzvw== X-Gm-Gg: Acq92OFILoxFMRnQNa76UNlMalj3h13X22zifQARtszmQkFQDWdCliCubxOEKttD53s 6UNTKXpZJ6f8Xveebb8VmzzgwiDH07qZvYPeUe3mZh5Nml9GCjMLi8gNXtfW7/UTsynJzVJ4fRn vtvRf/XbF6Q8ZWLZ1d3OQPNBDCmbZZOILeWyAUPfhVcnOMQ7hj/ieKwitYcmM3ESB0j8tM4pPP7 BT9GFbGv2bNfgJ7pUE5IECp658sJWYa3r3IU004mx+tttEbKQ2iTfaQkXH6fJ2exKS7DISoSOId wZDLYcISlGBz67+rL/R5I7MmrHCNrWy0XYIQXkEgSG9mijbrIvW3FykyumCl/qaRX90Rnb/jQxT 2TuZMUvJJgr75OwsrUuGC+k+5YCtZMuqnSytqjAftRVwPh9w2pjE5sGNNPHKENR1Vnei7VAlxhc uXJ2yPP7PulOA= X-Received: by 2002:a05:7300:724b:b0:304:ad0:e91 with SMTP id 5a478bee46e88-30761eaa50emr2012142eec.4.1780582933788; Thu, 04 Jun 2026 07:22:13 -0700 (PDT) X-Received: by 2002:a05:7300:724b:b0:304:ad0:e91 with SMTP id 5a478bee46e88-30761eaa50emr2012114eec.4.1780582933060; Thu, 04 Jun 2026 07:22:13 -0700 (PDT) From: Jithu Joseph To: clg@kaod.org, jamin_lin@aspeedtech.com, komlodi@google.com Cc: nabihestefan@google.com, philmd@mailo.com, jithu.joseph@oss.qualcomm.com, qemu-devel@nongnu.org Subject: [PATCH v3 3/3] hw/i3c: keep _bytes aliases for renamed queue-capacity properties Date: Thu, 4 Jun 2026 07:22:06 -0700 Message-ID: <20260604142207.2118098-4-jithu.joseph@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260604142207.2118098-1-jithu.joseph@oss.qualcomm.com> References: <20260604142207.2118098-1-jithu.joseph@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=KfDidwYD c=1 sm=1 tr=0 ts=6a218a16 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=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=V2NxCb60AAAA:8 a=gueeoCY6Jtxq1gdPNooA:9 a=bBxd6f-gb0O0v-kibOvt:22 a=3L6qF29SlnrayQqPM2jZ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjA0MDE0MCBTYWx0ZWRfXz0XFl57ZuikA TDJ0BQovQEwme0zA6SSjEVqqBVq1SgKmV5p16hS8ZZEICDcbxwR3P0nGvGSWmqMtCEYIgDFJej+ 42q+O+d/X9KEW4TKlNrZbBBC1b2GloSSEORQVa2DEQfo/KxnMTC7t9hymPC33exv6gyl2cSGQNg Bph4zWXXJi74h/P0Qyd/SKGQ7oG97ejY+NRyOCckRrkxtXvURkmQ0jxtOfJCjbCuiALx0z76CXr H0L2Tngoc9cAKIQ0ZelERGo84KKX31IUFSfH650SWNMkBv2fmGYrDJ9fit/OsffJM/i0KSlYJhV AY6VbU1NNu2jLS5JRfDxL58jBFW5zIGYNGcwG9Bvrpu+w8OqMqx+oXJ366dx5vxztH8j2Bj2Yl4 3hnBvgfZSIGptgUnrnpaBuzDX//yWOrmm+RY3feBufxBojnlQclyfsFUZ9j4h8a5fl1M/yDCv8K YqiezAN/ZtklTAWWxlw== X-Proofpoint-GUID: 6miUBAXQtZWuNjkTvofycbsx7LPd72u0 X-Proofpoint-ORIG-GUID: 6miUBAXQtZWuNjkTvofycbsx7LPd72u0 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-04_04,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 priorityscore=1501 suspectscore=0 spamscore=0 phishscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606040140 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: 1780582985274158501 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: 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