lkml.org 
[lkml]   [2018]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] scsi: ufs: Enable bInitPowerMode of sleep
On Fri, Aug 10, 2018 at 4:50 PM Evan Green <evgreen@chromium.org> wrote:
>
> UFS devices can be provisioned to have an initial power mode of either
> active or sleep. If the initial power mode is sleep, then the host
> controller driver must send a START STOP UNIT to the device in order
> to wake it up. Unfortunately, the device will refuse to complete other
> common low level operations, such as reading descriptors and attributes.
> The Linux driver currently fails to enumerate devices that start in
> sleep mode, because it fails to read the device descriptor from the
> unconscious device.
>
> The way the UFS controller driver is structured, this presents a bit of
> a Catch-22. In order to perform low-level enumeration of the device, the
> driver needs to send a SCSI command. But SCSI needs low-level enumeration
> of the device to be complete before full enumeration can occur.
>
> This change adds a method for sending low-level SCSI commands, modeled
> after (and reusing much of) the mechanism for sending device management
> commands. With this primitive, ufshcd_probe_hba can execute REQUEST SENSE
> to clear the Unit Attention, and then a START STOP UNIT in order to bring
> the device out of sleep mode. Only after this is done can the rest of
> enumeration, such as reading the device descriptor and geometry descriptor,
> be done.
>
> Signed-off-by: Evan Green <evgreen@chromium.org>

A very gentle bump, did anyone get a chance to take a look at this?
Currently Linux can't enumerate UFS devices that start in Sleep mode.

\
 
 \ /
  Last update: 2018-09-04 19:02    [W:0.032 / U:1.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site