From patchwork Tue Dec 10 10:14:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 11281797 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 042D513B6 for ; Tue, 10 Dec 2019 10:15:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D54252053B for ; Tue, 10 Dec 2019 10:15:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xabr4kNn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="sGXhH7/L"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="VxLIdOTV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D54252053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sNOf+rDzlX2Rk4TTfs9APwfs8M/96/EYN3Q8JJ7KFa0=; b=Xabr4kNnSWp4Kn DWZ9s8KmmhWKT5YVneZOksEepnaQb6yV4rUhlziEdJi3ILh4QfPfVCL6kFbSCdMbvSsDeBo2o+DWv Jdv6y4v5f2rVB/ZjazzIAWZga6oEdGSGAQYb/ndlkioWVxPaZA3FFebu/SHxG7f/qAOVzX8nLEeO5 j1QrEbHtsf6TJS0F0fDD0uWUuSrUGzgYwiYqzSmhkHMVC8WLUbVQhF9WkT083bYqPuIfILntKdw/9 DIJKaDg/Ip8RNkdp5pO2THg3N0s5oIxMOLv182+b8ZDAmDvx/MWZGOPRttuvHZrg/MpCargEqZPtL 9LDKx3lnDWLjueYAvWxA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYP-00082t-In; Tue, 10 Dec 2019 10:15:41 +0000 Received: from mx0a-0014ca01.pphosted.com ([208.84.65.235]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYM-00081x-8O for linux-i3c@lists.infradead.org; Tue, 10 Dec 2019 10:15:39 +0000 Received: from pps.filterd (m0042385.ppops.net [127.0.0.1]) by mx0a-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBAADLOY025730; Tue, 10 Dec 2019 02:15:35 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=hiRhBKQUbf+Gwxh5i0A9uYD615q9LAgbZGEwmtMTSJo=; b=sGXhH7/Lb4KMmd+gSQtdSO18KNRCiR/iiae49kxpiqjddqX+IOPtsjjrCihbs+U0CWqb GxTatQ86U5kNfvq+WuhDuV/vuwRzGOWn1hcM+lPWllURhdQGoMcmYeT7Oq0jCoLJM1MI 4ifd/vxQQI2voV4haU7jDTsvJTXHH7F3cDd+DMd2wE5Sd864JkGm2hXD2j4rlBMh5aOj 9jU12k8/3b59BkhFzuZooozazMctcnaNT11Tm45ZOql0F8W6LREIeZx2/t6tP7OOngzb egCfV6tE49QStkEj7MXS+R3VABZP+ajOe0aneGfcXFg1tBQrzyc9W+2BI+fKb3NRjzLB gw== Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2049.outbound.protection.outlook.com [104.47.66.49]) by mx0a-0014ca01.pphosted.com with ESMTP id 2wra709bmn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Dec 2019 02:15:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gZJk05LDOQILTBYZGsi8f+F6InSXIy1rVU8j8BtaTljnWHlvo+x8aMwQAYOhpG5qCVdMoWoX4Owmad1UR1UgZkouLuESUDTacdkuMBL+iNRQjzyoEOeFRgFwOi/jG8bPhKDczXRNlH4rzBc8vZu9nzQ7Y0kX/+2UsGbSHoyfoUUj/XXlp1B5TKiOqZwlZ6p82bU7Vk7Ur0BY/nCerh7R1TbGxJLbiIGDfkWaIFmYtaFcWXALX+d/me3fkYqfzPC7WCDX8AZrvSFUag3YrE7pOqFIDGIa1AGWI+xnqhbXNZxnUsA+4aJPxZsv4V9zzS7Dhk/H3L11DVG1KAVCHGQeCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hiRhBKQUbf+Gwxh5i0A9uYD615q9LAgbZGEwmtMTSJo=; b=CDb4Afj5CPgC8qzWe892pRUEaw2hhyhMrnbGijkJKBBsumQnaW0XiUiMMhvxRUqle2oOYucY5xXu6EFRIGsfvBKUbuBeJzSJKuPFpxAPlAG16V2oWo0MJYTUt2psR3/q33aBnrTHlQAbkWFUGyCFdRApfalSG1kgaCK95jdUj5NRKPR8+XTJKiDzUcGBxef4XsUC+8ziQkmM/YIe0FLWA2ALZrsgQw6HewzWB46inzkAaF7sz6a0ue1KZjyLeVKxtr0k3BQcOg3hEE0J5vhevLf9dv0sTAlFd3C4XNYW9TC/74vCwvUZpzE9YSo2eRo4gBmS9upPq2MRtUNZReWqTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 158.140.1.28) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hiRhBKQUbf+Gwxh5i0A9uYD615q9LAgbZGEwmtMTSJo=; b=VxLIdOTVbOmaocyagjHba2pM7a4MtWg5QAq840g9zQPEMs8WTY1BQf9R1YBRZE87mbbyfmxOypRIZQq5+kZITw6HlJ3zgK2lgiEYNIdgo/vjk7LW+ywd98Ey6ZSvDUUzDnEJuI+tUIu0GnKsBWtGjluMVOhXFHEt9vzjw3IRBlg= Received: from MN2PR07CA0002.namprd07.prod.outlook.com (2603:10b6:208:1a0::12) by SN2PR07MB2686.namprd07.prod.outlook.com (2603:10b6:804:a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.17; Tue, 10 Dec 2019 10:15:33 +0000 Received: from DM6NAM12FT031.eop-nam12.prod.protection.outlook.com (2a01:111:f400:fe59::208) by MN2PR07CA0002.outlook.office365.com (2603:10b6:208:1a0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.13 via Frontend Transport; Tue, 10 Dec 2019 10:15:33 +0000 Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 158.140.1.28 as permitted sender) receiver=protection.outlook.com; client-ip=158.140.1.28; helo=sjmaillnx2.cadence.com; Received: from sjmaillnx2.cadence.com (158.140.1.28) by DM6NAM12FT031.mail.protection.outlook.com (10.13.179.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 10 Dec 2019 10:15:32 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx2.cadence.com (8.14.4/8.14.4) with ESMTP id xBAAFTmU004194 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Tue, 10 Dec 2019 02:15:31 -0800 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 10 Dec 2019 11:15:29 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 10 Dec 2019 11:15:29 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id xBAAFTtc009284; Tue, 10 Dec 2019 11:15:29 +0100 Received: (from pgaj@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id xBAAFSgx009251; Tue, 10 Dec 2019 11:15:28 +0100 From: =?utf-8?q?Przemys=C5=82aw_Gaj?= To: Subject: [PATCH v4 1/6] i3c: master: make sure ->boardinfo is initialized in add_i3c_dev_locked() Date: Tue, 10 Dec 2019 11:14:57 +0100 Message-ID: <20191210101502.8401-2-pgaj@cadence.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20191210101502.8401-1-pgaj@cadence.com> References: <20191210101502.8401-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:158.140.1.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(376002)(39860400002)(346002)(189003)(199004)(36092001)(246002)(4326008)(2616005)(42186006)(107886003)(8936002)(26826003)(6916009)(478600001)(86362001)(316002)(36756003)(26005)(54906003)(76130400001)(186003)(1076003)(6666004)(336012)(426003)(356004)(5660300002)(70206006)(70586007)(2906002)(8676002)(7636002)(70780200001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2686; H:sjmaillnx2.cadence.com; FPR:; SPF:Pass; LANG:en; PTR:corp.cadence.com; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 548aa5de-52ef-4f81-01bd-08d77d59e423 X-MS-TrafficTypeDiagnostic: SN2PR07MB2686: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2089; X-Forefront-PRVS: 02475B2A01 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p+PgVZDGQe5FMjFpxzIum+dJqntE9Qbt5TLSuh0kqDeucgelNW24LqlcmHplcqkl3nBguVzWImuSHP4NtPwHI5/jC+JqZ+soqpVNC8WkuLadQ0gYoNDMfVp686yAVIa9wppMVB1vX+l0X8j3Vo/Ulm01Nym+SdB6tZCMbItOV5ByxVnzZcqSKVkdt8EUuQpRQ46QbgBsLxlfmMWH+whckQnVKnG+IY1DEAT/DazNc0rjSVNhtUR+Ae9Seuk2Tnx0iRfmR6APciwoeSCabshAX1Nc68rXkVnRBTFkLAxn/yiiGWdgQCCvcejEtQyRwo3clnD0SyiA7AHI3SgZG4/Bs+2JctWh3oVAUKyK/9BrUDX4TagEFb83qrXyCuUX1YPiKzcTXXsV/Qv9dUz8UA0FwZC5gOy6sp2QbC46H+yiBonCsApccFbHWv1VpeOqo/i/tT7+9Ao6A9jIlhygwgOxVLl4G2UzGEjkxJuSWY/zvv0p75N2xz1tMGzsDj+k7W51faDzgMdRe4u+pIPXj1/eSA== X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2019 10:15:32.8214 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 548aa5de-52ef-4f81-01bd-08d77d59e423 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.28]; Helo=[sjmaillnx2.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2686 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-10_01:2019-12-10,2019-12-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 mlxlogscore=999 suspectscore=1 malwarescore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 adultscore=0 clxscore=1011 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912100090 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191210_021538_301620_30D792AF X-CRM114-Status: GOOD ( 12.26 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [208.84.65.235 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, Przemyslaw Gaj , rafalc@cadence.com, stable@vger.kernel.org, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org From: Vitor Soares The newdev->boardinfo assignment was missing in i3c_master_add_i3c_dev_locked() and hence the ->of_node info isn't propagated to i3c_dev_desc. Fix this by trying to initialize device i3c_dev_boardinfo if available. Cc: Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure") Signed-off-by: Vitor Soares Signed-off-by: Przemyslaw Gaj --- Change in v4: - Remove addrstatus check, this will be sent as a separate patch Change in v3: - None Changes in v2: - Change commit message - Change i3c_master_search_i3c_boardinfo(newdev) to i3c_master_init_i3c_dev_boardinfo(newdev) - Add fixes, stable tags --- drivers/i3c/master.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) mode change 100644 => 100755 drivers/i3c/master.c diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 043691656245..5c06c41e6660 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -1774,6 +1774,22 @@ i3c_master_search_i3c_dev_duplicate(struct i3c_dev_desc *refdev) return NULL; } +static void i3c_master_init_i3c_dev_boardinfo(struct i3c_dev_desc *dev) +{ + struct i3c_master_controller *master = i3c_dev_get_master(dev); + struct i3c_dev_boardinfo *boardinfo; + + if (dev->boardinfo) + return; + + list_for_each_entry(boardinfo, &master->boardinfo.i3c, node) { + if (dev->info.pid == boardinfo->pid) { + dev->boardinfo = boardinfo; + return; + } + } +} + /** * i3c_master_add_i3c_dev_locked() - add an I3C slave to the bus * @master: master used to send frames on the bus @@ -1854,6 +1870,8 @@ int i3c_master_add_i3c_dev_locked(struct i3c_master_controller *master, if (ret) goto err_detach_dev; + i3c_master_init_i3c_dev_boardinfo(newdev); + /* * Depending on our previous state, the expected dynamic address might * differ: From patchwork Tue Dec 10 10:14:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 11281799 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 43D751593 for ; Tue, 10 Dec 2019 10:15:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 20E112053B for ; Tue, 10 Dec 2019 10:15:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="eDaccU2w"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="EVMgHzjx"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="zsqk4GQY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20E112053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hDHzhw+6lfRrsAxT5HOFU8pVfhwl1ImMplHuGsaeaok=; b=eDaccU2w/jT5BO y1XclRtzcsDaLYn0jMAVP3nxtl0SpXypZCKyGUxQZbr8QADOmicw55SpYQT4R6rzitWuKmyaIYjqq 7t3iqauPb57zdBaC1ieErU0oEMYeqAPz9aazgtC1JtUo9DsIhmEnJ4EIOaN0NRQl3W1Mx+08CtM9+ re6bLg4xIzdSParM/3AsrniffrLMDeu/vCv1x6Dobra8IR6FGEBFiTqjrlcabU3Li9bSOEn3QqZxp 3Sm88Ps/pZMXf5z2XxmbzNLi0uTh4bTYYjt0IOogLgPU4v+1VoFyHjnjR87a4Ycb13BLteYuQbbBg KVBdJZY/420J/h0Mx52w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYP-000831-Lx; Tue, 10 Dec 2019 10:15:41 +0000 Received: from mx0a-0014ca01.pphosted.com ([208.84.65.235]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYN-00082M-JW for linux-i3c@lists.infradead.org; Tue, 10 Dec 2019 10:15:40 +0000 Received: from pps.filterd (m0042385.ppops.net [127.0.0.1]) by mx0a-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBAADLgG025727; Tue, 10 Dec 2019 02:15:38 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=proofpoint; bh=c7RMa7OTRfnwkv1Kq4aBBWGsYuTxR3F4IpkzLuoeJcg=; b=EVMgHzjx1Pb4PhFUFwhrlpn1j9N+WY/piJpvARQG1xDmuS/4NtPQhMmu2ISP2n57Yi4W 6fCUYJo9xDvkuJoC9Hbd3hf/dCeacqxJzi79lUGkdslCbOOgZgUHuN/ru9rIlIb+OLe9 uFJ0cZWxKkWCitrx/LiljRN9xnxYpQji5qK/EJbQVE+9em1Pep9aP02BxYRsnKh/PyB2 4yWmO+WRE9q0ZVdY4OMnGr5DgmpYJ7jG+JirTs1OO/+/GdpXDhBjm8xXEtr1ebf7vmKY WTCNZ+8ZUPbyXmtJOF0lz6Y6kdsyA4CwoNsO8I2C7OLu4CnFkUGF8hwcyQVp8rz0ZnSH ow== Received: from nam04-bn3-obe.outbound.protection.outlook.com (mail-bn3nam04lp2056.outbound.protection.outlook.com [104.47.46.56]) by mx0a-0014ca01.pphosted.com with ESMTP id 2wra709bmq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Dec 2019 02:15:38 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k71BPrVdnAP3FW5/Y2MHiRiku2Xj/UQrLd307Y1H6O6u0eR6sFKAL7WxvjP72xpdfIunq26slxmOJhGEBVfI1rWsjNUIC0/SDV1aLHKVee3kEqyaHB9n1IZFn+VK8ELHAuAZ9iqR1bNJLUcjMCYOX7euE8wy/bua5QWyt3SHi9ZV/NbfMwmcB3xX7WkO90CqJ3H/T9TXtcE13sEPBdzjjo0PsKnq1hPiW5rgDV1hEMlqVqqmBwQPbGcN2/NeBukTbb4BFwZDdMojV0naVzCLFEPnn3aj7EdId90Ds0n3KKginZlGtQ0PZKAIVLKRjXHO75K4tb+dzAExPEk04sLVhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c7RMa7OTRfnwkv1Kq4aBBWGsYuTxR3F4IpkzLuoeJcg=; b=fbR5xD8261YTbZnsE8e4eZbnSVZ7irPqbcrc4JAeiqPK84uFEn0p7+zmtN2XMIKfitFItlqA/CGQAh53kvGcz7T9fVXe4vnPB1squEGatX8NpBGuVz4YkWKESGDn8fAq9kkS03D92vcSsfQWPCftJ4Dusz8UgOBZ5YntG56TnDEoxcMBtn3eSeeNt+O9ueNRtjxr2if3i+/N49D5t7DPbV1fKITgluIvuM99CFBZT4MGP3vemYNgM0rvq5JkMbYM5QWSeTNC2O+56vaXYKDRrPki8pNXUiiAYwSgTv+zROCmEHrBQH8HOLoohhS9vTtZlWJfeP3HwEsgrHI3IKoo8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 158.140.1.28) smtp.rcpttodomain=kernel.org smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c7RMa7OTRfnwkv1Kq4aBBWGsYuTxR3F4IpkzLuoeJcg=; b=zsqk4GQYweYleNJ3TnjNRH8qjP5KapGNGJAukUpA0mmfNJtdxAltJtGTP3dtkQEb4lmyUh1zCHAjkhMIY+UXo09PzdUlTGTeYwJOV7GohsDSqfaAJJiaonTS+yqyoq3WCyxg892RK3RsSFFa7R53SpcJL+0zPQya0OHmMzhbrxI= Received: from DM5PR07CA0074.namprd07.prod.outlook.com (2603:10b6:4:ad::39) by DM6PR07MB6908.namprd07.prod.outlook.com (2603:10b6:5:1e2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.17; Tue, 10 Dec 2019 10:15:33 +0000 Received: from MW2NAM12FT010.eop-nam12.prod.protection.outlook.com (2a01:111:f400:fe5a::209) by DM5PR07CA0074.outlook.office365.com (2603:10b6:4:ad::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.14 via Frontend Transport; Tue, 10 Dec 2019 10:15:33 +0000 Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 158.140.1.28 as permitted sender) receiver=protection.outlook.com; client-ip=158.140.1.28; helo=sjmaillnx2.cadence.com; Received: from sjmaillnx2.cadence.com (158.140.1.28) by MW2NAM12FT010.mail.protection.outlook.com (10.13.180.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 10 Dec 2019 10:15:32 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx2.cadence.com (8.14.4/8.14.4) with ESMTP id xBAAFTmV004194 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Tue, 10 Dec 2019 02:15:31 -0800 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 10 Dec 2019 11:15:31 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 10 Dec 2019 11:15:31 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id xBAAFVdC009294; Tue, 10 Dec 2019 11:15:31 +0100 Received: (from pgaj@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id xBAAFUXR009291; Tue, 10 Dec 2019 11:15:30 +0100 From: =?utf-8?q?Przemys=C5=82aw_Gaj?= To: Subject: [PATCH v4 2/6] i3c: master: pre-reserve boardinfo->init_dyn_addr when available Date: Tue, 10 Dec 2019 11:14:58 +0100 Message-ID: <20191210101502.8401-3-pgaj@cadence.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20191210101502.8401-1-pgaj@cadence.com> References: <20191210101502.8401-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:158.140.1.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(39860400002)(136003)(346002)(199004)(189003)(36092001)(2906002)(70586007)(76130400001)(478600001)(107886003)(5820100001)(246002)(2870700001)(4326008)(8936002)(26826003)(7636002)(8676002)(42186006)(6916009)(186003)(316002)(5660300002)(26005)(66574012)(70206006)(86362001)(336012)(426003)(1076003)(36756003)(6666004)(356004)(54906003)(2616005); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB6908; H:sjmaillnx2.cadence.com; FPR:; SPF:Pass; LANG:en; PTR:corp.Cadence.COM; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 47b0f797-bd0a-40b6-d80b-08d77d59e42c X-MS-TrafficTypeDiagnostic: DM6PR07MB6908: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-Forefront-PRVS: 02475B2A01 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gkrh2dzd9ivJBIiAIzKfFeQ98H4M6l4hXXSB5FgCS0QsSWzvKvGM7t+atzXJLWWukJdXcJMwc3PHOX/u5mLinoV/GVMlFYniGUMvi6aw84jkMi1rCEO7D1e3i8kTgXE2Icsiwl3K0FUHshBT2QcyLUZfBpWuIf62yZRDGUQgzfHPqvepJBOLGgc5juxF9xAL5xt2c9JdFS37N6yoqmOTEZia4coOMYpMxwlOSCLTeX3qpBgu0ROC8oPF4Y+Jc/jYnpDnSpafJYL00ad4m049QLeB4g38Ig1eYOqxMwrq/tXFQ8RXD6qAtIHo9oztLyqxYcWfjAt9zdWQc7D535ODG7dYfEIu/Kv/xK0uAd2aNUrwqdyXPJdvoNjEwXLX/gIUh7gZPFlPmHvn2uw+/BWdkbwLtUB+5lu6tZB87nn5KnA20PVrPxyZElohfOijcji3z3UiLR0gCZufFhRz2CoHQatTeH9MRo/LrIaU66vxLM4Q6VUY29a4bRP3Ro4hMNTU X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2019 10:15:32.9389 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 47b0f797-bd0a-40b6-d80b-08d77d59e42c X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.28]; Helo=[sjmaillnx2.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB6908 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-10_01:2019-12-10,2019-12-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 mlxlogscore=999 suspectscore=3 malwarescore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 adultscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912100090 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191210_021539_644152_B32715E4 X-CRM114-Status: GOOD ( 13.80 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [208.84.65.235 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, =?utf-8?q?Przemys=C5=82aw_Gaj?= , rafalc@cadence.com, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org It may be the case that SETDASA fails for some reason. Reserve ->init_dyn_addr when it's defined to prevent assigning this address to another slave device. This way when device shows up we don't have to re-assign addresses. Signed-off-by: Przemysław Gaj --- drivers/i3c/master.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 5c06c41e6660..fab6e0609fca 100755 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -1263,7 +1263,8 @@ static void i3c_master_put_i3c_addrs(struct i3c_dev_desc *dev) I3C_ADDR_SLOT_FREE); if (dev->boardinfo && dev->boardinfo->init_dyn_addr) - i3c_bus_set_addr_slot_status(&master->bus, dev->info.dyn_addr, + i3c_bus_set_addr_slot_status(&master->bus, + dev->boardinfo->init_dyn_addr, I3C_ADDR_SLOT_FREE); } @@ -1675,6 +1676,11 @@ static int i3c_master_bus_init(struct i3c_master_controller *master) ret = -EBUSY; goto err_detach_devs; } + + /* Reserve the slot. */ + i3c_bus_set_addr_slot_status(&master->bus, + i3cboardinfo->init_dyn_addr, + I3C_ADDR_SLOT_I3C_DEV); } i3cdev = i3c_master_alloc_i3c_dev(master, &info); From patchwork Tue Dec 10 10:14:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 11281801 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3FC32138C for ; Tue, 10 Dec 2019 10:15:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1ABCD2053B for ; Tue, 10 Dec 2019 10:15:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MYH2p8lX"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="fwnGCMYq"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="4iA3svFT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1ABCD2053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6S2dMaU4+8YKbG6vRL/MU50LftMqHc7QOb7rMriL4Ug=; b=MYH2p8lXrkjk9b +slwTdGoii0hFpnle/be1Gm6DKVs8q5hn/TWk7uv26uXNDqXXdk47eLpwHuQHG3hKhEwHtc3xD8to DM9IdX9n9lQ8WhmTAmdvosYovmX6KTX8Y66sFoSQbrMVFzD19MNkGFbQIry9f1FxCwcFcJXRvZHzn 6cX2sB1+PAPm0AUtOxTg9ZomgvIsl9rIvKv+2KVd9DwHdqoBncwzaxSAaNH+R810LaUgV/jWe6vLE isE+r8TYgbsjiZFGjEd8O8BgM2tlsreQXli+xcqzwsXrhBIpwhLCtjI7jQ5du+N+RcwBNxPLe0WTX ePClB5c9jmLFlTTuhhvQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYX-00084w-QA; Tue, 10 Dec 2019 10:15:49 +0000 Received: from mx0a-0014ca01.pphosted.com ([208.84.65.235]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYV-00083x-Ea for linux-i3c@lists.infradead.org; Tue, 10 Dec 2019 10:15:48 +0000 Received: from pps.filterd (m0042385.ppops.net [127.0.0.1]) by mx0a-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBAADLgJ025727; Tue, 10 Dec 2019 02:15:46 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=proofpoint; bh=cq2c7r/7isRzyQQWckpwBeP7eb7dRAANXAltrpO4BAI=; b=fwnGCMYqCgzg+GZ1GDN5EyHVOXp1xsFYTJhWfQbRgOhekpTkO2oEIZEis+n2kMCjAjp9 rWpsU8YR5kqydBH6IwY3R6pZUmzDqKzZxiqREpKhozNAbB8eEjIVYSb0lm7iSoY2mWkh DwSKYAk2+q/XKSA3AnfGNQn1OyQpB24G/idBvLVQD5yIbpc7mE5KvSkyRUXCVVyk0Kov rWATLgWPxk2REq2SCV8F473nggkGiYZfyDj81ZLKnvPAgI3PKlxupFpgJxSDGMBQcAC9 3W0eErluZaGc7SC0BgU5rpObaNnamauWUBQn+DbiTiaqFD2rU3N5MEqeqx7cbCIXtkKd JA== Received: from nam02-bl2-obe.outbound.protection.outlook.com (mail-bl2nam02lp2053.outbound.protection.outlook.com [104.47.38.53]) by mx0a-0014ca01.pphosted.com with ESMTP id 2wra709bnh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Dec 2019 02:15:46 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GhO1W2dUD0dMgYoQPZxJkvNCtprw4OcBI5vTU5XJIApVhgyb42KnoqXKTajEtuj9Egwn6RVBV/Hu5TM7BwIeWB6jYP+ZN2Ho+cEh9Lwd2FKtq+Xi8cx08MDzqlfFvmk0XDGOwI6HavipKDC9Np6RuFYh/Xer9tHKJ+9hRS6kdu5CLulR72Ppz89nMEqu3qeEG+VJRk/tHGIYf8d2QfpLU2ry9wJj9dctlnHNWv6ZS5/0F5txzixEkWLyxXy75c565uHxs1LDUJMEyn0UoA3E83aEVl0CFZ+kLeKBSGhCBo0/KnSSP3TPmuCqVLH22EcVZBu6EIWGhli85PvMjQuZCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cq2c7r/7isRzyQQWckpwBeP7eb7dRAANXAltrpO4BAI=; b=LIlf1ioXBs6snznayAz3h6rruMuI1YhmFWKlXv8zzTjYfMw54l+JwRCtawoPB0Ken5hanpmWd2L/kzbUN90QfwCvh7cZ3ckE8dfhANqN2MtNeUcJjmrDp67PdgJbQrKzRKc8uW9VcuStl41gutyCBzYxoARDaOiZuPEVe0sjKU1W3aIt3zTvEUIRdbrEVF1OWH0bKBCsND9tsbRm4qOuopTwe9rb7VSZXAZN+ydcBoOZMSIxXvq2/PQlU0fSamsgXa2tvwZHMAtBjOZkifxtu/7KHrswgDkdKy6BSYCjY0UJRSoP3cbxXDFlCn4+Zc4bcKy0NIdhJHctG3VMA0lujQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 64.207.220.243) smtp.rcpttodomain=kernel.org smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cq2c7r/7isRzyQQWckpwBeP7eb7dRAANXAltrpO4BAI=; b=4iA3svFTqlp8wFZmzJBRQ3Ay4C26g4W5moEqiLF6PfIgy2u//dWlKUG7it6Wm4ni+EgjwUn0dRaE7OB4KjU5qobdfcOrJxXrHUswgvAbod75e6/ZHViaNfATHsi/DMTZmB3yCj1uG1fPdwfYYom9YGzGiR8C6s2x6B6c2buWWas= Received: from BYAPR07CA0042.namprd07.prod.outlook.com (2603:10b6:a03:60::19) by BY5PR07MB6627.namprd07.prod.outlook.com (2603:10b6:a03:1af::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.14; Tue, 10 Dec 2019 10:15:44 +0000 Received: from DM6NAM12FT027.eop-nam12.prod.protection.outlook.com (2a01:111:f400:fe59::209) by BYAPR07CA0042.outlook.office365.com (2603:10b6:a03:60::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.12 via Frontend Transport; Tue, 10 Dec 2019 10:15:44 +0000 Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 64.207.220.243 as permitted sender) receiver=protection.outlook.com; client-ip=64.207.220.243; helo=wcmailrelayl01.cadence.com; Received: from wcmailrelayl01.cadence.com (64.207.220.243) by DM6NAM12FT027.mail.protection.outlook.com (10.13.178.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 10 Dec 2019 10:15:41 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by wcmailrelayl01.cadence.com (8.14.7/8.14.4) with ESMTP id xBAAFZPL102957 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=OK); Tue, 10 Dec 2019 02:15:37 -0800 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 10 Dec 2019 11:15:35 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 10 Dec 2019 11:15:35 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id xBAAFZhH009301; Tue, 10 Dec 2019 11:15:35 +0100 Received: (from pgaj@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id xBAAFZIF009300; Tue, 10 Dec 2019 11:15:35 +0100 From: =?utf-8?q?Przemys=C5=82aw_Gaj?= To: Subject: [PATCH v4 3/6] i3c: master: make sure the PID is set before registering the device Date: Tue, 10 Dec 2019 11:14:59 +0100 Message-ID: <20191210101502.8401-4-pgaj@cadence.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20191210101502.8401-1-pgaj@cadence.com> References: <20191210101502.8401-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:64.207.220.243; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(376002)(136003)(346002)(39860400002)(396003)(36092001)(199004)(189003)(426003)(336012)(6916009)(86362001)(356004)(6666004)(478600001)(2616005)(36756003)(5820100001)(107886003)(1076003)(4326008)(8676002)(4744005)(316002)(26005)(186003)(54906003)(81156014)(81166006)(8936002)(5660300002)(36906005)(70586007)(70206006)(66574012)(2870700001)(2906002)(42186006); DIR:OUT; SFP:1101; SCL:1; SRVR:BY5PR07MB6627; H:wcmailrelayl01.cadence.com; FPR:; SPF:Pass; LANG:en; PTR:ErrorRetry; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fc27ec37-8af6-40db-4bbc-08d77d59e955 X-MS-TrafficTypeDiagnostic: BY5PR07MB6627: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-Forefront-PRVS: 02475B2A01 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R0Yd4Ln1oxdlb61KnQ4UVU8/3r4EfWZAVpE8l76KBc3BkvquiVvWBgvkkgjdAwQZ1SdqJyBn6knQUJdJhgQYuJU2JAZU58OCCTi61ho90clDarNB7PkBRo6qn5H8Dj0gFEHB1zGT1xE8Qmp+CUqoOGVohmqnnlxcJw3aH3214BocBBRxmGiM90Cnp0jDoPIrhhYPNJZQxwfF3CxL+jqKTVUSmvlms8R4GY3MmSnqSiYvY65RVnmiMd/G3VXGRSkDMILxm6F/wtWtdx9irYYTDoCZ8XxJtLa1K3rEpWQ3aHCR8xWxYagZxfy2tXLEtqm5sEKjioX5U4CM56yp/M1qq24ly1Pp4r1IRqGehoqdko9/LoDt5ws5M+qsP5yZVQcTWNZQGu0C2iR+knxEDGVtTOztt2SRblbgR+jKeQn7Xp+LEynr2wVl86VpaLRzfpI3iJYvVrzg8id1LOHD8IE+94PY823VvaxQC23Ikr46wi8abkdioQGvD5aI3Ger0dkq X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2019 10:15:41.3324 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc27ec37-8af6-40db-4bbc-08d77d59e955 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[64.207.220.243]; Helo=[wcmailrelayl01.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR07MB6627 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-10_01:2019-12-10,2019-12-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 mlxlogscore=999 suspectscore=1 malwarescore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 adultscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912100090 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191210_021547_490477_D4DEEFB6 X-CRM114-Status: GOOD ( 11.47 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [208.84.65.235 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, =?utf-8?q?Przemys=C5=82aw_Gaj?= , rafalc@cadence.com, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org If SETDASA failed for some reason or Provisioned ID (PID) retrieval failed PID may not be set. Check that condition before registering the device. Signed-off-by: Przemysław Gaj --- drivers/i3c/master.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index fab6e0609fca..4b3d1c0f778d 100755 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -1450,7 +1450,8 @@ i3c_master_register_new_i3c_devs(struct i3c_master_controller *master) return; i3c_bus_for_each_i3cdev(&master->bus, desc) { - if (desc->dev || !desc->info.dyn_addr || desc == master->this) + if (desc->dev || !desc->info.dyn_addr || + desc == master->this || !desc->info.pid) continue; desc->dev = kzalloc(sizeof(*desc->dev), GFP_KERNEL); From patchwork Tue Dec 10 10:15:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 11281807 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 95406138C for ; Tue, 10 Dec 2019 10:15:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71DCB2053B for ; Tue, 10 Dec 2019 10:15:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Oqn+3DHC"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="i7i4uVu+"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="pDDAB95z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71DCB2053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DX7fHh+zaUvRBxjjIgynXC3tC/v5ICuFGpNEDRq4OzU=; b=Oqn+3DHCAy2l+o k52/zCnwK/fATAQGpSLdWM6v64OmUSJcd3twSoKGMEB6ldUIzljWaZWMD+X40Cb5C3oxWW+PFtM1o XaYFPjk6lfXu/IYu1lsk/A6EE6sno9xH/cw1JvpkL3aw5BAtMPR6OWRCPE3+DBLU4oACjuTOOvCQx O3uPQSMjgndNjNnl6uVlnHtwOuAANnHfNSuLT+5Szt1b/gh+O5Frw2kgSj1SlgS31SCKNk7ITy5GR pFgXHUheGQ3MYepSfFbJJBmXOf8kNXnQhC+3W8qpmHk9RvJAz+6OCU0Xq5CrNPZD5JAolGeBNG7xF jxOsbJpRlIkBcRmJzhnw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYe-00086q-5X; Tue, 10 Dec 2019 10:15:56 +0000 Received: from mx0a-0014ca01.pphosted.com ([208.84.65.235]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYa-000866-KY for linux-i3c@lists.infradead.org; Tue, 10 Dec 2019 10:15:54 +0000 Received: from pps.filterd (m0042385.ppops.net [127.0.0.1]) by mx0a-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBAADMkr025733; Tue, 10 Dec 2019 02:15:52 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=jaZGmfWsFPbrET/I1a85oqYsC7ry6HboZ0lDypFg0kQ=; b=i7i4uVu+h7ZeCmoY6m2AJyB7epn+R2+jH8zmnqTIR09bjvdGXjhiJgrRi73BYX5vtdyS xYdSAy+s0OvQ/AV1WBfwU4V0iiDCTxfUPG9EkzJvLItkNs9kldRNcplaiscVC5BeaiCw Rb35Ar2TLOGWzgrsEYHz27NoOHSKX1pNYQUqlOR/gPXtCV2kRNeAhTyvSJNzhUma6JJG ymT9ythV7Sf/awBwyKJCILhnqEu3VWFk88LnYNxV8G2bVq15cUM0VLnR21/kJ7Yvb/mL /ykchL1ISk8VPOWx+PABnOv/dSHX/pUtoB+Ic7bpqSkt9n+3erhntQLYKYKXXDxlIXGm Zw== Received: from nam02-bl2-obe.outbound.protection.outlook.com (mail-bl2nam02lp2052.outbound.protection.outlook.com [104.47.38.52]) by mx0a-0014ca01.pphosted.com with ESMTP id 2wra709bnu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Dec 2019 02:15:51 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mg2b49Cb90ttH+a6L51uwmARhYL7yEEpMv/KKmwQY3ruLb+4fWCyqAc5BHdfkmW42RHrHI9d7CvNj5LQfctnawOgtnKsSGlTn0uR+xJdPBfySiPj0GXTtHenmmiVMt6LR7ru2N/2is+3ur5kS6lRMaGcU6L6Emf72jeknW0uWa/LUErwfylzDUUPUIyi6RyCqTdr3Ls9qH5PwLvPlhCaOpq84Hc3SYRunuDXvRd8cpzTyQk2K91NhtnkCGqESqupqFo+A6gohjSgHpIuLOffPXfZu1C8IwoRn0eSj4lbnHau+OOP4nr4XYSFY1PDsCilTvQ8rEnIxcIuRLXhNmUqvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jaZGmfWsFPbrET/I1a85oqYsC7ry6HboZ0lDypFg0kQ=; b=Y3+rx4/UMC5Rcxbp5b0Uh4aZccvbgWGr+unnblvpdeTRIhDzlToBWEsoCfnTDMelGF7MRFVUd22Jex9yq003nFthTHhBgLoIhAuGoSMo5aWA0i5XpltAsX8dja8ycSjUbkTgKJYxIY+szjYXPjIoWkNWgd2BJk4pLFMtm4XZuv6GkM9blh6EOMZC6W2P4n566MqYzqVrZG93xRH2vJAk9gaDSN4erNw77pENVOBeCZOcfaS1sUsyNLxQKnDRAicSu1eStjA0zp4Er7cqhcaKOIdMGxTXL95i4s4jR4fnamC8NDLnWBAOv2+jX3gbJcIiPNfARFtAextW3k0W4TuVeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 64.207.220.243) smtp.rcpttodomain=kernel.org smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jaZGmfWsFPbrET/I1a85oqYsC7ry6HboZ0lDypFg0kQ=; b=pDDAB95zJJSe79ZJzG637GKAj2Gqqf1CeCNw9zlhfkOCgohhf5R0E7qgGYRkstJMCeHs4FsmOk58tpj/19C2wyTKrjA7ct33yy4A0gMfx8EnSzIBL1t/bQnxiNTCvcEd/CO70FNC1ViEaVUo46GRH1ic00lruxnJsETsAgkIWTE= Received: from CH2PR07CA0016.namprd07.prod.outlook.com (2603:10b6:610:20::29) by SN6PR07MB4463.namprd07.prod.outlook.com (2603:10b6:805:5a::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.17; Tue, 10 Dec 2019 10:15:42 +0000 Received: from BN8NAM12FT051.eop-nam12.prod.protection.outlook.com (2a01:111:f400:fe5b::203) by CH2PR07CA0016.outlook.office365.com (2603:10b6:610:20::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.12 via Frontend Transport; Tue, 10 Dec 2019 10:15:42 +0000 Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 64.207.220.243 as permitted sender) receiver=protection.outlook.com; client-ip=64.207.220.243; helo=wcmailrelayl01.cadence.com; Received: from wcmailrelayl01.cadence.com (64.207.220.243) by BN8NAM12FT051.mail.protection.outlook.com (10.13.182.230) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 10 Dec 2019 10:15:41 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by wcmailrelayl01.cadence.com (8.14.7/8.14.4) with ESMTP id xBAAFZPM102957 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=OK); Tue, 10 Dec 2019 02:15:38 -0800 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 10 Dec 2019 11:15:37 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 10 Dec 2019 11:15:37 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id xBAAFbDk009306; Tue, 10 Dec 2019 11:15:37 +0100 Received: (from pgaj@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id xBAAFbCX009305; Tue, 10 Dec 2019 11:15:37 +0100 From: =?utf-8?q?Przemys=C5=82aw_Gaj?= To: Subject: [PATCH v4 4/6] dt-bindings: i3c: Make 'assigned-address' valid if static address == 0 Date: Tue, 10 Dec 2019 11:15:00 +0100 Message-ID: <20191210101502.8401-5-pgaj@cadence.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20191210101502.8401-1-pgaj@cadence.com> References: <20191210101502.8401-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:64.207.220.243; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(346002)(136003)(376002)(396003)(36092001)(189003)(199004)(1076003)(86362001)(107886003)(42186006)(316002)(36906005)(5660300002)(2616005)(70206006)(8676002)(186003)(356004)(6916009)(70586007)(6666004)(81166006)(426003)(2906002)(8936002)(36756003)(4326008)(81156014)(336012)(478600001)(26005)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4463; H:wcmailrelayl01.cadence.com; FPR:; SPF:Pass; LANG:en; PTR:unused.mynethost.com; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 71ed7941-c919-420a-7e40-08d77d59e960 X-MS-TrafficTypeDiagnostic: SN6PR07MB4463: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-Forefront-PRVS: 02475B2A01 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kyzRjKAqAyL5gk77HehV+gUVCZpe+5JDP0+y20f+HQie2j31roQ1p2+pqqGu1qY3dUuxaarKET6GcC5ipmGcjO2/7jq9okKDwRSlQH4nmIpE7/aZNWummYnH6XUIe2l3sfchyQPxGMRys1rfGJXGZZ+2nr4TLKPLh9Ippld3wznBmGStDGZHZi4g5yI8KqT2j1Jjan/jsnzsE+sdJA3LP2CssjD5SeN//oQBbFosuE0HjaEqQaNBeLFzUqMhLczYh06zIxa4/pvkvlzrXr10UgFHBbl5vTHK+tY7+CLeLdzY1kieuofQf8I78urNY5r8HdLjquTcJ56CWab/oRoc4dMvmMlsgd9L09NVi/LrXeoX+pKCWWuIhcbDFGB/gp4Wb9NxqI+2UOpj3Ty3cyekxVBB2JbvX3e518Chjv4fboshAmALFC7xIjTXi/QzT9If7IYbBPpjeQs2qblEVcf792FI+cVF8kuEeWt3++GxHTXJ5aIAxEf/l7odD9wI2GLS X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2019 10:15:41.3815 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 71ed7941-c919-420a-7e40-08d77d59e960 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[64.207.220.243]; Helo=[wcmailrelayl01.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4463 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-10_01:2019-12-10,2019-12-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 mlxlogscore=999 suspectscore=1 malwarescore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 adultscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912100090 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191210_021553_182886_68CFBB65 X-CRM114-Status: GOOD ( 13.36 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [208.84.65.235 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, Przemyslaw Gaj , rafalc@cadence.com, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org From: Vitor Soares The I3C devices without a static address can require a specific dynamic address for priority reasons. Let's update the binding document to make the 'assigned-address' property valid if static address == 0 and add an example with this use case. Signed-off-by: Vitor Soares Reviewed-by: Rob Herring Signed-off-by: Przemyslaw Gaj --- Change in v3: - Add Rob rb-tag Change in v2: - Fix typo in commit message --- Documentation/devicetree/bindings/i3c/i3c.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/i3c/i3c.txt b/Documentation/devicetree/bindings/i3c/i3c.txt index 4ffe059f0fec..7fee9b4dfba0 100644 --- a/Documentation/devicetree/bindings/i3c/i3c.txt +++ b/Documentation/devicetree/bindings/i3c/i3c.txt @@ -100,9 +100,7 @@ Required properties Optional properties ------------------- -- assigned-address: dynamic address to be assigned to this device. This - property is only valid if the I3C device has a static - address (first cell of the reg property != 0). +- assigned-address: dynamic address to be assigned to this device. Example: @@ -129,6 +127,15 @@ Example: assigned-address = <0xa>; }; + /* + * I3C device without a static I2C address but requiring + * specific dynamic address. + */ + sensor@0,39200154004 { + reg = <0x0 0x6072 0x303904d2>; + assigned-address = <0xb>; + }; + /* * I3C device without a static I2C address but requiring * resources described in the DT. From patchwork Tue Dec 10 10:15:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 11281805 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6E70E138C for ; Tue, 10 Dec 2019 10:15:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AF152053B for ; Tue, 10 Dec 2019 10:15:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RoiTNans"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="fTG+9gBy"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="5A2hB7af" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AF152053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XvR187dQGSg+Qm3geDmjJGa3jiN4xUkSddCig1HTLp8=; b=RoiTNansUIXmCG WhrqbUjio0NGlgrkfCTbOVuuMi2W6s0clJbJFWY4wI7+LbaqIMCqOVwvKOx5dBwufIPGX3K6wP4co an4pHGz8ScwqvdWz7bW/T9i/KNxziT1d16m7RgNmIus8ChdDGryMCkV9UZHFttqezf0qVH56k8wGU ye4+3HuMkDaCAYnyDN8yB+d9XZ1LGNBlvOcnskYWVlPjnyOpz8otAqAc8SI9lkpZ962efWkDO00OT tO+Gu7JZ6b6j60Dck5zc+xR1UUQT7LPP1u/wRJCnii+xCtgpziDpf4Mxl63MD83drx8NXIYAR8Nge DSnLCcSX1go+T26kmDlA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYZ-00085b-0F; Tue, 10 Dec 2019 10:15:51 +0000 Received: from mx0a-0014ca01.pphosted.com ([208.84.65.235]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYW-00084T-DH for linux-i3c@lists.infradead.org; Tue, 10 Dec 2019 10:15:49 +0000 Received: from pps.filterd (m0042385.ppops.net [127.0.0.1]) by mx0a-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBAADLOb025730; Tue, 10 Dec 2019 02:15:47 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=cQIXpaR+slXK2rIB033DG207qRE9AdFv8tkvQtPUayc=; b=fTG+9gBycfEyvd+/iv8xT1cwzUcxhqbPad0/8gZXLmFXj74H0JMKtnOD/EITmQSStg2T 9ufDXtN+BHbhgbbJgGMBKSCSYdW3BF/ZB1fT44MRinWkEKsHKCUaxMFMm4iToF24ZV56 N5X+jSDub42lTDtDwmv/boQ1N3u+8qs/Yd2dcYySy2hqp6SauT0i4oFNSMsbOmPFn3vV +Nwnpq/OVEe/56U4Ew0wu4cLkg2GDdk2dh8RVnCHSGVlOi0AZFOIQ3z2Sv0Ybj6jEUYU UUNLaTbrKr598fGdV/e6mmNU0/nHAG89gg98UmmHX73qXnnxlOLdz2cYcbymXVw3VRQe FQ== Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2056.outbound.protection.outlook.com [104.47.36.56]) by mx0a-0014ca01.pphosted.com with ESMTP id 2wra709bnk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Dec 2019 02:15:47 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cTGcwzy9D5PMH+Xfk2XwqdFsWHxUZbSavAvSC7i6a4K7AwnXNUFZf9bVTUTnEa5DNJ7HJ/FJLQPWCtlhtsiE7kcbqmO5f21jYXU/PwcbOxmILtejYbvvlGV1g1T0B7CCR299tjJX6sttIELQubDkr4O8f2TD23s5KDIny7cufIv7Evy8bUlHFokfMzjkK/NNqgSYxT/OHconipHWsZ3ik+ByRevPBdqv3ZfpsN31mouMlzJSOOj4bRFbLz0dNTwdHiMTLSNoOR5SNKCxgmtGKclGhrWQQiTux0+pesSM7I7xl7R9eUCMctw8W++WU7dGRM7sqZoOU/OMYYb9bXzhcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cQIXpaR+slXK2rIB033DG207qRE9AdFv8tkvQtPUayc=; b=JgObcqLA9sdbr+dD6TP4nYsm0tOqrblt2tGrmYwm2kl5015/BWQGGkAy41xmoTlCN/LAstkl1lAOqk8yjZIrWcyyj7PhqeSVNfsEbdOb5aw5kSR3V0R2th53gm05QfGb5RPFZoNvCuLeyrcQ6gzVcmDdzNpyCF66+61cYUO2lksaGvclEz3gMhYUCaSHq5/91IQyOxrg/HIz2soSFq/k6pJmg9b278P7vPlCtyDZIHyykwCsiPwp5I7s2tMvyGL1qBm5pf8ci/776tTPJg7nAnVzj5ui/FhT8mbQEAJmFIa2DPdRmEdDHILG11I12c58rsI61ysBh3qUj7P364IyyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 199.43.4.28) smtp.rcpttodomain=kernel.org smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cQIXpaR+slXK2rIB033DG207qRE9AdFv8tkvQtPUayc=; b=5A2hB7af2HbQleawuQ4NzTH4VrDKS+rthAzl5CsamJUQMIg1e02F8+9usKxi9d35kjm2u4KRxlC9uAPRsl3Tu4/Y06jSMHcMZybiJ2WwjgLFuEOPD+7BsdTQ6zihE63bIZXI4x9qhWDuOsY8j3SyhnDmq+aIXnxVP0mhZsFgPlg= Received: from BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) by BYAPR07MB5557.namprd07.prod.outlook.com (2603:10b6:a03:9f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.15; Tue, 10 Dec 2019 10:15:43 +0000 Received: from DM6NAM12FT057.eop-nam12.prod.protection.outlook.com (2a01:111:f400:fe59::206) by BYAPR07CA0077.outlook.office365.com (2603:10b6:a03:12b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.14 via Frontend Transport; Tue, 10 Dec 2019 10:15:43 +0000 Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 199.43.4.28 as permitted sender) receiver=protection.outlook.com; client-ip=199.43.4.28; helo=rmmaillnx1.cadence.com; Received: from rmmaillnx1.cadence.com (199.43.4.28) by DM6NAM12FT057.mail.protection.outlook.com (10.13.178.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 10 Dec 2019 10:15:43 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by rmmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id xBAAFdQZ031071 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Tue, 10 Dec 2019 05:15:41 -0500 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 10 Dec 2019 11:15:39 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 10 Dec 2019 11:15:39 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id xBAAFdWI009313; Tue, 10 Dec 2019 11:15:39 +0100 Received: (from pgaj@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id xBAAFdYL009312; Tue, 10 Dec 2019 11:15:39 +0100 From: =?utf-8?q?Przemys=C5=82aw_Gaj?= To: Subject: [PATCH v4 5/6] dt-bindings: i3c: add a note for no guarantee of 'assigned-address' use Date: Tue, 10 Dec 2019 11:15:01 +0100 Message-ID: <20191210101502.8401-6-pgaj@cadence.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20191210101502.8401-1-pgaj@cadence.com> References: <20191210101502.8401-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:199.43.4.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(376002)(136003)(346002)(396003)(36092001)(189003)(199004)(426003)(336012)(70586007)(8676002)(8936002)(81156014)(81166006)(70206006)(478600001)(107886003)(186003)(4326008)(26826003)(2616005)(5660300002)(1076003)(26005)(356004)(42186006)(54906003)(86362001)(36756003)(6666004)(6916009)(2906002)(316002)(76130400001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB5557; H:rmmaillnx1.cadence.com; FPR:; SPF:Pass; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: abe0afba-bd2b-4812-d669-08d77d59ea31 X-MS-TrafficTypeDiagnostic: BYAPR07MB5557: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 02475B2A01 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3ZNQ/iZ7GaqxlqjTLDvvHqbZ/4LsAkG3IX0ADBvtN+42y7+byQfHbFF0EP0u1tMN9hV9/zh+WqjH3UMxE0t3jakM/6BwQA8S9a1PXmnQWC6h3syMQSJf+o7do2gyn4EcoMPyssXI427kd69N/m404woWzwvM0ktkuisb51LgMBEeMLLpD4VxbN7M7vt1sY5qw9WtpEQBbi4AWqWSllkEo/YjiH39YpQ3BWhUOHhw3VbKTO31X1ErxWvlm/Y8E0Qe8FCsXBBGdsktV1Ok3ouL6e9tMP8YIAywH/uMf+jJ51LCfEmaT2eu+ccDjftHY9svLB6Xenuze69F9MvxzcRIssVxvDe4M3+xjOK70NN6sOGqT9GwDy4Hu8eqZDdPKWz3U1iI8peifqsDNtbKmkdgwEi49CYm1r/IfYSQCI37uqrvu0Z75i38QfiubgDGQUfWdub0TL+/D+FiMW/OTG0x5ZmVjW/06eEnyU17HKRnF81nmOHliJe88IsoAHe1d2MQ X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2019 10:15:43.0280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: abe0afba-bd2b-4812-d669-08d77d59ea31 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[199.43.4.28]; Helo=[rmmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB5557 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-10_01:2019-12-10,2019-12-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 mlxlogscore=999 suspectscore=1 malwarescore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 adultscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912100090 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191210_021548_447980_77CFAEA7 X-CRM114-Status: GOOD ( 12.65 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [208.84.65.235 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, Przemyslaw Gaj , rafalc@cadence.com, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org From: Vitor Soares By default, the framework will try to assign the 'assigned-address' to the device but if the address is already in use the device dynamic address will be different. Signed-off-by: Vitor Soares Reviewed-by: Rob Herring Signed-off-by: Przemyslaw Gaj --- Change in v3: - Add Rob rb-tag --- Documentation/devicetree/bindings/i3c/i3c.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/i3c/i3c.txt b/Documentation/devicetree/bindings/i3c/i3c.txt index 7fee9b4dfba0..e7ac9756c731 100644 --- a/Documentation/devicetree/bindings/i3c/i3c.txt +++ b/Documentation/devicetree/bindings/i3c/i3c.txt @@ -100,7 +100,9 @@ Required properties Optional properties ------------------- -- assigned-address: dynamic address to be assigned to this device. +- assigned-address: dynamic address to be assigned to this device. The framework + will try to assign this dynamic address but if something + fails the device dynamic address will be different. Example: From patchwork Tue Dec 10 10:15:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Przemys=C5=82aw_Gaj?= X-Patchwork-Id: 11281803 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5A1791593 for ; Tue, 10 Dec 2019 10:15:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3715C2077B for ; Tue, 10 Dec 2019 10:15:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MK7W3xJp"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="M0fqYjE5"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="mlKX+5FF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3715C2077B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4f1V98xd8fGYJGL/NoxWLNQGg+2XgWc9OUQPviLpcz8=; b=MK7W3xJpFgIbfF ZHgm5jLl/y1SBeROIwh/77WhxcalWytg/KiysTUx9X/VasaAJvrCIIZK/VFtof0Jo3A+MpsyjA8Hk t2JIyDaLLB6xzbfaAojHQthJ9GFDl9qhBASDj4Pysy4bQRbhVeMhRrhn51UYYS5DDUvv0BkKBujNp Bal5ATEBfdYmS0sC3ELyTcKDjuJZjczEvKcPHCu9UWMXITjpR8CzfpKqdAw3mvOKCgGEjJPYiZVat 7ZeftHCuKOUWUlcM8xYznUvfiJYKTBT96ikQtkPCmxJ0KskE9n9X78A58znBhbSKCeIkY6xeNn5Vm Sb7hke37IRUQ7ySwPFBQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYX-000854-TC; Tue, 10 Dec 2019 10:15:49 +0000 Received: from mx0a-0014ca01.pphosted.com ([208.84.65.235]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iecYV-00084C-VI for linux-i3c@lists.infradead.org; Tue, 10 Dec 2019 10:15:49 +0000 Received: from pps.filterd (m0042385.ppops.net [127.0.0.1]) by mx0a-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBAADMkp025733; Tue, 10 Dec 2019 02:15:47 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=UqfWeSljS86z9I5VDgrWuvPBCrYpVRnLfr9Cx8xTR6E=; b=M0fqYjE5MUbarem7OF69tRtca5ckff5MLtDJB/TMoPqgRSmNFvzhbIm3uYGrMdwZ2FNr uKWAg+l/cb3FJ1mDnD8dQdTtBM5TtiF64ghUSMVCP6kGGcZtxs5dKP/4T9a5Upgvc4eG hd9uiSYBoccKey2pCGPNExdeJ22eFcwcFWQECeK1IFKddEc7wOmUwCoBRWUmWPXlZHWv sZU6/C5NgeQ40wRi8iKTVi1cOQe6WZRo66mMqHh227sJYKRhCnhYtHpDVlXnacZMEZdg gY2AFYEbTvv/vBRIAHbZDK4t44vgPndt0b1im+n9gQRngb1TJ3DEYYhQwzT8wqTXA/Pc VA== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2177.outbound.protection.outlook.com [104.47.55.177]) by mx0a-0014ca01.pphosted.com with ESMTP id 2wra709bnj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Dec 2019 02:15:47 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WKHpVuSdVFV5Z1wLvF5tjm71F8VKfkTfMSZn+Ts81ahXZosaf/xTQyzcCK3KpU+sCP2HiD3uRVcyqWVVHnkym3mryc6s5BnbW2GvOUTHtdWKabOed2AQ1vwvuMf8QkAd+q0BcTxxuiPNIJsav1cG/FwYGN02InmTcdzzgmIh1SNf41D35GoNI4bNYN5ozdHaixkENzr0rQaA1HjlMG3PGJXwBoLnHBw3W7vncVDpP39wqRr/5iGmkF8wUyjkzxrs1Vs+H2f50lqw6UZiL06eGSMJFoGdYaeBYOItQ+KfJCpR5aeqItNtf4mYGphf9sbPE7PAEnXLKwyFE6nTzrSGVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UqfWeSljS86z9I5VDgrWuvPBCrYpVRnLfr9Cx8xTR6E=; b=oRiNU/AmDhJ20O/dPOApIzWzZuOTXUNujbWt1QNOiBfkczKJkBsgzsQM6k6BtRzr8awBtkbbCq88zj9XBvb6YqdwoextfVz87L33ZL5XCtjkBj6mlvRf+DtftHeGiZf3upnHIVDJeXFxbGs3or2BzH/JtLdLkme+2pms6S5yHKQ90TvT+KQWMYgsD+Tg6kJnP5EQNfG9AFJ0KiBcQ4ubt1fFpCatMmh7BvGycr7FCuZoO7M3pLB0c7j60/D2pj7TgbtCpO12JwuHwkNaJ4h79BQfGqHf2YstElZWFEdno4rfOk8vP/09YRTgc1xk50t3M6XbukJ7bUYWzVbNCvCVHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 199.43.4.28) smtp.rcpttodomain=kernel.org smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UqfWeSljS86z9I5VDgrWuvPBCrYpVRnLfr9Cx8xTR6E=; b=mlKX+5FFt/qcLnC3+iqaQuc+56kuZm9dCVBPlmAr3/MYIuj/t0vfmsYD+tanBBZ7nTd4kf9qhQOtK9xCSht8gfmnqxeHh3vxmGH/wrRSLZXSFIefqqqLaia+l0rspTvgm6nA4W7OOHeYYrwvhTYvFv9IehHaVpunSceCoidK0KY= Received: from BN8PR07CA0009.namprd07.prod.outlook.com (2603:10b6:408:ac::22) by SN6PR07MB4992.namprd07.prod.outlook.com (2603:10b6:805:ac::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.13; Tue, 10 Dec 2019 10:15:44 +0000 Received: from DM6NAM12FT025.eop-nam12.prod.protection.outlook.com (2a01:111:f400:fe59::204) by BN8PR07CA0009.outlook.office365.com (2603:10b6:408:ac::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.14 via Frontend Transport; Tue, 10 Dec 2019 10:15:44 +0000 Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 199.43.4.28 as permitted sender) receiver=protection.outlook.com; client-ip=199.43.4.28; helo=rmmaillnx1.cadence.com; Received: from rmmaillnx1.cadence.com (199.43.4.28) by DM6NAM12FT025.mail.protection.outlook.com (10.13.179.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 10 Dec 2019 10:15:43 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by rmmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id xBAAFdQa031071 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Tue, 10 Dec 2019 05:15:42 -0500 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 10 Dec 2019 11:15:41 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 10 Dec 2019 11:15:41 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id xBAAFfOw009319; Tue, 10 Dec 2019 11:15:41 +0100 Received: (from pgaj@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id xBAAFfmu009318; Tue, 10 Dec 2019 11:15:41 +0100 From: =?utf-8?q?Przemys=C5=82aw_Gaj?= To: Subject: [PATCH v4 6/6] i3c: master: dw: reattach device on first available location of address table Date: Tue, 10 Dec 2019 11:15:02 +0100 Message-ID: <20191210101502.8401-7-pgaj@cadence.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20191210101502.8401-1-pgaj@cadence.com> References: <20191210101502.8401-1-pgaj@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:199.43.4.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(376002)(346002)(39860400002)(36092001)(199004)(189003)(336012)(6916009)(70586007)(81156014)(8676002)(26005)(1076003)(8936002)(426003)(81166006)(42186006)(5660300002)(316002)(76130400001)(54906003)(2616005)(36756003)(6666004)(356004)(186003)(70206006)(478600001)(86362001)(26826003)(2906002)(107886003)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4992; H:rmmaillnx1.cadence.com; FPR:; SPF:Pass; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3089b5ce-2b66-47af-d130-08d77d59eac0 X-MS-TrafficTypeDiagnostic: SN6PR07MB4992: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-Forefront-PRVS: 02475B2A01 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jFvDKCKX9731j3d06E7j+P3fVEr1nLy3sjISIK8hJPa/KjIXdMTBg3IVldg5Ar5JmyQU/wjZDzqGxzjPUvy5nxrRffLglwSDT6NXUSC2S7gANYwB7/w9TaTX33aMnoV/ARhFRXf5i6kVXGORfLH1XlvXmVcuXzStLRTq4mmrMh1REK/FgPRZ/WgRcdJjUvU9+p+7pwY+pCGFA2pAEH5ROv4V48dWQXhwt53MwQbk6KPoSBXQjKIijYCFWhnmTzeUVVrLFmHCta73lFdtnXfKL99DGGaTZ6TRCR2V1GdcSKoiUCE5/zQ229Kw2kELW8wdkjH4fu08XgQ2ubmeBmn7d78ci4FeAL8cBJMWOcXm4ta+Se6eI5u2Q6uhQA7LC374WgyiS9ekT8HfAaPTGGbsKNmh3A1sOs+/pzJ8HoZQXTnO/eGJN8IvLndyxWWO2E9OILOpIiqdZp5mst+0FimaAzcCtesS4z05eYnWRg6tFRnKLewVdgPCiLuqx8Pl24J9 X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2019 10:15:43.9650 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3089b5ce-2b66-47af-d130-08d77d59eac0 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[199.43.4.28]; Helo=[rmmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4992 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-10_01:2019-12-10,2019-12-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 mlxlogscore=937 suspectscore=3 malwarescore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 adultscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912100090 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191210_021548_008117_6F551612 X-CRM114-Status: GOOD ( 12.32 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [208.84.65.235 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux I3C List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-i3c@lists.infradead.org, Przemyslaw Gaj , rafalc@cadence.com, vitor.soares@synopsys.com Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=patchwork.kernel.org@lists.infradead.org From: Vitor Soares For today the reattach function only update the device address on the controller. Update the location to the first available too, will optimize the enumeration process avoiding additional checks to keep the available positions on address table consecutive. Signed-off-by: Vitor Soares Reviewed-by: Boris Brezillon Signed-off-by: Przemyslaw Gaj --- Change in v3: - None Change in v2: - Add Boris rb-tag --- drivers/i3c/master/dw-i3c-master.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c index b0ff0e12d84c..c6caba39a34b 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -899,6 +899,22 @@ static int dw_i3c_master_reattach_i3c_dev(struct i3c_dev_desc *dev, struct dw_i3c_i2c_dev_data *data = i3c_dev_get_master_data(dev); struct i3c_master_controller *m = i3c_dev_get_master(dev); struct dw_i3c_master *master = to_dw_i3c_master(m); + int pos; + + pos = dw_i3c_master_get_free_pos(master); + + if (data->index > pos && pos > 0) { + writel(0, + master->regs + + DEV_ADDR_TABLE_LOC(master->datstartaddr, data->index)); + + master->addrs[data->index] = 0; + master->free_pos |= BIT(data->index); + + data->index = pos; + master->addrs[pos] = dev->info.dyn_addr; + master->free_pos &= ~BIT(pos); + } writel(DEV_ADDR_TABLE_DYNAMIC_ADDR(dev->info.dyn_addr), master->regs +