From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D4E91D88B4 for ; Mon, 13 Apr 2026 00:50:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776041458; cv=none; b=tYXDr9KtNwgxUXileVn5zFKgiZgRAl1y8mPstRb0BIYAERyEol5hd7EymnwMl61qPLzOZspBfAurlQMoo2vFcD7O8eTa65Qvbs2VR96Ic829hHx0zmGmVSfs0xePrKNSLPUOt8/EE6qFRW0lgPwnIrXfpBVRm40QrQuRswGG2XM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776041458; c=relaxed/simple; bh=drPcmaWllH6PV/IAb2KpautctsOknmfHt9yPVDtT1ew=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=P2nWQEBCHm0qd43rhFRzBDyzWMojfzJXdAhNAsQ8WEPpvZSI542+h6mGfDEO/LPw1xMNnm5JFXiVnGEP1YGJ6hmVu2PEcuOhYZPVRLy3fc/FqKEXHHeE5HH3F34IPERsxIaakcB2Sat7o5DjuP5Wqmxo7suD8PmF7I+91STMCIQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Fg+fvyYX; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Fg+fvyYX" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2b4583f0a1aso3775835ad.3 for ; Sun, 12 Apr 2026 17:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776041457; x=1776646257; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=No22FiMdOj9ydCPrxRJ81A3q//jiid+ZepTRfEn7kyg=; b=Fg+fvyYXh6H6lftl7pf5bcA2VI4KWc1/zacMM9cERvKDTDmEgSpXS9ujBDal1VS8IE 6dNMEnnfAKBNR0BlKo22EET+VxM07CE+3782Dh3r8ivz7FawR/so8lj5v/7TGrpMWOeP uwvqNOo2oueyhYmxqe8DEWyXfN2Z/bErJQ5oy3B8tokgJY+d6IRHU9SzYySNPFXDR5QI sLlgVteA2MWJgiwdP//J8gzvtXNwiKUwAmcNFRP85DvMTgNmt2enf9kgGOMHwSOFi632 Sd2H6P7ArpTV9pPEWVewAFli4MzvtWg67dezOu4SQzJEZcP6wsqm0vUJPrajJ0eMc68S fPHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776041457; x=1776646257; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=No22FiMdOj9ydCPrxRJ81A3q//jiid+ZepTRfEn7kyg=; b=PE5xx/prshg7Ybr+X2gUj3D2iVXzDc6yaxXBNmFOuwIn+ZjPq5sk7eF0itPAjc9f13 IdE4aXSmnNKgTv4/QvrdpvWPNjityn/bsNm2qwLWdlwwl6SapX/w6BhyALVkwaQFoiI/ PSVqprgGtzCNHKcUFTuQJheJEdSGbJOk0CYYfiWlbZ+Fs/z5cHWYqrVfyAw3T9mrRoSt tEqf6hEMiXpgq+3wR9GNWiBedrpPgyHXFRs9epvJREXKAMWlpZjrGjmtVcxVzLVqacuN FmUYX+uBrM9b6/s63Yu1KmuMzxkZ7t7BguZi69JKBWkuPwxER66CfUiZ+Hkyaes1UMGG KTIA== X-Gm-Message-State: AOJu0YxKOpngVTKZO9125bWUbHmGozTyGHVDBNioOCetSqfP9PXA7gdz 5a4PHFG0QY5bIigTea07GItlu/Mbfmp7nY6jvcArawcS6FuXtln2wNynp4kmPg== X-Gm-Gg: AeBDievEaIEuwZ/i6Xv4f+xRkRPwt+s+ctUTWeiEaCsEZGeWNvAVhtKbsbTcPA4HwJP c5Ryua71ETaS0RdtImPu1khrRwHbWlEnX31mmSkfqN3KQrvyKDnCQnLkHI2ggd3knKOcTMuZ/KA TtYOFcm6eCFah0ci/7YSGJoGFU/Pse+0pheqGP+mgqbhz9/AH6Ti9WzLyQVHrW6o8icNHLrYrLY m7fXsuLjqnUZHJ7KqiHB9z2V2EN+/RS6y5f9ABfvjsd9r9AiyeHw6tfidx3mlFHJ3Qy7QQugnlO wMRg/VEUehpGzG+bh8Oh/p8TgMQ8SWjgg/ZlzqkwnoiJnWtgghqy3CLBsodo7a9P6ZzNNjOVt7y /9c+0juYNbjuDCTnUKChFm4/xkmJ2UCDCvjMsbOj5Fj+DVz8LFu5tgZpYo3QghswtbzVx/LaYVr /43HztMUB3oaoA7gdA7ThpwO2dnA0tuB4L X-Received: by 2002:a17:902:8b82:b0:2b2:be01:5532 with SMTP id d9443c01a7336-2b2d5a65539mr77979395ad.35.1776041456593; Sun, 12 Apr 2026 17:50:56 -0700 (PDT) Received: from cs20-buildserver.lan ([2402:7500:400:8d94:2e0:4cff:fe68:863]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b45f6c0219sm10828465ad.10.2026.04.12.17.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Apr 2026 17:50:56 -0700 (PDT) From: Stanley Chu X-Google-Original-From: Stanley Chu To: frank.li@nxp.com, miquel.raynal@bootlin.com, alexandre.belloni@bootlin.com, linux-i3c@lists.infradead.org Cc: linux-kernel@vger.kernel.org, tomer.maimon@nuvoton.com, kwliu@nuvoton.com, yschu@nuvoton.com Subject: [PATCH v1 0/2] i3c: master: svc: Fix false SLVSTART issues on NPCM845 Date: Mon, 13 Apr 2026 08:50:38 +0800 Message-Id: <20260413005040.1211107-1-yschu@nuvoton.com> X-Mailer: git-send-email 2.34.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 From: Stanley Chu The Nuvoton NPCM845 I3C controller has a hardware quirk (SVC_I3C_QUIRK_FALSE_SLVSTART) where a spurious SLVSTART interrupt may be generated. This series addresses two separate issues related to this quirk: 1. A race condition where a real IBI arrives after MSTATUS is latched but before the SLVSTART status is cleared, causing the IRQ handler to return early on a stale snapshot and miss the pending IBI. Fixed by re-reading MSTATUS after clearing the interrupt status. 2. When a target holds SDA low, the controller reports a Master Request (MR). Emitting the required STOP condition in response spuriously sets SLVSTART again, re-entering the MR handler in a loop and causing an IRQ storm. Fixed by explicitly clearing SLVSTART after the STOP in the MR handler. Stanley Chu (2): i3c: master: svc: Fix missed IBI after false SLVSTART on NPCM845 i3c: master: svc: Prevent IRQ storm from false SLVSTART on NPCM845 drivers/i3c/master/svc-i3c-master.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) -- 2.34.1