Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1846861lqz; Mon, 1 Apr 2024 21:46:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW2EhNuSomQr+JzLH/jxnd3XK/AB6EQKIjJ3f+7vtOSb5MgjV2ooQv6uCQcUU6UYOnBo4NMSLUEs4FI/shHWAv7OqKFgUyUfjP7mrQNQg== X-Google-Smtp-Source: AGHT+IES2iMnSmEDMNaBfUKta1AQwMH7Fzqu0qQHAjdb/FnPokhWepbQ7lQ3aQAdno/HAeYD0gjy X-Received: by 2002:a05:6a00:cc5:b0:6ea:b82d:6205 with SMTP id b5-20020a056a000cc500b006eab82d6205mr12553139pfv.16.1712033215228; Mon, 01 Apr 2024 21:46:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712033215; cv=pass; d=google.com; s=arc-20160816; b=d/9OQjEeC+bEtz5jr64h2NKY11KVR+weFiGQr0iGmB9qqjH/xYF6QYSsuRpRIS58/h SnDl7UD8LWxiyTJbloGA1PuWDw9etq5cTvI+HDoHm8YXZjQNZOSdpOhrdBTAzNWjCNNk ZXjwYCwhqyNjDR8QLVfcxMO2R97sa7bNK4/wCU5obVLT0IOa0FtcmDKN0+WbNJr3tK+s RKXPxZ+TjzcIM90+ZLwdCFcLFI7W2DdVVwkD8UBJkOp6hiOh5+KCLqR5VUXKYOoNhfgt djoUzYC9SaL1C8JvU57lCU7BG7cfSWgWYIweN6wFUP8NMwfMkkx2SwYd+3urScG6/bT4 yCTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tjjYdxaRaJDqRViwNMBfS3Cu5poPDvA/Upm/rqoP+Ug=; fh=PiAPv5rqktdoNjcVGf1HreJnTtcDSG4q4VtmHm7u3io=; b=c3I/QEQ+3DEnDI7sQZW3Dxge4xAGpXQlTFgjoaayvoWh4IOLQf+Ezb0W0PnuK8cR1D adeiRT3xAWXkYKz2kKCUhQ22mL+tOY9ZDzGijQmD14rKk/u+fIs1vOCOKmL6mb2SWMic WP+zDy+ikTdEkyxyv+/O7b+cga6UDrelBrTHMy2Oh9wwMzhhCPd5JcYZviVBufh4Yrk6 0jIc+gu9bIodC7IO5oYMSTATcwa355yTwGvTkjIuNIfEkAVtTV1ISbIM3ZTUxAuB+2OQ zvpeQ7aOB/Bc8WS5wTBtANf1uxYHlDu3NJMv4AzjNVe4QaeJQPtOKqt6LzhzdKCvaAfz QEqg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CXil8fMW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-127386-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127386-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z3-20020aa79903000000b006ead3c04cd3si10483620pff.62.2024.04.01.21.46.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 21:46:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127386-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=@kernel.org header.s=k20201202 header.b=CXil8fMW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-127386-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127386-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 E545C28566B for ; Tue, 2 Apr 2024 04:46:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2C0117C96; Tue, 2 Apr 2024 04:46:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CXil8fMW" 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 E1C6113AEE; Tue, 2 Apr 2024 04:46:44 +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=1712033205; cv=none; b=kH3bpUv5gk4bcn+9FVJWkcCtcuk+cAJJKwb0iIfN27HLA4+SbSpr2pJudaQoSDkZ4irBQw2Hi6KvpQmSA48Xi2xmXF/grrnzvG03q0hhC32IAD+pU+DFDO6AC+qgkh69KtaKKR8rD4DDsLfG2KSLSrVQww6/0lHS//ho1/vY4t4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712033205; c=relaxed/simple; bh=lUKvUdmng502E8VV5NpfE2lmmjOMSsIYuwLta/TI1Xo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mBe9TmuBpH2rn5H7863lo6w1URodO4WYBbc6PCs4pAF518Z6X/dYnKcN7nKhhxvMuh5Z9SttpYOjlEtAaMKg+nkT7UFCqfYYsq2PCvXVnA294bH38DZfyAKwTJtCKD8L0fOGBkQ7ktQhChQxK81xpTK6FA97AkEv0KNK433Nkeo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CXil8fMW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DE26C433C7; Tue, 2 Apr 2024 04:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712033204; bh=lUKvUdmng502E8VV5NpfE2lmmjOMSsIYuwLta/TI1Xo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CXil8fMWVLzd/X9doPWVhGvm55DnnKrQEe37GZzXd3Wrfq6g1MNdJzgBlIEJI9SBv 0qwRQNM9LhXzhSk+k2+YUsV8L+pCrTNnf1YF8voBAjKahhhJwd27Z1HakERTbxfTNn U5tU1AET1DTTZL8TRVRWfUQOKtp/vhUkeA89CEAwCPHJq1hDZ8xyIOzbAa2fq2I47z CfTghdvyhYfUioQmwvw0UgFxQBEEHLa8efXEDi9YDnNkU34gawdo7Tnyi9dfwM+gz2 GoiDP9FLAQuhwjbQ51qT6sRU5VOLegABRfYX3yU3D0BS+NSslz2zwfhGRpxfST5v8H 2hXBiXbrr9AvA== Date: Tue, 2 Apr 2024 10:16:35 +0530 From: Manivannan Sadhasivam To: Andrew Halaney Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , "James E.J. Bottomley" , "Martin K. Petersen" , Hannes Reinecke , Janek Kotas , Alim Akhtar , Avri Altman , Bart Van Assche , Can Guo , Anjana Hari , Will Deacon , linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 03/11] scsi: ufs: qcom: Remove unnecessary mb() after writing testbus config Message-ID: <20240402044635.GC2933@thinkpad> References: <20240329-ufs-reset-ensure-effect-before-delay-v5-0-181252004586@redhat.com> <20240329-ufs-reset-ensure-effect-before-delay-v5-3-181252004586@redhat.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240329-ufs-reset-ensure-effect-before-delay-v5-3-181252004586@redhat.com> On Fri, Mar 29, 2024 at 03:46:45PM -0500, Andrew Halaney wrote: > Currently, the testbus configuration is written and completed with an > mb(). > > mb() ensure that the write completes, but completion doesn't mean > that it isn't stored in a buffer somewhere. The recommendation for > ensuring this bit has taken effect on the device is to perform a read > back to force it to make it all the way to the device. This is > documented in device-io.rst and a talk by Will Deacon on this can > be seen over here: > > https://youtu.be/i6DayghhA8Q?si=MiyxB5cKJXSaoc01&t=1678 > > But, there's really no reason to even ensure completion before > continuing. The only requirement here is that this write is ordered to > this endpoint (which readl()/writel() guarantees already). For that > reason the mb() can be dropped altogether without anything forcing > completion. > > Fixes: 9c46b8676271 ("scsi: ufs-qcom: dump additional testbus registers") > Signed-off-by: Andrew Halaney Reviewed-by: Manivannan Sadhasivam - Mani > --- > drivers/ufs/host/ufs-qcom.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c > index 804dc8153e7b..649fada24345 100644 > --- a/drivers/ufs/host/ufs-qcom.c > +++ b/drivers/ufs/host/ufs-qcom.c > @@ -1445,11 +1445,6 @@ int ufs_qcom_testbus_config(struct ufs_qcom_host *host) > (u32)host->testbus.select_minor << offset, > reg); > ufs_qcom_enable_test_bus(host); > - /* > - * Make sure the test bus configuration is > - * committed before returning. > - */ > - mb(); > > return 0; > } > > -- > 2.44.0 > > -- மணிவண்ணன் சதாசிவம்