diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-02-04 08:45:42 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-02-04 08:45:42 +0100 |
commit | 98cb621081705e2244ef6c265ff8a9f2208c7e2a (patch) | |
tree | 6205be47a83d54d3e35e049b67973244120f8bd6 /drivers/scsi/sd.c | |
parent | Merge tag 'perf-core-for-mingo-5.0-20190126' of git://git.kernel.org/pub/scm/... (diff) | |
parent | perf/core: Don't WARN() for impossible ring-buffer sizes (diff) | |
download | linux-98cb621081705e2244ef6c265ff8a9f2208c7e2a.tar.xz linux-98cb621081705e2244ef6c265ff8a9f2208c7e2a.zip |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index a1a44f52e0e8..b2da8a00ec33 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -206,6 +206,12 @@ cache_type_store(struct device *dev, struct device_attribute *attr, sp = buffer_data[0] & 0x80 ? 1 : 0; buffer_data[0] &= ~0x80; + /* + * Ensure WP, DPOFUA, and RESERVED fields are cleared in + * received mode parameter buffer before doing MODE SELECT. + */ + data.device_specific = 0; + if (scsi_mode_select(sdp, 1, sp, 8, buffer_data, len, SD_TIMEOUT, SD_MAX_RETRIES, &data, &sshdr)) { if (scsi_sense_valid(&sshdr)) |