qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 6/8] scsi-disk: fix changeable values for MODE_PAGE_


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 6/8] scsi-disk: fix changeable values for MODE_PAGE_R_W_ERROR
Date: Tue, 10 Jul 2012 16:15:08 +0200

The changeable values were not all-zeros for this mode page, fix it.

Signed-off-by: Paolo Bonzini <address@hidden>
---
 hw/scsi-disk.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index e64d659..a7f1f14 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -1058,6 +1058,9 @@ static int mode_sense_page(SCSIDiskState *s, int page, 
uint8_t **p_outbuf,
 
     case MODE_PAGE_R_W_ERROR:
         p[1] = 10;
+        if (page_control == 1) { /* Changeable Values */
+            break;
+        }
         p[2] = 0x80; /* Automatic Write Reallocation Enabled */
         if (s->qdev.type == TYPE_ROM) {
             p[3] = 0x20; /* Read Retry Count */
-- 
1.7.10.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]