From: Paolo Bonzini Date: Tue, 10 Jul 2012 12:04:51 +0000 (+0200) Subject: scsi-disk: fix changeable values for MODE_PAGE_R_W_ERROR X-Git-Tag: v1.2.0-rc0~114^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f588b151127a2556ad0c52158f98cfe1a9c0cfa;p=thirdparty%2Fqemu.git scsi-disk: fix changeable values for MODE_PAGE_R_W_ERROR The changeable values were not all-zeros for this mode page, fix it. Signed-off-by: Paolo Bonzini --- diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index dca98664a67..70154200c12 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -1059,6 +1059,9 @@ static int mode_sense_page(SCSIDiskState *s, int page, uint8_t **p_outbuf, case MODE_PAGE_R_W_ERROR: length = 10; + if (page_control == 1) { /* Changeable Values */ + break; + } p[0] = 0x80; /* Automatic Write Reallocation Enabled */ if (s->qdev.type == TYPE_ROM) { p[1] = 0x20; /* Read Retry Count */