summaryrefslogtreecommitdiffstats
path: root/kernel/context_tracking.c
diff options
context:
space:
mode:
authorGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>2015-10-30 19:04:43 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2015-11-12 03:10:26 +0100
commit2c5d16d6a9e7218e57b716e4fd9d77c776d21471 (patch)
tree801f68a3f47796dadb16521ee3a5776e4404f267 /kernel/context_tracking.c
parentibmvscsi: set max_lun to 32 (diff)
downloadlinux-2c5d16d6a9e7218e57b716e4fd9d77c776d21471.tar.xz
linux-2c5d16d6a9e7218e57b716e4fd9d77c776d21471.zip
sd: Clear PS bit before Mode Select.
According to SPC-4, in a Mode Select, the PS bit in Mode Pages is reserved and must be set to 0 by the driver. In the sd implementation, function cache_type_store does a Mode Sense, which might set the PS bit on the read buffer, followed by a Mode Select, which receives the same buffer, without explicitly clearing the PS bit. So, in cases where target supports saving the Mode Page to a non-volatile location, we end up doing a Mode Select with the PS bit set, which could cause an illegal request error if the target is checking this. This was observed on a new firmware change, which was subsequently reverted, but this changes sd.c to be more compliant with SPC-4. This patch clears the PS bit in the buffer returned by Mode Select, right before it is used in the Mode Select command. Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'kernel/context_tracking.c')
0 files changed, 0 insertions, 0 deletions