scsi: ufs: Enable bInitPowerMode of sleep
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 2 repliesIn review
- v11 patch 1 replySuperseded
Changes in v2 from the cover letter
* Split into two patches for easier comprehension. Can recombine to one
if this split is too contrived.
* Fixed a leftover raw printk.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | scsi: ufs: Allow SCSI commands early during initdrivers/ | +152 | 0 replies | |
| 2/2 | scsi: ufs: Execute START_STOP_UNIT during initdrivers/ drivers/ | +54 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] scsi: ufs: Enable bInitPowerMode of sleep
This change enables Linux to enumerate UFS devices that have been configured to start in an initial power mode (bInitPowerMode) of sleep. The UFS spec indicates that for devices in sleep mode, a START_STOP_UNIT SCSI command must be sent to them to wake them up before doing other initialization tasks like getting the device or geometry descriptors. This is not trivial to do in the UFS driver, since it assumes that SCSI commands are only needed once low level initialization of the device is complete.
These patches 1) Enable sending SCSI commands before the actual SCSI targets are created, and 2) Sends the needed commands for devices in sleep mode.
This can be tested locally by setting byte 5 of the Configuration Descriptor (bInitPowerMode) to zero, and rebooting. I discovered this bug by accidentally zeroing out too many fields while I was testing provisioning functionality.
Note: This series is unrelated to (and independent of) the competing UFS provisioning patches that have been floating around the list lately.
Changes since v1:
* Split into two patches for easier comprehension. Can recombine to one
if this split is too contrived.
* Fixed a leftover raw printk.
Evan Green (2):
scsi: ufs: Allow SCSI commands early during init
scsi: ufs: Execute START_STOP_UNIT during init
drivers/scsi/ufs/ufshcd.c | 208 +++++++++++++++++++++++++++++++++++++++++++--- drivers/scsi/ufs/ufshcd.h | 11 +++ 2 files changed, 206 insertions(+), 13 deletions(-)
Signature · 1 line
2.16.4