From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90B1ACDB474 for ; Fri, 20 Oct 2023 13:49:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377485AbjJTNtn (ORCPT ); Fri, 20 Oct 2023 09:49:43 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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