aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-disk.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-04-19 10:28:15 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-04-19 16:16:05 +0200
commit6a2de0f2038349716049c9b9a972d6777c85424b (patch)
treeafbc7bd24dbc8e5e6966c212de3daacedca66e43 /hw/scsi-disk.c
parente590ecbed5da8716b83b348d26edb9e60b4e91c4 (diff)
scsi: advertise DPOFUA
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r--hw/scsi-disk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 2d9ac2d2a8..fca31fa6e7 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -1093,14 +1093,15 @@ static int scsi_disk_emulate_mode_sense(SCSIDiskReq *r, uint8_t *outbuf)
memset(outbuf, 0, r->req.cmd.xfer);
p = outbuf;
- dev_specific_param = 0x00;
if (s->qdev.type == TYPE_DISK) {
+ dev_specific_param = 0x10; /* DPOFUA */
if (bdrv_is_read_only(s->qdev.conf.bs)) {
dev_specific_param |= 0x80; /* Readonly. */
}
} else {
/* MMC prescribes that CD/DVD drives have no block descriptors,
* and defines no device-specific parameter. */
+ dev_specific_param = 0x00;
dbd = true;
}