diff options
author | Tom Yan <tom.ty89@gmail.com> | 2016-07-12 20:54:11 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-07-12 20:58:43 +0200 |
commit | c9cd3504eb03755db8e64f894ccd4ebee59734b7 (patch) | |
tree | df5ffe7888aea54df268715f3b3e613e874d8d74 /drivers/ata/libata-scsi.c | |
parent | ata: hpt366: fix incorrect mask when checking at cmd_high_time (diff) | |
download | linux-c9cd3504eb03755db8e64f894ccd4ebee59734b7.tar.xz linux-c9cd3504eb03755db8e64f894ccd4ebee59734b7.zip |
libata-scsi: fix D_SENSE bit relection in control mode page
The bit should always be set to 1 when the requested version of
page is "changeable" because we've made it so in ata_mselect_control().
Also, it should always be set to 1 if ATA_DFLAG_D_SENSE is set (when
the requested version of page is "current" or "default").
Signed-off-by: Tom Yan <tom.ty89@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index f6888fca4b5f..9c7c9f28ac23 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2451,7 +2451,7 @@ static unsigned int ata_msense_ctl_mode(struct ata_device *dev, u8 *buf, bool changeable) { modecpy(buf, def_control_mpage, sizeof(def_control_mpage), changeable); - if (changeable && (dev->flags & ATA_DFLAG_D_SENSE)) + if (changeable || (dev->flags & ATA_DFLAG_D_SENSE)) buf[2] |= (1 << 2); /* Descriptor sense requested */ return sizeof(def_control_mpage); } |