Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp6001125pxj; Wed, 23 Jun 2021 14:01:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdcW9Gwy6Dyvq1FL1UbSh/Qd+iZoGa4n4Q1l5rh8YIAMFtqj7wpbccPjsg0SgDV7v2mk0R X-Received: by 2002:aa7:dc0d:: with SMTP id b13mr2230550edu.288.1624482080696; Wed, 23 Jun 2021 14:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624482080; cv=none; d=google.com; s=arc-20160816; b=BqNbAl94n2W4IeIjGMExaC9Vm5kVGEMG2gkBuk80tzIu2spaGc0OQljZ236rDh70u0 AQtzkczwatHBGvDLrfqhObRiwVpYXGydll1fob9yOBowPdpHNoQuj4skJzVLdCpq9DKB mtfNQn0/0wpw2VkocZ8nLxU5z0GQ/8a7LCexjYv9LQZ0mVxuRy/rdH4mzAqiK9Jdetip HFyawO0DNrI0zz8Nyc/qWMf9CdMIAKfz3Hzvj9EdcKKZIquGrmXxF0IK/kvBJ8TBD+Rl cIKlEIPYskNrxeN6N5rSUPgBaVPt+qJ74Fgp2n8KhuYHizfK0aVfrb1N4hNRaiuZ0j80 PyDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject; bh=dCbNvB195lzRxEPacx+kghC6AqDatShZ2Iju3tl1niA=; b=AEKC4P6cJPk9mhhbI5hRR/CutCNTyRoEmtbyzkk81I3FJtiKTK43Fua2kjKB2sNwo8 p1oMQo0hu/0SJVhM3YHpQYDVETny/Cim8SXvlgFjewUArUwX6YfrkDK6bcWzn81kXAHz WaqJKEtaLvA/gBt12+Favi2i48aMTF4aDqgLpwG0VQBQMUAeM8ro3XbL09L3g+xUhQA0 rES0gjiZyumvc5UbLJ+xwHn50HvYwE50X5HvLfNXFOrRB0DXPR0VP0MAapxzk0gYGIZV 2oxHbnQU9b1UBEmLPJFJ2Oc/BWc0NcmZI7hNBB8ADA0w9pX15EhP9kpQSHYfxOankCAx UQGg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id en22si713143ejc.80.2021.06.23.14.00.57; Wed, 23 Jun 2021 14:01:20 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229796AbhFWU7a (ORCPT + 99 others); Wed, 23 Jun 2021 16:59:30 -0400 Received: from mail-pl1-f176.google.com ([209.85.214.176]:44694 "EHLO mail-pl1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbhFWU73 (ORCPT ); Wed, 23 Jun 2021 16:59:29 -0400 Received: by mail-pl1-f176.google.com with SMTP id x22so1793275pll.11; Wed, 23 Jun 2021 13:57:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dCbNvB195lzRxEPacx+kghC6AqDatShZ2Iju3tl1niA=; b=fiE+kApE680QUkP/hL3nRF9kqIDAsjcA/JDRoCrZWrvur8eevMlETM0bn5ttdIZ2hZ RHudf/nvTy1D//f6EVXntrFsBKC2WPJoifsHnz1+uFMSFZ6dLKPJ43PFpVtfwgoDD6nD aP8G9n8+XTGqV2HipZHPzFKUaG9t1XiZDtv4vOGykgP9DRlZZSYWU/czBcG4kEluqgSC 8g2V9zcsI/mpcGobcWHtMVp1Fs5fDK28ro/ocR4x11vZ6/7b3NHkZI8o9hp30HmlqWA4 mEj5rqFKk1L/qDOetPyh3JX2nfm5eH9BMqI4Fu1vZ/qgUGzCTp0VVebHvSJ7YcKRN8Xc 0jJA== X-Gm-Message-State: AOAM533dgMC6BmqvISw0QVK2HBLm6+EYNOkkl5WjRFs8Onn60Aufsmcp fJ+oHAVkkXnX1+hpFG7ztlcPmb8B8HRThQ== X-Received: by 2002:a17:90a:8d83:: with SMTP id d3mr1564809pjo.226.1624481829139; Wed, 23 Jun 2021 13:57:09 -0700 (PDT) Received: from [192.168.3.217] (c-73-241-217-19.hsd1.ca.comcast.net. [73.241.217.19]) by smtp.gmail.com with ESMTPSA id o34sm34910pgm.6.2021.06.23.13.57.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Jun 2021 13:57:08 -0700 (PDT) Subject: Re: [PATCH v4 01/10] scsi: ufs: Rename flags pm_op_in_progress and is_sys_suspended From: Bart Van Assche To: Can Guo , asutoshd@codeaurora.org, nguyenb@codeaurora.org, hongwus@codeaurora.org, ziqichen@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com Cc: Andy Gross , Bjorn Andersson , Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Jaegeuk Kim , Adrian Hunter , Kiwoong Kim , Satya Tangirala , "open list:ARM/QUALCOMM SUPPORT" , open list References: <1624433711-9339-1-git-send-email-cang@codeaurora.org> <1624433711-9339-2-git-send-email-cang@codeaurora.org> <1c5db457-ee87-2308-15f5-5dad49508f10@acm.org> Message-ID: Date: Wed, 23 Jun 2021 13:57:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1c5db457-ee87-2308-15f5-5dad49508f10@acm.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/23/21 1:05 PM, Bart Van Assche wrote: > On 6/23/21 12:35 AM, Can Guo wrote: >> Rename pm_op_in_progress and is_sys_suspended to wlu_pm_op_in_progress and >> is_wlu_sys_suspended accordingly. > > My understanding is that power management operations must be submitted > to one particular UFS WLUN (hba->sdev_ufs_device). That makes the "wlu_" > part of the new names redundant. In other words, I like the current > names better than the new names. Unless if I missed something, consider > dropping this patch. Hi Can, Reviewing later patches in this series made me realize that there are two families of suspend/resume functions. One family of functions operates at the platform level while the other family operates at the SCSI LUN level. My comments about the suspend/resume functions are as follows: - It seems redundant to me to have system suspend support at the SCSI LUN level (__ufshcd_wl_suspend(hba, UFS_SYSTEM_PM)) and also at the platform level. Since the platform device is a parent of the SCSI WLUN, can system suspend/resume support be left out from ufshcd_wl_pm_ops (or in other words, remove the .freeze and .thaw callbacks)? Do we really need two calls from the power management subsystem into the UFS driver for every system suspend and every system resume? - Because of the device links (device_link_add()), the ufschd_wl_*() RPM callbacks are invoked after all LUNs have been suspended. I would appreciate it if the "ufshcd_wl_" prefix would be changed into "ufshcd_lun_" since that would make it more clear that these callbacks are associated with all LUNs and not only with the WLUN through which power management commands are submitted. Thanks, Bart.