linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Avri Altman <Avri.Altman@wdc.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Alim Akhtar <alim.akhtar@samsung.com>
Subject: Re: [PATCH 1/2] scsi: ufs: Add DeepSleep feature
Date: Mon, 5 Oct 2020 11:43:15 +0300	[thread overview]
Message-ID: <a3cd3d32-0dcf-ebaf-d6fe-e8f21539dff1@intel.com> (raw)
In-Reply-To: <BY5PR04MB67054C67CCA53AB5FC5CBCFAFC0C0@BY5PR04MB6705.namprd04.prod.outlook.com>

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.

  reply	other threads:[~2020-10-05  8:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 12:40 [PATCH 0/2] scsi: ufs: Add DeepSleep feature Adrian Hunter
2020-10-02 12:40 ` [PATCH 1/2] " Adrian Hunter
2020-10-04  7:20   ` Avri Altman
2020-10-04 14:24   ` Avri Altman
2020-10-05  8:02   ` Avri Altman
2020-10-05  8:43     ` Adrian Hunter [this message]
2020-10-05  9:51       ` Avri Altman
2020-10-05 11:06         ` Adrian Hunter
2020-10-05 11:14           ` Avri Altman
2020-10-02 12:40 ` [PATCH 2/2] scsi: ufs: Workaround UFS devices that object to DeepSleep IMMED Adrian Hunter
2020-10-05  8:10   ` Avri Altman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3cd3d32-0dcf-ebaf-d6fe-e8f21539dff1@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Avri.Altman@wdc.com \
    --cc=alim.akhtar@samsung.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).