Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2399124lqp; Sun, 24 Mar 2024 17:50:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUQ/0uzr2V7NQnQuoKipLBLmFot/t9S+9BINAD1Flw81lsX3WB3Gy0hWPBYVWHjenSWvYwojAQXaTUk28HYDiyZf1pY9QnP0x5YRvZIEw== X-Google-Smtp-Source: AGHT+IFiLMaKqJWiayl27efHkPTsFThqUMjoxZZhqk7QzX+qbjWzAMkTDxmoqgcr5EP7zshelxlf X-Received: by 2002:a17:902:ec8f:b0:1e0:73d:9172 with SMTP id x15-20020a170902ec8f00b001e0073d9172mr7094497plg.23.1711327804575; Sun, 24 Mar 2024 17:50:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711327804; cv=pass; d=google.com; s=arc-20160816; b=NH0KL+NqLMtg0j1B/L/I7kdhG1Y+iR8D+OtNT8gl1W5mn+X0LY75jcVRMF+8s2vduM dj601qtaGRh/eZIdkOPRbHXTvmuU6uadrRrdPp6kZJA92FuzYQZTfiXwmDtDH9qs8c5I go0TCiW3EpNjosIwS2azVQ+wY5qjFjFS16VSymZLa/Ct4P007VyiQfmOOJpodf98RHQs mX58YiTcFUHSKG/MmnPK4v1nGsvlIRl8YQ2KCETd663aE3//H0fFxyB8Ni0xXE/AzI0r TGqEhYf9/xWecdvifG3I7vosSK/iBzFnavVngfc0ziTGOgXUYUJewOrb5VziEK8gl98v viuw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mSsWO+wGxMjty5pdbq/EJJNhH+ptnbhKNnesGoswshA=; fh=Wl0bBIgC7BP22spJFJsGyVztBHS1ZU3/YLKI9QPV3+c=; b=P6BB7BOIie3KxbING1CztkwwtJaiDuwz09cY5fqAJ6qodxN00QrpSuPyqal54OKXNI l7fhQDfAtPuxQbTlTUTgdtmDBTkpAQTmzsfobPeUEbpkzXh7X1sCR+VqVPpU4nSTclO5 4HHp0GHeyWs2FPbXPnX0pL4G50SAKGkkrtBN9FZvBQZIXwfWk/Me5hhlpXJneMMLYMz6 KV2aAY0hftEp9uqZPQHQ23w966bJc+E9mWiiBFi0847tpwg0JsNe2O/s6iI6kI27o0Jd mpJruPhtNRFKsHu8/RV0bd+W16Z4DuEhJLTUJfxsMMNokryUhSHmIYfwttTPQsa6fbdw euTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uBpo3bxQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m16-20020a170902db1000b001e0b5d4b968si1989580plx.223.2024.03.24.17.50.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:50:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uBpo3bxQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 05C1E288D62 for ; Mon, 25 Mar 2024 00:42:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7955A1B16B8; Sun, 24 Mar 2024 22:44:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uBpo3bxQ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 972511B0DFF; Sun, 24 Mar 2024 22:44:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320261; cv=none; b=AxNKhB/p7bBPgtp6SfIb7PlYJ1sXxQVTO2mIwvUqQyZGtWWf+NFbNopI6TzKfZxnfCcNEOpXXB7D2qAH+Murhf5zdKEmkNTYeje7zVNqULmiF4UpDbErA8dIMOlOm4pL7tbaRLNr+N9djL33fdnKUjva3nwnIbmVF7JW6h4DKIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320261; c=relaxed/simple; bh=4C25oCwPgly30uqHrAYSqQTvBxyzpXbGxKpIMOxu0jU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hYF9SSi3ZQ4W2jArmh3MtstToRKWFz610EoBvlbMbBNsMa5uztvA08OkxjPPP4p/vSbdhXzWCaZ33lAPMQQeHZrCPmWULcbS0Phv7qMseZMnh5dBpTcz2hxKYycgf5Fq3niO6+Zw0SIOd5dw6bOcUO+L0567zehaI0Pls9qIge4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uBpo3bxQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB16FC433C7; Sun, 24 Mar 2024 22:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320261; bh=4C25oCwPgly30uqHrAYSqQTvBxyzpXbGxKpIMOxu0jU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uBpo3bxQ/7P0omDL7tjRyt39uv4DiNk2LH91j9AqHzBAbBSIqV6nYNRuu1q7bVOEd hJZY5x5Ay302uUKMstW/IL9Iqk8OAkI4+ILwAEzZ95LxaNfiEszWnY6wWMMF9tUIO4 JQ6VZK1HwbjBsRLFznKZM5ASp1xdpiIEHc16VHlp5DuEaK8ksvW63UI73PQv6upmK5 C9nBJGibzUejIGT3avmrGeFWx7QLK46ikzhBQI8Pjf7brbAFKeAwkmOBNA5ZY4KDks F/klgJOd5CSHSSClhquc+s+1Mwz8xFrTunMKErD551YVGaRw2hifcR1azWGdB5jV1T aDP7yul9FDApg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dylan Hung , Alexandre Belloni , Sasha Levin Subject: [PATCH 6.8 569/715] i3c: dw: Disable IBI IRQ depends on hot-join and SIR enabling Date: Sun, 24 Mar 2024 18:32:28 -0400 Message-ID: <20240324223455.1342824-570-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Dylan Hung [ Upstream commit 10201396ef6455a68ac671fa0163205d327ebb70 ] 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 Link: https://lore.kernel.org/r/20240119054547.983693-1-dylan_hung@aspeedtech.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin --- 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 ef5751e91cc9e..276153e10f5a4 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.43.0