aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-disk.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-07-10 14:04:51 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-07-26 17:44:10 +0200
commit4f588b151127a2556ad0c52158f98cfe1a9c0cfa (patch)
tree8eed22ab3fc49f813246d28818f3cfa47152483e /hw/scsi-disk.c
parentef405611168015cfd28669e04506bb99d7c39288 (diff)
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 <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r--hw/scsi-disk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index dca98664a6..70154200c1 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 */