Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5077162pxu; Thu, 10 Dec 2020 12:19:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTe/6tQlDWFBCgNf+PmRzsMLGq/Htz8XZ/+nXR5Ivg0waX57+/4ahbCjW9L9QlKpvTjtMp X-Received: by 2002:a17:906:b745:: with SMTP id fx5mr7789926ejb.103.1607631559068; Thu, 10 Dec 2020 12:19:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607631559; cv=none; d=google.com; s=arc-20160816; b=aHyo5L96wxnK2ul/Usig/wMo3hcoXFbR2pKaUOY2v2uq8LD8w3g67CFAUWBih2ECbe z0EbDn+OOnOwyDgFAqpQgN7gjDSDlgYZs19OAPFiU4beVXWMGw7uvAno93nPT51Mcr16 pshDN6WrSellyAAgkazIkTx3ya/HDwilarfnmbveXIwDgg2jxKwQkslDYGopuht+4z/3 ryWUixzto2QIq3L+hDQQ1/AK0dk0+LYBopeTDyRRC8yTPQo6xP6MM2yFh5ays8IiUz4d vWyTh9JZsKuz0SSBCXYaln7bKllRBWopouMMGtBjHSmB7xqy5V0KT2LE1VAbYpJDUL10 w5ZQ== 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=KXgO4GifdvzY6EhKipkwQ6+uBUGL6+vhzbZkboDddCA=; b=pt6NXwilCzpxWN215VPvi3wahkiXeruEObtKtLByMZJqjbf553fgAJ8lxagMiYveo7 2+3+z1kNo2hVP6v//wmFQtm/DAB/pzMveVrS48cCDZq+BqEVxhngnsxO14IEfTW32NGC SDr/pvDNWoYlMbW5lntgoocA9v3Gfn4zQokYlNKwvUP5JRZwT+sVjflJ6Z+OYpDdIKOD WoXKxcV+eBniKhGgYe/ZY20At3LhPNMiZG+t2alwjt247tdpBGtOumlVlacWVSi2zEBI /BtgRv4tjXnR3ORyoJP65ux3EaFSsbG/w0Io9GdmJG++ZjTziZ0hQnEQusWoPCydYXpx Rz2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WmsNWNji; 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 v26si3342463edw.486.2020.12.10.12.18.56; Thu, 10 Dec 2020 12:19:19 -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=WmsNWNji; 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 S2393735AbgLJUOf (ORCPT + 99 others); Thu, 10 Dec 2020 15:14:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393646AbgLJUOO (ORCPT ); Thu, 10 Dec 2020 15:14:14 -0500 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5211C0613CF; Thu, 10 Dec 2020 12:13:32 -0800 (PST) Received: by mail-ed1-x542.google.com with SMTP id cw27so6916046edb.5; Thu, 10 Dec 2020 12:13:32 -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=KXgO4GifdvzY6EhKipkwQ6+uBUGL6+vhzbZkboDddCA=; b=WmsNWNjivibe5aaYVi3xZhk05JAMwnMYDzjKOfG3LvdE40P1PgIFdeeiSC9NlI/gXW tvFxLq77dsSfc2htEPKcVgqtv+94wbByKlP0ykBO7ilSw6VQOiw9L/0eCcTGl4O9PEJE DxzZ/6NoenqqvfI3n7flqhrwjcn5LZ45Y0xbRMwc3QnpvSp863hHiDWpdZVDlIH9IKeU PqInxmeGuy+7Ky8JrP2+y7ERwQZsbBNA1ky5HSNaXs3VtAYDDmHpEFZzWRanyK4B7oFf 7X9zOzNlahFR46VsZCWstPdnHGF9QTzhCl022C0ThMYbD9GIO8pOWmjw0KWzIk5ZblUn I3VQ== 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=KXgO4GifdvzY6EhKipkwQ6+uBUGL6+vhzbZkboDddCA=; b=l8l3HIOd2G9LNLHYhesoD65akrUqqHBRxe5SFlGRd9qS8tVtvL0eI5YIc4TRWUMx0F 05XiPT7GmAw5/PdEkt0FFp7RDhe3HjTjiEZtwq7dqBTTDdj131HFL2o3IiiLdvKKKElu RXynDGBRlr3otbgck7CfbsOZ5HuP85qRHBOliinJCOvLGPMy8T+dE/GU8BtKcoqqv1Z6 6oZFhs6E9AmuOzexldnLTfowUje3x5Eq/1PLsRNoVyl0d49+1EpGu+mwAv0d70jKRLLr MYEKIiMBFPV8pQ6/sIaAIq50n92lMtv64KWCwxSmzJbi41Z+wnWacRUf5PHrkLiEDYdd tFGQ== X-Gm-Message-State: AOAM530OEu34Ad+2ETB2n9nk54gKlEZKNmKK1JVApjZwo9FYumsNO8c8 ZaejXPLfWL4dEJ5dXsu7uY0= X-Received: by 2002:a05:6402:3074:: with SMTP id bs20mr8518860edb.365.1607631211331; Thu, 10 Dec 2020 12:13:31 -0800 (PST) Received: from ubuntu-laptop (ip5f5bfce9.dynamic.kabel-deutschland.de. [95.91.252.233]) by smtp.googlemail.com with ESMTPSA id m13sm6043570edi.87.2020.12.10.12.13.30 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Dec 2020 12:13:30 -0800 (PST) Message-ID: <7542e8637f2eca65e87e74c34b2203a3fcd4bb80.camel@gmail.com> Subject: Re: [PATCH v3 2/3] scsi: ufs: Keep device active mode 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, 10 Dec 2020 21:13:29 +0100 In-Reply-To: References: <20201208210941.2177-1-huobean@gmail.com> <20201208210941.2177-3-huobean@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-10 at 07:46 +0000, Avri Altman wrote: > > > > Right. > But it is a small price, and you no longer need to worry about rare > error event. > Also adding an if (fWriteBoosterBufferFlushDuringHibernate == 1) will > allow some more flexibility, > e.g. shutting it off from user-space (ufs-utils), unlike today, > that it is categorically on for all platforms / devices. > > Anyway, if you decided to add new capability, > Preferable to do it in a different series. > > Thanks, > Avri Hi Avri Thanks. This reminds me that ufs-bsg is a latent defect. Currently, userspace can pass any raw UPIU commands to the UFS through ufs-bsg, ufs-bsg is a pass-through channel. So, fWriteBoosterBufferFlushDuringHibernate is not the only one in the ufshcd.c can be changed by ufs-utils. any flags in the UFS can be changed by user-space tool after UFS finishing its initialization. This modification after the fact (Linux initialization/probe itself) is not legal. I remembered we discussed this on the eMMC case, the same with here that, user can change some parameters in the eMMC through eMMC Ioctl, the user feels great, but they did a wrong thing. Ulf Hansson: "I don't think it's worth to compensate and try to act accordingly to cover cases when userspace has messed up." thanks, Bean