Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3158405lqo; Tue, 21 May 2024 08:24:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXyKiDpzqa9uiegjAz48m9/EVPfj36FKrprF6Z3y72Njm8EoY3x5Qw64xWLIj/PxavidjGzq2VO9ERKirNIBqXU3Y2UpM0tLneSsFjs6A== X-Google-Smtp-Source: AGHT+IH7Zi7lk4xtl3PBjKKj4ERDnK/cTRnBFi7+16Vle0qP8ODlWwl/Cr/dqkyalHbF2FLPu8X4 X-Received: by 2002:a05:6a20:5504:b0:1a9:da1f:1679 with SMTP id adf61e73a8af0-1afde0e20f6mr29308354637.34.1716305089833; Tue, 21 May 2024 08:24:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716305089; cv=pass; d=google.com; s=arc-20160816; b=wdUCIFhREBV/qmXDiL4Jrb1hkW80IDlMFeEUdUnfGutKB6reJns6ZDTRqWN3bx1/1x zZI3mQqRtBA+VwU7RrTDFIItPyoqRh/mBKzMOKJWN3LxRg2PmRHiniax4EVGpwGnTkk/ l/4fKx2qM2qJFvinAxnIEqwWX5njHptuMmvaFQE/pxFy0aI+w8HhCVcTpdCWwgikouJw h9F2f+PJjtyYCtXI2oKfM0WYmPbUkHDI4sMRW6TKumFc9Q3SHYJM95pgnMxtSuXHrwLI wOo0nKHkbfQzU9acNAGqbcyPTG5K10Lodp2nCnRD4VtdN2ADPi+smK6XXcDoLcBjiFyW ao8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2uwWYGWrVz76GBxKvdZmYdUHyLQiXe1FhQZF+wqQtcM=; fh=ndQO8PdsazWPfDEnda9pabRx7BhnfzS6Z5sp0fUr7Lk=; b=VAyx57doxcjZ1mRzHWK9RhEOiNTtaX9OUUNpABEK/UOKNwBmDBVMR74+kIyzoPPMr/ 01H6w27QYeRUSdrvpPwXWbW4jsXLlLMwhbgUVKgV8+19wdtuOR4GGf+cHjscWb6vC2mp +YmH1wP+DcJkL7u8TzsEbytMSnG2hJR/Vu6GfYi/+Wctmrr2/r6yDQM25GexuHHzDqOl lzlh0MQ1k0Q3EtnAOyjL2JCJ8jV4UDcSXUnkANuJKdlbI0sEhbWuGLcATsozVZ9C8mqO TkHJ4kSoFKGuN2NKbwAzOVuQxRG1PObDuCG/U9euoTkf2UN1UZENIjVNm6iy0lcxEy9E RHvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=w1lSHUlE; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-185145-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185145-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63409e823e9si23465739a12.73.2024.05.21.08.24.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 08:24:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185145-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=w1lSHUlE; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-185145-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185145-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4384028348C for ; Tue, 21 May 2024 15:24:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A24B1143C77; Tue, 21 May 2024 15:24:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="w1lSHUlE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C02CF7EEFD; Tue, 21 May 2024 15:24:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716305079; cv=none; b=SXz3RSwgaA3DoyiKeGESMwrgfL72VCoRTcIshlDilILeJs+cnmizxSEDmFbMokJP2jPW/muoEMfzRc1Go4IJgh0YxLrPTHaok2dAMr2dhA+yjseEcUp33sTk7RMVC1mnnSG5VoszXV6U35cuchbQAGzyfHtd73HZiyfq8JPhoI0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716305079; c=relaxed/simple; bh=LT2IUGSarwkRVytFH/RJkbdqTKdlRHx7kjBBbCwkZOc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hPXyNZtz8hGJgUbP+YsFDE99mWoFIt3WQRFcrTwKVBR7NXdjyGgYTZ/dhAhpY8bx8fYHxgnf/VJaCWkO05fldg9W/Z9JxkTnb95TzZEcZ1g8Z/rrEGb9W/HNI9Tz3EC/1G3wudO9zTo6TwRadJ+37QW3vxIEK8xNeb/QLEy1vls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=w1lSHUlE; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240521151109.3078775-1-fabrice.gasnier@foss.st.com> 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