[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 21/55] atapi: cleanup/fix mode sense results
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 21/55] atapi: cleanup/fix mode sense results |
Date: |
Mon, 31 Oct 2011 14:29:56 +0100 |
From: Paolo Bonzini <address@hidden>
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>
Signed-off-by: Kevin Wolf <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.4
- [Qemu-devel] [PATCH 37/55] scsi-disk: fail READ CAPACITY if LBA != 0 but PMI == 0, (continued)
- [Qemu-devel] [PATCH 37/55] scsi-disk: fail READ CAPACITY if LBA != 0 but PMI == 0, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 45/55] scsi-disk: remove cluster_size, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 44/55] scsi-disk: do not duplicate BlockDriverState member, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 46/55] scsi-disk: small clean up to INQUIRY, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 47/55] scsi: move max_lba to SCSIDevice, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 50/55] scsi: pass cdb to alloc_req, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 49/55] scsi: export scsi_generic_reqops, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 52/55] scsi-disk: bump SCSIRequest reference count until aio completion runs, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 51/55] scsi: do not call transfer_data after canceling a request, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 36/55] scsi: add channel to addressing, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 21/55] atapi: cleanup/fix mode sense results,
Kevin Wolf <=
- [Qemu-devel] [PATCH 20/55] atapi: move GESN definitions to scsi-defs.h, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 30/55] scsi-disk: report media changed via GET EVENT STATUS NOTIFICATION, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 23/55] scsi-disk: report media changed via unit attention sense codes, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 42/55] scsi-generic: look at host status, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 48/55] scsi: make reqops const, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 53/55] scsi-generic: bump SCSIRequest reference count until aio completion runs, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 27/55] atapi/scsi-disk: make mode page values coherent between the two, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 28/55] scsi-disk: support DVD profile in GET CONFIGURATION, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 54/55] scsi: push request restart to SCSIDevice, Kevin Wolf, 2011/10/31
- [Qemu-devel] [PATCH 29/55] scsi-disk: support READ DVD STRUCTURE, Kevin Wolf, 2011/10/31