Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp796598rdb; Thu, 18 Jan 2024 21:47:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqxli/wrW8PnPZycIReZhPhJ0j4OqGuALljbMeuz4lXOi/jh5Ncu1Uz/KD62kyGqn+i6lU X-Received: by 2002:a17:906:b750:b0:a2e:b595:204b with SMTP id fx16-20020a170906b75000b00a2eb595204bmr967088ejb.105.1705643232387; Thu, 18 Jan 2024 21:47:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705643232; cv=pass; d=google.com; s=arc-20160816; b=XLIWNPYERTZR4GFJBbUPlwCRpB2M3f99praLlFkmLyU4wMOjtCWaMCnJKoaMpY9oww jokXcbZ/NQGpp4B4uXOLVhoMVJgrApAbUyi4294wZdLCbAPi+mtZL2pNNAO1QCSAgHV6 Xr6yHZ5ArxY1fB6b0JaeAqzRWeLwbz1JFO97TpQoPT+P83wBmlbtlXWyy4EkuVQRrj1t uDvntD1atzvo3hCLayg30VWRT3YPlA+KcFH/hRHWOzyf2QyLG+aLYRDO/52e9hveZ2cI wqtlezhpU/tGTuVLjrSMtlnPFUKkKutI+n6/h2xR18wSD5vc6Se7Yv5Okzk6YOFO6Y8r sogg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=yJCsCpSNtqeNDUbn+i4OF9Oi9n2a3pnxG2qhsHqqNLk=; fh=Hcn94Wepk4zMpsReV9tKwZNpluK5spaTGRxwO6pmrKc=; b=zohsBQJxmnGESYlq/0FBB/g9dXZLkP5nVfDwdzi20+6tNURBRa5i2TejSMChCSSiOi 9V663bkNr8j31dKNpq6XbcXIMxI1IbJNAUeoPNjfKmwyl91jKWsRYOm8VtXpA+WBTc4V a+vx8dHsaTAGqnTe6VnTYs1B4H5NyziRwPKeoww2pdwaOzkfmkk0RU2J/QDo26d0j55p ek2ZKSAr+BWMLd8wTgorWwUCtAYQxWsCIyujJFSk3qlLjQpKRD+iHZmAG7IB/QpNjp1M xU/goCIPmPiw8/i7yvT6KmfKTV+oMmkB5akzU8c86VyZMQeKa2qlWo/lpI/Vdi8jezIr YkfQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aspeedtech.com dmarc=pass fromdomain=aspeedtech.com); spf=pass (google.com: domain of linux-kernel+bounces-30783-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30783-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=aspeedtech.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q24-20020a1709066ad800b00a26f1e7bd43si2324048ejs.588.2024.01.18.21.47.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 21:47:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30783-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aspeedtech.com dmarc=pass fromdomain=aspeedtech.com); spf=pass (google.com: domain of linux-kernel+bounces-30783-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30783-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=aspeedtech.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2107A1F23984 for ; Fri, 19 Jan 2024 05:47:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1B804A34; Fri, 19 Jan 2024 05:47:03 +0000 (UTC) Received: from TWMBX02.aspeed.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 658854A08 for ; Fri, 19 Jan 2024 05:46:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705643223; cv=none; b=bx0I6I92Hs0fEG2qaRJu/vTFREuiE/bbfxG4RICgrnmuW/yc1k3ZrX7160BRoor+z+WlutNUsL63Ti5zR2f5m622zfG2trGPceXTmClc8GRpNvOSS0mrtsDDh/x6xKXGD2joUH5CBJDSh+lpGNtbxuATGRZCAJqgczrYVDiudUw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705643223; c=relaxed/simple; bh=vlYQVccxYZ0DiUDfVn1GJR1st0mlyzvE2G+s3xMu0II=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=tQmh14g3Y1SZpk/saDiTGW3B+g9ZVpSR+O9DSQ9I8P9+VR+URccTOrlwahdtUOwBmRFGWVR1/G8nwbEpqMUjVY67heP9utvcE/NqubhCx2/88iBL61Woj6wdJ1dRUz09dRPUunUg3UmdjIRl9t2Ce7flTeIW7Uoao/vk1OA9b8Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com Received: from TWMBX02.aspeed.com (192.168.0.24) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 19 Jan 2024 13:45:49 +0800 Received: from localhost.localdomain (192.168.10.10) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 19 Jan 2024 13:45:49 +0800 From: Dylan Hung To: , , , , , , , , , CC: Subject: [PATCH] i3c: dw: Disable IBI IRQ depends on hot-join and SIR enabling Date: Fri, 19 Jan 2024 13:45:47 +0800 Message-ID: <20240119054547.983693-1-dylan_hung@aspeedtech.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Received-SPF: Fail (TWMBX02.aspeed.com: domain of dylan_hung@aspeedtech.com does not designate 192.168.10.10 as permitted sender) receiver=TWMBX02.aspeed.com; client-ip=192.168.10.10; helo=localhost.localdomain; Disable IBI IRQ signal and status only when hot-join and SIR enabling of all target devices attached to the bus are disabled. Fixes: e389b1d72a62 ("i3c: dw: Add support for in-band interrupts") Signed-off-by: Dylan Hung --- drivers/i3c/master/dw-i3c-master.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c index ef5751e91cc9..276153e10f5a 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -1163,8 +1163,10 @@ static void dw_i3c_master_set_sir_enabled(struct dw_i3c_master *master, global = reg == 0xffffffff; reg &= ~BIT(idx); } else { - global = reg == 0; + bool hj_rejected = !!(readl(master->regs + DEVICE_CTRL) & DEV_CTRL_HOT_JOIN_NACK); + reg |= BIT(idx); + global = (reg == 0xffffffff) && hj_rejected; } writel(reg, master->regs + IBI_SIR_REQ_REJECT); -- 2.25.1