Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4323508pxu; Wed, 9 Dec 2020 14:10:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZ0mzK6xpZtdV7P+u+c1jJ0kkRaLEy5xjyZamn76fNaYe9rkAQxrN/c1LEFJ7hIVeyYJrk X-Received: by 2002:a05:6402:2070:: with SMTP id bd16mr3831781edb.107.1607551823353; Wed, 09 Dec 2020 14:10:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607551823; cv=none; d=google.com; s=arc-20160816; b=ZzqeFxxT6g2PcmU7teCAIsqjLYuBT5YpiyI68yQCswO+FmILZPIXLPU5gJa+KhAtEq REqM6i+2yRtHSUUkqWjytDJj7T4h2Jc5Hxe7Lex7+/Y49+x2IYhIVZ6tj0OjO9dR+AyL q/TGiTNQBeEirHgzAbcBKKYrsGlYJjYkdUqxUSmgcMMW+SZtabhn5sS4mdhhfChTDaiZ CsgV/C8RNFqnvO54KrHQScrxR+CA7a8Zorj5Wc4cDicgH5ZUT5o8Ra7hBL2kO/nZnoos 0z9GBTAkkWMvQ9xBlBKmwfSTh6nfAFAvm9wMC6urif2Lj2oafzeakZXvASKxyN8NljlX YPiw== 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=KbgQU9crSSKMI3WB4Hb7AvXbtn3o3JSe9ktRkCdRqIY=; b=FD0NnFTpDoosQIskpz8l2ePsd6pmXTuGgf4MPHWwpBWhrXKwP0yoVBkQwp1xh/RiJb 3y3YY4yXIOyoLysHN9KUKC0sOmlLa4MgD3d8prLKQZwL6F2Zd1N9UTLJ7JQJoG1G8rTV jrQpWH/mL1oxNho5Q7wH7pe9IvT2wCY9+oXHArMrQZ4REWq7/elgJM6Cg2H1cnxGbzaW krFrzYHy4EEw8U4ch1c2MbdShPft5j0tJ+dkSMeEprE3zR1/KPzS/SrNzSRWpf/M+wv3 p4dijqY/lpIJsrEHoYUCf523TILPdAF7BwI+J/f/C1ofY3Qn5lEcMocqhroJHTqRFPhi nXtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="POyEN/ds"; 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 s2si1547631eds.424.2020.12.09.14.10.00; Wed, 09 Dec 2020 14:10:23 -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="POyEN/ds"; 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 S2388426AbgLIWE4 (ORCPT + 99 others); Wed, 9 Dec 2020 17:04:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388410AbgLIWEp (ORCPT ); Wed, 9 Dec 2020 17:04:45 -0500 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8961AC0613CF; Wed, 9 Dec 2020 14:04:04 -0800 (PST) Received: by mail-ej1-x643.google.com with SMTP id n26so4414822eju.6; Wed, 09 Dec 2020 14:04:04 -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=KbgQU9crSSKMI3WB4Hb7AvXbtn3o3JSe9ktRkCdRqIY=; b=POyEN/dsgfu2zRG3mv00xUXzVN2f4g8dTfAThMUG+K9hJ/iDpEo2Hg05IJyWUQsdA/ SuIuJHGf0/We4B2vIouOng08tqghpKrGTzHZeRQxCiwI68wdIdDHuQSx9EaCHPMXL1R5 VXSO+D+czQaCf4qcvCMgiGcvOsdH2b7Ox3+1gSu2CLF0nCa3VGSiOF2FsT1HuDFgPpF8 1ojyin2AkfDiWIA1ElK3hbEbYSsT3XeF0+gqXtnHXvXaC0yLORVXGjHa3puh0/WsvU4T zrrKfRsDbxfkNfbwFvKpNDKypi45gBy18SXJlP5yQpUSFdqIVuVXP16Q1HpFswewhISH 9Apg== 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=KbgQU9crSSKMI3WB4Hb7AvXbtn3o3JSe9ktRkCdRqIY=; b=Gdd8IG1CeCaJsTc0u85Ma+NQhKL3TYiW0CP5coUynQi5zjX5WxxSrJvXSCEO+EaTqM 7i4eL/QGWFnKaaDYyUm0cljXViPDhN0VPQjK1mmM3Y39V5CEFTKfWqhQEarrPemJODyd cXMKMNjqGEIft/bg5E6ry0ZA4kJTAv+yx8FeWYj6v0EC0jlKK1fPh+gzLA4RtAA9LyZB eVFgoEqgfPl8OHh0RtxQFlvx9h4Toka1wSy2ib5mRPkzbpVTrS0f4lMESeK41c4SJFzW QqohQu8JvDT8jc4GjeLsmfXlyeHXrUX8t5PRaXtp6HWM/qmr4Hw0cHZjfVu2t2BavsU0 0+Tg== X-Gm-Message-State: AOAM532mv5twf/2jDQiB4AriuPme7UyMFzju0JYZv/NiZIi1AYaS0drU HLOjDptzzYdsCXuxplsjqts= X-Received: by 2002:a17:906:f9da:: with SMTP id lj26mr3727964ejb.467.1607551443327; Wed, 09 Dec 2020 14:04:03 -0800 (PST) Received: from ubuntu-laptop (ip5f5bfce9.dynamic.kabel-deutschland.de. [95.91.252.233]) by smtp.googlemail.com with ESMTPSA id z26sm3004027edl.71.2020.12.09.14.04.02 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Dec 2020 14:04:02 -0800 (PST) Message-ID: 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: Wed, 09 Dec 2020 23:03:59 +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 Wed, 2020-12-09 at 07:40 +0000, Avri Altman wrote: > > According to the JEDEC UFS 3.1 Spec, If > > fWriteBoosterBufferFlushDuringHibernate > > is set to one, the device flushes the WriteBooster Buffer data > > automatically > > whenever the link enters the hibernate (HIBERN8) state. While the > > flushing > > operation is in progress, the device should be kept in Active power > > mode. > > Currently, we set this flag during the UFSHCD probe stage, but we > > didn't deal > > with its programming failure. Even this failure is less likely to > > occur, but > > still it is possible. > > How about reading it on every ufshcd_wb_need_flush? > > Thanks, > Avri Hi Avri I was using that way, no different from the current my way. Instead, reading on every time will add some delay. As long as the UFS device returns the successful, we assume that this flag has been properly set. so, just keeping is_hibern8_wb_flush if set, I think it is enough. Thanks, Bean