[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 04/33] atapi: cleanup/fix mode sense results
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH v2 04/33] atapi: cleanup/fix mode sense results |
Date: |
Tue, 25 Oct 2011 12:40:12 +0200 |
The first two bytes (after the 8-byte ATAPI header) are the mode page
number and the number of bytes after the length field itself. Make
this clear in the code.
The AUDIO_CTL page was filled with wrong values. It is not anymore in
MMC, but at least keep the values sane.
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/ide/atapi.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 347c38d..e898da2 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -711,8 +711,8 @@ static void cmd_mode_sense(IDEState *s, uint8_t *buf)
buf[6] = 0;
buf[7] = 0;
- buf[8] = 0x01;
- buf[9] = 0x06;
+ buf[8] = MODE_PAGE_R_W_ERROR;
+ buf[9] = 16 - 10;
buf[10] = 0x00;
buf[11] = 0x05;
buf[12] = 0x00;
@@ -730,6 +730,8 @@ static void cmd_mode_sense(IDEState *s, uint8_t *buf)
buf[6] = 0;
buf[7] = 0;
+ buf[8] = MODE_PAGE_AUDIO_CTL;
+ buf[9] = 24 - 10;
/* Fill with CDROM audio volume */
buf[17] = 0;
buf[19] = 0;
@@ -747,8 +749,8 @@ static void cmd_mode_sense(IDEState *s, uint8_t *buf)
buf[6] = 0;
buf[7] = 0;
- buf[8] = 0x2a;
- buf[9] = 0x12;
+ buf[8] = MODE_PAGE_CAPABILITIES;
+ buf[9] = 28 - 10;
buf[10] = 0x00;
buf[11] = 0x00;
--
1.7.6
- [Qemu-devel] [PULL v2 00/33] SCSI changes for 1.0, part 1 of 2, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 01/33] scsi: pass correct sense code for ENOMEDIUM, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 03/33] atapi: move GESN definitions to scsi-defs.h, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 02/33] atapi/scsi: unify definitions for MMC, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 04/33] atapi: cleanup/fix mode sense results,
Paolo Bonzini <=
- [Qemu-devel] [PATCH v2 05/33] scsi: notify the device when unit attention is reported, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 06/33] scsi-disk: report media changed via unit attention sense codes, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 09/33] scsi-disk: store valid mode pages in a table, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 08/33] scsi-disk: add stubs for more MMC commands, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 07/33] scsi-disk: fix coding style issues (braces), Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 17/33] scsi: implement REPORT LUNS for arbitrary LUNs, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 13/33] scsi-disk: report media changed via GET EVENT STATUS NOTIFICATION, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 12/33] scsi-disk: support READ DVD STRUCTURE, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 10/33] atapi/scsi-disk: make mode page values coherent between the two, Paolo Bonzini, 2011/10/25
- [Qemu-devel] [PATCH v2 32/33] scsi: export scsi_generic_reqops, Paolo Bonzini, 2011/10/25