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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B6E52C25B78 for ; Tue, 21 May 2024 15:24:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=l6lL2qYVE2OIHh6FftiyCEpzWECATgy03pK6T7fHjNg=; b=DUqOOYhN2INFJI +m2y9A/CJfVDkWijJZvNeGed672vpzzvz8JlWFtSBEQuIc+ikJAo2VibwoHZpBQ/f/Uj2bSQf2ZN9 RBs9+LX4r6Oca7g+hFb/OwNK4JYydMp8cXAVc/aRFfF/2Qoysli2sX02RclYFldl16uGU9ZIMmoD6 xG+aSRA/RGxl6v5Jyu/2I+BPiojbVE9ZxzknjqMQHaHp9/Nq6EP4A5iYrsBgXwccmTjtPcxqHB/qn 0Is89cMJvcCeyOwjCzlmz/eXvmrlsSCQ5/n6Vbcz3goo3nAgvAIvgZcr64k47g/D9lc0DUNna57rk X7Ywdx8prkP6UdQZHXrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9RM4-00000000Kcg-1NlN; Tue, 21 May 2024 15:24:44 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9RM0-00000000Kby-3bON for linux-arm-kernel@lists.infradead.org; Tue, 21 May 2024 15:24:42 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id AFF1560E76; Tue, 21 May 2024 15:24:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08FF1C2BD11; Tue, 21 May 2024 15:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716305079; bh=LT2IUGSarwkRVytFH/RJkbdqTKdlRHx7kjBBbCwkZOc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=w1lSHUlEHNdUOwtpggmkodjLPq5e6XoEd/jeTIGLtlAfkWhwgojNAbWSwSm2MoGXx BPRZblVE/xwREaXWcgKfJrruhZZE1XuVVN57yD/06Hwa70krn0wGvgrH9DjmwaWiwq U8MFpltI8aA428Idvt85wdfvGhnWEZdckYdrcX+k= Date: Tue, 21 May 2024 17:21:26 +0200 From: Greg KH To: Fabrice Gasnier Cc: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH] usb: ucsi: stm32: fix command completion handling Message-ID: <2024052113-vanilla-expectant-5684@gregkh> References: <20240521151109.3078775-1-fabrice.gasnier@foss.st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240521151109.3078775-1-fabrice.gasnier@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240521_082440_968118_37F20EDE X-CRM114-Status: GOOD ( 24.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 21, 2024 at 05:11:09PM +0200, Fabrice Gasnier wrote: > Sometimes errors are seen, when doing DR swap, like: > [ 24.672481] ucsi-stm32g0-i2c 0-0035: UCSI_GET_PDOS failed (-5) > [ 24.720188] ucsi-stm32g0-i2c 0-0035: ucsi_handle_connector_change: > GET_CONNECTOR_STATUS failed (-5) > > There may be some race, which lead to read CCI, before the command complete > flag is set, hence returning -EIO. Similar fix has been done also in > ucsi_acpi [1]. > > In case of a spurious or otherwise delayed notification it is > possible that CCI still reports the previous completion. The > UCSI spec is aware of this and provides two completion bits in > CCI, one for normal commands and one for acks. As acks and commands > alternate the notification handler can determine if the completion > bit is from the current command. > > To fix this add the ACK_PENDING bit for ucsi_stm32g0 and only complete > commands if the completion bit matches. > > [1] https://lore.kernel.org/lkml/20240121204123.275441-3-lk@c--e.de/ > > Fixes: 72849d4fcee7 ("usb: typec: ucsi: stm32g0: add support for stm32g0 controller") > Signed-off-by: Fabrice Gasnier > --- > drivers/usb/typec/ucsi/ucsi_stm32g0.c | 18 ++++++++++++++---- > 1 file changed, 14 insertions(+), 4 deletions(-) Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You have marked a patch with a "Fixes:" tag for a commit that is in an older released kernel, yet you do not have a cc: stable line in the signed-off-by area at all, which means that the patch will not be applied to any older kernel releases. To properly fix this, please follow the documented rules in the Documentation/process/stable-kernel-rules.rst file for how to resolve this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel