Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3134280pxk; Mon, 5 Oct 2020 01:47:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7E3wPhX71INUZw1x4g+UZtf+SyjJLHbfcPr6BHdit2Yyqf2oDhFUjaf8gV3buihnFyvgg X-Received: by 2002:a50:cbc9:: with SMTP id l9mr15561254edi.310.1601887661512; Mon, 05 Oct 2020 01:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601887661; cv=none; d=google.com; s=arc-20160816; b=f7bgUYALKUxvIF8WQK1Rd5jOa6LaQfPNZmVA1RqGbg8c+M4AfeGc8YvD93L+CJ7rIf 5Zms/9SCt17oPvJ7YtPVeWLZJRPDpgJHDdELENn25AgHX5ISimg3PprUphI13gmmF6HV 2iLycSiiDzS/Fi0dlCr27GxkVI9Eq7fxpM1ajoqow6crwSP6qQ7Wp72dn7NzdQnhPE36 o+b4CR/6eOkzx9+fJ70bjLdaJHdAs2bFJSy+cvBVipWkI5YtT7W/83SBFOj7zdHCKtSe lt7CQLKQdyVHPrelMuPKD11WsHmN7undYbY7beKF9g8DWTA4e8L05YC+HeXnPX0JMnwE i+Tw== 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:organization :from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=/3d2Ghy315oUO4SjVz+CGzqVqnazbnuogGXTa2GWThI=; b=bVzdVoSTlUOJdWd/ZS4YMmGtJCEd5+hL4nwR/2BJ4ea3U7JtppjYSRO1Bzo/Sd5ui9 J1CBiqP1RQ0SacXlF1NliMd4Hq22YCIToxgLYFwrMcDyuSjgfbiHIP0nimwx2GjXeSFf OmT+69k0DLDNbJIoyJnP7PobFSBg4ktFVESzDYFJdAIZlLP9QH1jHBRlGjCAjXaLuoTF jCGE8hwdE87od8GyBGOhgZU4Jm/AwJ2Tjy+K8FM3i9ig02snn4lLVXn5UUPsdxk/Br/Y x/A7qFQWosKT0W1gpg571AVtHsvA6NAVxCMiC35HGhhWhWQnHVlaxsXTk7bj7RGqT1Ln lFXw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si7428454ejx.291.2020.10.05.01.47.19; Mon, 05 Oct 2020 01:47:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726012AbgJEIn7 (ORCPT + 99 others); Mon, 5 Oct 2020 04:43:59 -0400 Received: from mga17.intel.com ([192.55.52.151]:5278 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbgJEIn7 (ORCPT ); Mon, 5 Oct 2020 04:43:59 -0400 IronPort-SDR: bQE38C7bVAUMiR2Go6ZAybrDCxmjtsYVgxqFMlFGeo4chf8sKWwB0kg4nxuIuuzQRecGo0iWti dVb3Ctn4q8ZQ== X-IronPort-AV: E=McAfee;i="6000,8403,9764"; a="143346184" X-IronPort-AV: E=Sophos;i="5.77,338,1596524400"; d="scan'208";a="143346184" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2020 01:43:53 -0700 IronPort-SDR: ELbU7QIRQy4Z7gFsvS+hT+aZWXMh5TrQhcyxJo6tWcYJuAVc2aDlpp5IBBmksRNz76pUT0cERv VpKT+B4pLFzQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,338,1596524400"; d="scan'208";a="516649662" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.190]) ([10.237.72.190]) by fmsmga005.fm.intel.com with ESMTP; 05 Oct 2020 01:43:50 -0700 Subject: Re: [PATCH 1/2] scsi: ufs: Add DeepSleep feature To: Avri Altman , "Martin K . Petersen" , "James E . J . Bottomley" Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Alim Akhtar References: <20201002124043.25394-1-adrian.hunter@intel.com> <20201002124043.25394-2-adrian.hunter@intel.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: Date: Mon, 5 Oct 2020 11:43:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: 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 5/10/20 11:02 am, Avri Altman wrote: > HI, > >> Drivers that wish to support DeepSleep need to set a new capability flag >> UFSHCD_CAP_DEEPSLEEP and provide a hardware reset via the existing >> ->device_reset() callback. > I would expect that this capability controls sending SSU 4, but it only controls the sysfs entry? The sysfs entry is the only way to request DeepSleep. > >> >> It is assumed that UFS devices with wspecversion >= 0x310 support >> DeepSleep. >> >> The UFS specification says to set the IMMED (immediate) flag for the >> Start/Stop Unit command when entering DeepSleep. However some UFS >> devices object to that, which is addressed in a subsequent patch. > After failing to understand what the proper behavior should be with respect of the IMMED bit, > Although I read the applicable section few time, I gave up and consult our system guy, > Which is our jedec representative. This is his answer: > "... > In order to avoid uncertainty - the host need to set IMMED bit to '0' (this is explicitly specified by the standard). > The device responds only after it switches to Pre-DeepSleep state. The host then switch to H8 and this would trigger the device to transition to DeepSleep state. > ..." > > So maybe the 2nd patch isn't really needed. Yes I managed to get it the wrong way around! I will drop patch 2 and send V2 of patch 1 in due course.