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>
This commit is contained in:
Paolo Bonzini 2012-07-10 14:04:51 +02:00
parent ef40561116
commit 4f588b1511

View File

@ -1059,6 +1059,9 @@ static int mode_sense_page(SCSIDiskState *s, int page, uint8_t **p_outbuf,
case MODE_PAGE_R_W_ERROR: case MODE_PAGE_R_W_ERROR:
length = 10; length = 10;
if (page_control == 1) { /* Changeable Values */
break;
}
p[0] = 0x80; /* Automatic Write Reallocation Enabled */ p[0] = 0x80; /* Automatic Write Reallocation Enabled */
if (s->qdev.type == TYPE_ROM) { if (s->qdev.type == TYPE_ROM) {
p[1] = 0x20; /* Read Retry Count */ p[1] = 0x20; /* Read Retry Count */