Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp450756pxu; Thu, 3 Dec 2020 04:36:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmIf+fOHofW+Iy6iBQ3Z3bef9iLQLIyOu1QSpEkaD4vUqnfAmJW+r0LrpiWETNuqAj185E X-Received: by 2002:a17:906:a183:: with SMTP id s3mr2407817ejy.60.1606999000401; Thu, 03 Dec 2020 04:36:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606999000; cv=none; d=google.com; s=arc-20160816; b=gwRFAhfmZSpdvnr9k3M1xMh3NWAbYlQIKGLeJyyNHLtjAKZiPfZAr7CkfQmMaf+DpU YW+CJJ5PF7zWO4i7wkrol8Mh8aP0JDm1mBipR7h967yzwc47QyIJUxa05l+hZ6SARNzd gDXIMmlS9Z116sg1ig3tcQpmN5I4JkoGspIqSonZmcnaMo5wW9dMDmhsWCrr6RePQEpd ydLJMJvCgMsxOMBl7201zlX1/41MbjwHncb2VL+2JTWDEYx/fQ05GHUCsyhvQxGcBBTV ZjV5Fs+WGo9m6dfuLMH9+1DcuDPl/ymqrxC6oiSw4S6AY8qS0adRa58G71iHGAiarD4M P3kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=G7EMVCQFdO/l7+xXFqfNviq49dXz5V317P0jmeOaabc=; b=QjZD1EMRHBLWuiqMTiQIZZ4XI4rdMzV75SdzjkC9hwKkT+EzaYgnXUkEfA3ZRHlzGk eeTXAJ6heUFUHAdbDFYktd80m/yDcSBeb2q90uA47+Y1AVJhbCYcrxBXgWvNAnbEejvq Zom/q+Rt5eRN8QI63cq/7AQylvxP0p0hbxnpNSALXQfYRR5VuO1/l9oHNVce+ULB1/D+ lapnaE4qlMz63ttg570zDl4/JumygjckTXKQ/8uC5k8jBxzGUXMyBMoy6lYGIbGtrQbe KiiPGZ99vGuVkxd3ZB0t7ofJFIAKXm7OsCK3eqx9fEVBVfRUPoxqiQbICy+RKjEJzRkP sfUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H7ytE7HH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t2si1063154ejd.302.2020.12.03.04.36.16; Thu, 03 Dec 2020 04:36:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H7ytE7HH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387778AbgLCMcY (ORCPT + 99 others); Thu, 3 Dec 2020 07:32:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726213AbgLCMcY (ORCPT ); Thu, 3 Dec 2020 07:32:24 -0500 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A65CC061A51; Thu, 3 Dec 2020 04:31:44 -0800 (PST) Received: by mail-ed1-x541.google.com with SMTP id b2so1907456edm.3; Thu, 03 Dec 2020 04:31:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=G7EMVCQFdO/l7+xXFqfNviq49dXz5V317P0jmeOaabc=; b=H7ytE7HHdtRggQc+72AxsSmd1kZOtSSvRS6MJuSFSSmMiFbASHNy00x4wpAB8SQ9pG oL4ttJdLKcWwRWEXu8pGz08keZ1cz//0wcUlmdDQGB1an6AUHMhZ0Jc0F6Z1tGCnEWeu 22c/ovfRNLLSNsR+hex8NffNI/O+kqtvrBK4Hth+rgjFJ+8hqn3yGRA3TcCp1BVkzqLp vvWjrvgZder3og/LqMLnRRyrbXiGIRYtEQH936a/29lXq+5xn2h1BAwOqRrqrNybMi/X Gj7lwenhLK8CrEMSQMpoK4REb5XHl/0RL4WnJCdqGZfnArrLGJLXsaNFjnrFNt21emEW U0/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=G7EMVCQFdO/l7+xXFqfNviq49dXz5V317P0jmeOaabc=; b=cQbwleKmcMnAL/+vkR/GRsvtTAi0Ib52MB0XWcyZzQN1luC0qIOXG5Sf+3mBBxsbVT L+UWXoeI2TGtWIBwbuQ8uwmMl1LbAEoZ87AG4Nx8iHZOMLaVpraxg6DjSbjorvuC2qRj UJU+VUCNxBgEPEBv7ZpFnh1tk+MpYXcDvvCX5aJSI2PEoncl2Q2xA42pV0y6ZvfCHBoK D9AUZqZM1azaggdNNp4v+PKm1+crHg30WFFAOEBpV7EJDyn+5dSES8+JZ12VdgWLg/2y N690JoqTUkcUQk8IFX3B9u3H98tqCHoUVCr0VPPnE5ZOTL3A5DP7++bl4cBADpsmXZi+ pq8A== X-Gm-Message-State: AOAM5318Q7ce7mBZAZ7Q3FST4bgDp8xB1toNXL4YsMI6BB3i3q41ubvV RcRgNxB9MttJm28S69lOWoQ= X-Received: by 2002:a50:e688:: with SMTP id z8mr2658883edm.129.1606998702824; Thu, 03 Dec 2020 04:31:42 -0800 (PST) Received: from ubuntu-laptop ([2a01:598:b905:79de:6c3d:3b27:f281:55d5]) by smtp.googlemail.com with ESMTPSA id e19sm1069738edr.61.2020.12.03.04.31.41 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Dec 2020 04:31:42 -0800 (PST) Message-ID: <5b26c234d357512c0bffccf733d6ed8c5dd3a517.camel@gmail.com> Subject: Re: [PATCH 2/3] scsi: ufs: Keep device power on only fWriteBoosterBufferFlushDuringHibernate == 1 From: Bean Huo To: Avri Altman , "alim.akhtar@samsung.com" , "asutoshd@codeaurora.org" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "stanley.chu@mediatek.com" , "beanhuo@micron.com" , "bvanassche@acm.org" , "tomas.winkler@intel.com" , "cang@codeaurora.org" Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Thu, 03 Dec 2020 13:31:40 +0100 In-Reply-To: References: <20201130181143.5739-1-huobean@gmail.com> <20201130181143.5739-3-huobean@gmail.com> <2dafb87ff450776c0406311bb7e235e9816f6ecf.camel@gmail.com> <2578a5fa2323f46b29dc8808b948ed5eaea6fbca.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-12-03 at 12:15 +0000, Avri Altman wrote: > > so, you agree the possiblity of failure exists. > > I was more relating to the lottery part. It doesn't matter. even the possibility of winning a lottery is very low, but still there is. > > > > > Hence we need-not any extra logic protecting device management > > > command failures. > > > > what extra logic? > > > > > > > > if reading the configuration pass correctly, and UFSHCD_CAP_WB_EN > > > is > > > set, > > > > > > UFSHCD_CAP_WB_EN set is DRAM level. still in the cache. > > > > > one should expect that any other functionality would work. > > > > > > > No, The programming will consume more power than reading, the > > later setting will more possbile fail than reading. > > > > > Otherwise, any non-standard behavior should be added with a > > > quirk. > > > > > > > NO, this is not what is standard or non-standard. This is > > independent > > of UFS device/controller. It is a software design. IMO, we didn't > > deal > > with programming status that is a potential bug. If having to > > impose to > > a component, do you think should be controller or device? Instead > > of > > addin a quirk, I prefer dropping this patch. > > It seems you are adding some special treatment in case some device > management command failed, > A vanishingly unlikely event but a one that has significant impact > over power consumption. again, there is nothing with device. Obviously, you didn't do system reliability testing in harsh environment. you don't believe this is WB driver bug. I will send my next version patch with a fix-tag. even It cannot merge. but I want to highlight it is a bug. Thanks, Bean