Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp420772pxu; Thu, 3 Dec 2020 03:48:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwd9oPtP+fulQuOD6KYLdECdAGlLRl/6uOvqN6nQ18vzb2v2/Cfm7p/2xii2uoWnduroyLA X-Received: by 2002:a17:906:b307:: with SMTP id n7mr2149409ejz.102.1606996088000; Thu, 03 Dec 2020 03:48:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606996087; cv=none; d=google.com; s=arc-20160816; b=ULUgpm00M1Dj6TbmADMhn/ODTosL90zngM1H9NveOmEK0Qkw3w72LwDLywDGnOsqgA uGGMe9f4qttolsdu4flrQldG9HG5gNpdTb88eR+AQ4jyzjwqefX9jLNmlTW96ePV7zpp CW8zSKPSrMevtVvYwchtxSnsKD2ZQIZzFe2ItWqkHOoYMQzt0kkw5Q1DY7hQOwYhWj5J 7pp2KvdmOGgJ2HxyzZ+rM7rED1fIyi9MkneTsG8psLxdt0DD8YI39yEiLiycVpoYZ18l nVyRqhe+2HG70yY7T+VPdtHUSAOkHP/VyYn5hcQkZ4wYxHt3VR8CG/oHL2A47a4+m6ye Yy9Q== 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=MfxZi61CCL1kARU1/n7nH9whoSlX/OiuqfTorhvl0nE=; b=R7/8nEGlB4Zcq1aIO3xRqz3oDW1RdbPzDIjqwmAx0f+AyPI3nIZ4C+TZaA9zZsHw1y mcUNdgUhXJBqlRfZ0lzIexyyf3JVP7ZG64YvGoDHaJxaTZwGt0GUjNHSj+FRD86lGcMX Qr1CI/WBmYQkAn0OzjGyAS521khKAZ9EKpYmb7Hf06atWVIrhVvy+GAKivkf53wTzQE2 zBU0sTClWpk6abTCg/gpZ1iOFqPyQYvvkZ4uK8fcCsESR0rUXUCzPYHpitGI8HX570kc kULwoCZh5SzJ4d5V3/lbHJYcz/JDLQydKIEVPZM8OMRmMVOg680UvAQPaGJ++ltg3rtM gU1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fk8rUNOd; 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 b3si911664ejp.606.2020.12.03.03.47.44; Thu, 03 Dec 2020 03:48:07 -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=fk8rUNOd; 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 S1730314AbgLCLpq (ORCPT + 99 others); Thu, 3 Dec 2020 06:45:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbgLCLpq (ORCPT ); Thu, 3 Dec 2020 06:45:46 -0500 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78D9DC061A4D; Thu, 3 Dec 2020 03:45:05 -0800 (PST) Received: by mail-ej1-x642.google.com with SMTP id n26so2999581eju.6; Thu, 03 Dec 2020 03:45:05 -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=MfxZi61CCL1kARU1/n7nH9whoSlX/OiuqfTorhvl0nE=; b=fk8rUNOdcRGdBxKLOp4tc8VQOF4t8uAWrNXy838Qp80NxsPFnnXhX+j1zHa/9AxiyS pa7uyz/pW4zrLFmrzzxKa+aQ5YGqrDJEGA5r54UhfFUh6rKmy7co0ZSgmQ5s0SOgPcoe koJuDOB4qKsWR0WrQyRixgcO7tQMAcPsilWWbTXK5T4kp33sVopqheANa/voqUfFL1Hl xHNhJxGbs74GbZzCxTSlUYcwiVnSZe3d2/SxFRiBDlHDKyGXRd88D+4W3oPX2cEJOSVd 9ABWiU2MX393XVcSr2ePPX9DZFmfod9gvCREby6NnDbjnslR3h39BY+kTDjHhDymOHQm xIKA== 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=MfxZi61CCL1kARU1/n7nH9whoSlX/OiuqfTorhvl0nE=; b=IhWlkl/RIj+r8LJQZt+dh9D18D/5IZr//nTVb33L6HjPUGubOvdLUoDUoTi52r1n5e ptbAR6e4iMc1yCnCmq+wJNSSsFc95spXeU2p97zu+FDT/k7H+5XZaesKiAviqKN8eICt W9CF91/B8l5m/AfuTXvnXu0rHbKe1Grfdh/suWkEpchmlyQI3kqdJIlSdcEZ0/d/sgiM DXkEBZ8mK0MNEVrTnyYCD5RnDKRIafaVO+k8cXEnaJt9HMyFh8/OV90Wtt1h8zPOZd6o wqlISfSUZ0GsXnWrwHFjAXkM5sDBDkGN0mwKJ2586+Iw2UKPjcazeIH6zC3+B4X38U8Z KTVw== X-Gm-Message-State: AOAM531umOAofcTK4AExP6zaasnN8YYsU75peMylodjuYyI8TIdeAg3a mHRnAes9b8A587tLZT/cxm8= X-Received: by 2002:a17:906:edc4:: with SMTP id sb4mr2086206ejb.21.1606995904139; Thu, 03 Dec 2020 03:45:04 -0800 (PST) Received: from ubuntu-laptop ([2a01:598:b905:79de:6c3d:3b27:f281:55d5]) by smtp.googlemail.com with ESMTPSA id bo5sm980673edb.44.2020.12.03.03.45.02 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Dec 2020 03:45:03 -0800 (PST) Message-ID: <2578a5fa2323f46b29dc8808b948ed5eaea6fbca.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 12:45:00 +0100 In-Reply-To: References: <20201130181143.5739-1-huobean@gmail.com> <20201130181143.5739-3-huobean@gmail.com> <2dafb87ff450776c0406311bb7e235e9816f6ecf.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 10:46 +0000, Avri Altman wrote: > > > > From: Bean Huo > > > > > > > > Keep device power mode as active power mode and VCC supply only > > > > if > > > > fWriteBoosterBufferFlushDuringHibernate setting 1 is > > > > successful. > > > > Hi Avri > > Thanks so much taking time reiew. > > > > > Why would it fail? > > > > During the reliability testing in harsh environments, such as: > > EMS testing, in the high/low-temperature environment. The system > > would > > reboot itself, there will be programming failure very likely. > > If we assume failure will never hit, why we capture its result > > following with dev_err(). If you keep using your phone in a harsh > > environment, you will see this print message. > > > > Of course, in a normal environment, the chance of failure likes you > > to > > win a lottery, but the possibility still exists. > > Exactly. so, you agree the possiblity of failure exists. > 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. > Thanks, > Avri > > > > > > > Since UFSHCD_CAP_WB_EN is toggled off on ufshcd_wb_probe If the > > > device doesn't support wb, > > > The check ufshcd_is_wb_allowed should suffice, isn't it? > > > > > > > No, UFSHCD_CAP_WB_EN only tells us if the platform supports WB, > > doesn't tell us fWriteBoosterBufferFlushDuringHibernate status. > > > > Thanks, > > Bean