From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 39B333C2BA2; Sat, 12 Sep 2026 07:07:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789196851; cv=none; b=PV9VtOJinhgxM6m9KPxR2UPyQqKNl3VqmDef0L8b3AiMnNxgo9QxCrmEfvsWIHoSQETm3MpQo3wgqmr1MScut8gIMIFF2VkdtC7pq6ScjL/JZeKj6O5YO2vG0UTvk/v68SvJ3yQDHqZQLZTedMKW3UOjTsJtRBglrc6Q0b8X4Sk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789196851; c=relaxed/simple; bh=4zMrLh3DrSaDMwcMwJ7AFbGyQfY10co6w0ym04n6xXI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=riqEiggDTLy7xAWfFXXEDBLMCZQtr+ZeaLXFPAxYdhUflLZKXN9a5jbRaXG9a3M4TaHDlotoiKl+15BfXyDKQZ7WGyur2vgXdZICg/Tjct5HE/BfrgXxjhKnFVsDkrVcMUJwZUC2GAZx4dkqV6qWdvNXEcmBgK45b9jCYtqzQEk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rS8X1JLZ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rS8X1JLZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3FCD1F00893; Sat, 12 Sep 2026 07:07:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789196846; bh=0XTu9Xgnj1RZEV5dMIETHBA50Cv+69y6TOrGGhHJggY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rS8X1JLZSohwnXQoVSy1lTZ+Bk4n5W57D268Ta3V9hnAlWwAb6QMUdbjoypjJoNji FYPXswaQq1OV5qsoQp31DsAnTu2E3KVcKjWz+PWJBDt12EG1FdBAt0y7mHgnVcXm4m SdPyIlNGIxrk1fsFczasDV9/8nXQ5LlI0YQf1TOU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Adrian Hunter , Frank Li , Mukesh Savaliya , Alexandre Belloni , Sasha Levin Subject: [PATCH 7.2 0009/1815] i3c: master: Do not treat master device as a duplicate target Date: Sat, 12 Sep 2026 08:29:19 +0200 Message-ID: <20260912065649.226499454@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065648.999753832@linuxfoundation.org> References: <20260912065648.999753832@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Adrian Hunter [ Upstream commit 4dc1b3eeba7991905a5b5b8129ebea51be7d87b7 ] i3c_master_search_i3c_dev_duplicate() searches the bus for another I3C device with the same PID as the reference device. The search can match master->this, causing the controller itself to be returned as a duplicate. Since the controller is not a target device, it cannot be a duplicate of one. Exclude master->this from matching so that the function only returns real duplicate target devices. Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure") Cc: stable@vger.kernel.org Signed-off-by: Adrian Hunter Reviewed-by: Frank Li Acked-by: Mukesh Savaliya Link: https://patch.msgid.link/20260807145638.168865-4-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni [ adjusted the duplicate-device comparison to match the older branch’s PID handling without nonzero-PID checks. ] Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/i3c/master.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -2349,7 +2349,8 @@ i3c_master_search_i3c_dev_duplicate(stru struct i3c_dev_desc *i3cdev; i3c_bus_for_each_i3cdev(&master->bus, i3cdev) { - if (i3cdev != refdev && i3cdev->info.pid == refdev->info.pid) + if (i3cdev != refdev && i3cdev->info.pid == refdev->info.pid && + i3cdev != master->this) return i3cdev; }