Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1034171rdb; Fri, 20 Oct 2023 06:49:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnpr9XcQ7Mikud8CWWUpj6PFCnrhu2JT2t0yxyL/XCe6Pf6mwSd2/JoCRH8xQGkLWQDGow X-Received: by 2002:a17:90a:ec0f:b0:274:616e:3fc4 with SMTP id l15-20020a17090aec0f00b00274616e3fc4mr1737620pjy.34.1697809790150; Fri, 20 Oct 2023 06:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697809790; cv=none; d=google.com; s=arc-20160816; b=RnoU5tbF9LOHh/VgHvMPCtvkS3lmxkoF847vvMAJBWEIJ8/e9ieXIsK0qg1wgGORMw PrxVf+Z5Gq1GE5hNIdBF8+oD4RIv+3AyHQWcPf9ak5AFB8UTUAH9LPQTmB6EygFAHpMM VF23dbTrlRaVm+mcdukkCAbSIY4qQTX6cST0XaNXZdgyXvBsUnKp46AWbeGIssgRwyjc hETGo13OSYpLAbaP1RojIiYPPB0033+on1xaiofSc/kMG9jlCFHUW8vm8qP70O1YzwN/ 0bmPUUBIbgm7bKhpUR5Rg7i5vxF45G41Dmv7s4agFO/kHvzMlrb2je6QwVxH9E765FP1 jnTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=zngJBNWL2s7OHwgwI6RJ9msvZIk+5luBA5kk8oImGe8=; fh=2xI9wzEGy998P8XI6mhOllPkUHQsxCfN9aU+/WmuZw0=; b=ajMS5DubDn502sfJPzgQ0ar4SXGnvq/p6Qu7uerql9XQT2H7CuEIyWyPQOxO2fa9U7 /Zc9ls9A+UB9ASKgm5E+42/jiubsZCC0FBU/+UGCXYB7sMY+4uUZ2D7HU8lvDGO+LEmR inGASegYfTjBAdSDEa4Jor00TZMMIrU6AtdbhAuNFSLLmMSEonv5IxKZFI1nqnhVnjxq XJfDwheAFKFHRfx44XvQn4sft/7oVpzrY3fL0rnP8G80Q4jpxpxqL+VRrXSvm1KeACT8 6vOCpNnnFgjxx7OGJa3+oQ/j8CQ7t7UJRoPJM5U6qCO5iEu09qGHLidhKQLky1fd7i87 dHKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=D+JciAcn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id m12-20020a17090a71cc00b00274d5eb88c4si1917204pjs.90.2023.10.20.06.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 06:49:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=D+JciAcn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 3766283FA169; Fri, 20 Oct 2023 06:49:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377482AbjJTNtm (ORCPT + 99 others); Fri, 20 Oct 2023 09:49:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377372AbjJTNtl (ORCPT ); Fri, 20 Oct 2023 09:49:41 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FAFC93 for ; Fri, 20 Oct 2023 06:49:40 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1997EFF806; Fri, 20 Oct 2023 13:49:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1697809778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zngJBNWL2s7OHwgwI6RJ9msvZIk+5luBA5kk8oImGe8=; b=D+JciAcnqlZuF76qZVOF5SM8B14odr1sM6EJw8msPu/PEyekNWKje1U2T4IwDyVNvutB91 1q35bNriijP0kNYB3tSUTbYrUNa6fd7D8O9xCcScJmbITe3wP2U/p7tJ9GVpHtXIgKpKiZ bXV2jnYRWhGmSyrVS6dWXDYUarbSCj7/fexplyk8URU5lfhR3fFn29W5byFUl1Kr+LybX7 QuPs4M980mam62m7/CewDtVhWvmIRzmoWLLBXdiA6smON/srCOLnZQubN0oWKmAu+J3dwJ a7WMxdBgWVny0Y1DUrpuiXNWEqCvI9gj3CHIUJjtj1TWsdlbh0aJHv6dXzSvbg== Date: Fri, 20 Oct 2023 15:49:36 +0200 From: Miquel Raynal To: Frank Li Cc: alexandre.belloni@bootlin.com, conor.culhane@silvaco.com, imx@lists.linux.dev, joe@perches.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/6] i3c: master: svc: fix ibi may not return mandatory data byte Message-ID: <20231020154936.55a499ad@xps-13> In-Reply-To: <20231019222725.3598022-4-Frank.Li@nxp.com> References: <20231019222725.3598022-1-Frank.Li@nxp.com> <20231019222725.3598022-4-Frank.Li@nxp.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com X-Spam-Status: No, score=1.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 20 Oct 2023 06:49:47 -0700 (PDT) X-Spam-Level: * Hi Frank, Frank.Li@nxp.com wrote on Thu, 19 Oct 2023 18:27:22 -0400: > MSTATUS[RXPEND] is only updated after the data transfer cycle started. Th= is > creates an issue when the I3C clock is slow, and the CPU is running fast > enough that MSTATUS[RXPEND] may not be updated when the code reaches > checking point. As a result, mandatory data can be missed. >=20 > Add a wait for MSTATUS[COMPLETE] to ensure that all mandatory data is > already in FIFO. It also works without mandatory data. >=20 > Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver") > Cc: stable@vger.kernel.org > Signed-off-by: Frank Li Reviewed-by: Miquel Raynal Thanks, Miqu=C3=A8l