Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp369119rdb; Thu, 21 Dec 2023 11:26:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IFoyLEKvZLa+gJbm1VXpiqORDEpB8chdzjFjHgerpj3EpEQCFoXaDgAqYWGD7pcacpWDIKI X-Received: by 2002:ac8:7d10:0:b0:427:8dcb:284 with SMTP id g16-20020ac87d10000000b004278dcb0284mr319361qtb.94.1703186766560; Thu, 21 Dec 2023 11:26:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703186766; cv=none; d=google.com; s=arc-20160816; b=bY0gHl/JA+Hz3kcwy89VTgpGYCR9KKvL0CNJu+FLBm9i0ItusBHQFerrVevB1wdiO/ 0GTgRjKrcgwHNneEXbmIPYacL/JtocZoNbGA1baM9MM9RXZXDrkSlx/++Zsw7FkToQqt 5HcYTun1kEoAcq0G7gfdCIygRUpmD4/4tDT0ud2M/1kM/JUtVTGAzYQqWFGM0Pqx95b1 VJFZO1XTjOa5ad8s/bgNkzdvtfkicnKoWiMpds043BM0isFdxGDOjnAy+aIjxLYXUPFV vEZoDHgY5sG9pAO4tFlCxhWh+ZI0ICGtRNLSauQgzKJTuToLLXcGcs4W/N/BTHd9KLD6 +6KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=BbeiS+nR5HLz0VyzxksNmQP936OjapFJccP6nWbsbVg=; fh=St3gBNrE8qj4SMa3Y0xyhxPw88DcH7AOacWDC6HX5R8=; b=l0ZUCD5QtNUj6vu8wEPHsyqh4K38Ud5wCmmoS7FFUxiOmqBDUyynpgZuufrSIegg3v ygQt4wgNhLS2sdqpV8sL/trE0h5eoqfmba5480aVT9ut6F8wEQvzPb1W6cm2DNBePCI5 58UY4UF27WSNTSHFpmNXRR/yrXCr/QRMcDMbCgkK7jLd6x0qrlKA91U2XyWo3iHtkVP8 kgLX4XbSFF9HJB8/jtu8u5Zs+vyj8ZQ8fcpNXZlXeeww7fuVp3rcEyCGRgQPvcbanG9k XVODvkWI6APRjdP7guCZXL87vXyTR4g9S9yCI/n7zSNH/jxEG6B5UklSyGcrJCfwzbiv hVCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8995-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8995-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b3-20020a05622a020300b004278648881bsi2683767qtx.369.2023.12.21.11.26.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 11:26:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8995-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8995-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8995-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5019B1C23A60 for ; Thu, 21 Dec 2023 19:26:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F31D2697B1; Thu, 21 Dec 2023 19:25:55 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FA4765198; Thu, 21 Dec 2023 19:25:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1d3e05abcaeso8466645ad.1; Thu, 21 Dec 2023 11:25:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703186753; x=1703791553; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BbeiS+nR5HLz0VyzxksNmQP936OjapFJccP6nWbsbVg=; b=joiwnadZzEP0UHX9FvH2iZLpwlDLkJ/RUjal2dsxpIoACVE7FK7BpUEqECV7AFArAI 8XcuhJYenrFrPX0Tg+5Uyqx6QN0PUrEM9HwAsk4aQyZfjBcBRSmF56zlUhybZI4Bm2fO o9WzMKhySTSO9Y4T7/kSzWoDW83rBn3ghAmWLkqcv0m7ejg9kZalKRPf+rPS+srryDEb /zpmvgiUE8P4I7i6u9dyMn4ei9/452aWfaYiA7nfDHvNwkdyYprxzRkBR3OgOuZPSokZ hIJu3CSVR1eZW+4eyZvbd3/4ST86jCWW8Sg9v45hPirr+34NHiZLPKEtTJNzCBuH7By4 3ONQ== X-Gm-Message-State: AOJu0Yx3/NXDly5roU91n2MspLX6MDF0uXiSzvgnvMKfdwo7XRROyh0R KnrhkeYPG1kzn6EFNE0cKKQ= X-Received: by 2002:a17:903:40cc:b0:1d3:4860:591b with SMTP id t12-20020a17090340cc00b001d34860591bmr168869pld.0.1703186753353; Thu, 21 Dec 2023 11:25:53 -0800 (PST) Received: from ?IPV6:2620:0:1000:8411:872c:d7b7:41e9:3edd? ([2620:0:1000:8411:872c:d7b7:41e9:3edd]) by smtp.gmail.com with ESMTPSA id x7-20020a170902ec8700b001d08e08003esm2004315plg.174.2023.12.21.11.25.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Dec 2023 11:25:50 -0800 (PST) Message-ID: Date: Thu, 21 Dec 2023 11:25:47 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC v3 11/11] scsi: ufs: core: Perform read back before writing run/stop regs Content-Language: en-US To: Andrew Halaney , Andy Gross , Bjorn Andersson , Konrad Dybcio , Manivannan Sadhasivam , "James E.J. Bottomley" , "Martin K. Petersen" , Hannes Reinecke , Janek Kotas , Alim Akhtar , Avri Altman , Can Guo Cc: Will Deacon , linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231221-ufs-reset-ensure-effect-before-delay-v3-0-2195a1b66d2e@redhat.com> <20231221-ufs-reset-ensure-effect-before-delay-v3-11-2195a1b66d2e@redhat.com> From: Bart Van Assche In-Reply-To: <20231221-ufs-reset-ensure-effect-before-delay-v3-11-2195a1b66d2e@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/21/23 11:09, Andrew Halaney wrote: > Currently a wmb() is used to ensure that writes to the > UTP_TASK_REQ_LIST_BASE* regs are completed prior to following writes to > the run/stop registers. > > wmb() ensure that the write completes, but completion doesn't mean that > it isn't stored in a buffer somewhere. The recommendation for > ensuring the bits have 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 > > Let's do that to ensure the bits hit the device. Because the wmb()'s > purpose wasn't to add extra ordering (on top of the ordering guaranteed > by writel()/readl()), it can safely be removed. Reviewed-by: Bart Van Assche