Skip to content
Commit b8e08084 authored by Dan McLeran's avatar Dan McLeran Committed by Matthew Wilcox
Browse files

NVMe: Fix START_STOP_UNIT Scsi->NVMe translation.



This patch contains several fixes for Scsi START_STOP_UNIT. The previous
code did not account for signed vs. unsigned arithmetic which resulted
in an invalid lowest power state caculation when the device only supports
1 power state.

The code for Power Condition == 2 (Idle) was not following the spec. The
spec calls for setting the device to specific power states, depending
upon Power Condition Modifier, without accounting for the number of
power states supported by the device.

The code for Power Condition == 3 (Standby) was using a hard-coded '0'
which is replaced with the macro POWER_STATE_0.

Signed-off-by: default avatarDan McLeran <daniel.mcleran@intel.com>
Reviewed-by: default avatarVishal Verma <vishal.l.verma@linux.intel.com>
Signed-off-by: default avatarMatthew Wilcox <matthew.r.wilcox@intel.com>
parent ef351b97
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment