From 6a2de0f2038349716049c9b9a972d6777c85424b Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 19 Apr 2012 10:28:15 +0200 Subject: [PATCH] scsi: advertise DPOFUA Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- GitLab