* [Qemu-devel] [PATCH 2/5] ATAPI pass through v2: adds few comments
@ 2009-07-01 18:32 Bique Alexandre
[not found] ` <m33a9g8cm7.fsf@neno.mitica>
2009-07-05 8:08 ` [Qemu-devel] " Christoph Hellwig
0 siblings, 2 replies; 4+ messages in thread
From: Bique Alexandre @ 2009-07-01 18:32 UTC (permalink / raw)
To: qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 84 bytes --]
This patch adds few comments to some CD-ROM emulated commands.
--
Alexandre Bique
[-- Attachment #2: atapi-comments --]
[-- Type: text/x-patch, Size: 1500 bytes --]
diff --git a/hw/ide.c b/hw/ide.c
index 1e56786..063f08d 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -1664,9 +1664,9 @@ static void ide_atapi_cmd(IDEState *s)
switch(action) {
case 0: /* current values */
switch(code) {
- case 0x01: /* error recovery */
+ case 0x01: /* read write error recovery parameters */
cpu_to_ube16(&buf[0], 16 + 6);
- buf[2] = 0x70;
+ buf[2] = 0x70; /* Obselete: medium type code */
buf[3] = 0;
buf[4] = 0;
buf[5] = 0;
@@ -1683,17 +1683,17 @@ static void ide_atapi_cmd(IDEState *s)
buf[15] = 0x00;
ide_atapi_cmd_reply(s, 16, max_len);
break;
- case 0x2a:
+ case 0x2a: /* CD/DVD capabilities & mechanical status */
cpu_to_ube16(&buf[0], 28 + 6);
- buf[2] = 0x70;
+ buf[2] = 0x70; /* Obselete: medium type code */
buf[3] = 0;
buf[4] = 0;
buf[5] = 0;
buf[6] = 0;
buf[7] = 0;
- buf[8] = 0x2a;
- buf[9] = 0x12;
+ buf[8] = 0x2a; /* page code */
+ buf[9] = 0x12; /* page lenght */
buf[10] = 0x00;
buf[11] = 0x00;
^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <m33a9g8cm7.fsf@neno.mitica>]
* [Qemu-devel] Re: [PATCH 2/5] ATAPI pass through v2: adds few comments
[not found] ` <m33a9g8cm7.fsf@neno.mitica>
@ 2009-07-02 10:38 ` Bique Alexandre
2009-07-05 9:06 ` Stuart Brady
0 siblings, 1 reply; 4+ messages in thread
From: Bique Alexandre @ 2009-07-02 10:38 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 1918 bytes --]
On Wednesday 01 July 2009 19:46:56 Juan Quintela wrote:
> Bique Alexandre <alexandre.bique@citrix.com> wrote:
> > This patch adds few comments to some CD-ROM emulated commands.
>
> diff --git a/hw/ide.c b/hw/ide.c
> index 1e56786..063f08d 100644
> --- a/hw/ide.c
> +++ b/hw/ide.c
> @@ -1664,9 +1664,9 @@ static void ide_atapi_cmd(IDEState *s)
> switch(action) {
> case 0: /* current values */
> switch(code) {
> - case 0x01: /* error recovery */
> + case 0x01: /* read write error recovery parameters */
> cpu_to_ube16(&buf[0], 16 + 6);
> - buf[2] = 0x70;
> + buf[2] = 0x70; /* Obselete: medium type code */
> ^^^^^^^^
> Obsolete I guess
> buf[3] = 0;
> buf[4] = 0;
> buf[5] = 0;
> @@ -1683,17 +1683,17 @@ static void ide_atapi_cmd(IDEState *s)
> buf[15] = 0x00;
> ide_atapi_cmd_reply(s, 16, max_len);
> break;
> - case 0x2a:
> + case 0x2a: /* CD/DVD capabilities & mechanical status */
> cpu_to_ube16(&buf[0], 28 + 6);
> - buf[2] = 0x70;
> + buf[2] = 0x70; /* Obselete: medium type code */
> Obsolete I guess also
> buf[3] = 0;
> buf[4] = 0;
> buf[5] = 0;
> buf[6] = 0;
> buf[7] = 0;
>
> - buf[8] = 0x2a;
> - buf[9] = 0x12;
> + buf[8] = 0x2a; /* page code */
> + buf[9] = 0x12; /* page lenght */
> buf[10] = 0x00;
> buf[11] = 0x00;
You're right. Thanks again.
I join the updated patch.
--
Alexandre Bique
[-- Attachment #2: atapi-comments --]
[-- Type: text/x-patch, Size: 1500 bytes --]
diff --git a/hw/ide.c b/hw/ide.c
index 1e56786..063f08d 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -1664,9 +1664,9 @@ static void ide_atapi_cmd(IDEState *s)
switch(action) {
case 0: /* current values */
switch(code) {
- case 0x01: /* error recovery */
+ case 0x01: /* read write error recovery parameters */
cpu_to_ube16(&buf[0], 16 + 6);
- buf[2] = 0x70;
+ buf[2] = 0x70; /* Obsolete: medium type code */
buf[3] = 0;
buf[4] = 0;
buf[5] = 0;
@@ -1683,17 +1683,17 @@ static void ide_atapi_cmd(IDEState *s)
buf[15] = 0x00;
ide_atapi_cmd_reply(s, 16, max_len);
break;
- case 0x2a:
+ case 0x2a: /* CD/DVD capabilities & mechanical status */
cpu_to_ube16(&buf[0], 28 + 6);
- buf[2] = 0x70;
+ buf[2] = 0x70; /* Obsolete: medium type code */
buf[3] = 0;
buf[4] = 0;
buf[5] = 0;
buf[6] = 0;
buf[7] = 0;
- buf[8] = 0x2a;
- buf[9] = 0x12;
+ buf[8] = 0x2a; /* page code */
+ buf[9] = 0x12; /* page lenght */
buf[10] = 0x00;
buf[11] = 0x00;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 2/5] ATAPI pass through v2: adds few comments
2009-07-01 18:32 [Qemu-devel] [PATCH 2/5] ATAPI pass through v2: adds few comments Bique Alexandre
[not found] ` <m33a9g8cm7.fsf@neno.mitica>
@ 2009-07-05 8:08 ` Christoph Hellwig
1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2009-07-05 8:08 UTC (permalink / raw)
To: Bique Alexandre; +Cc: qemu-devel@nongnu.org
On Wed, Jul 01, 2009 at 07:32:01PM +0100, Bique Alexandre wrote:
> This patch adds few comments to some CD-ROM emulated commands.
Looks good to be, but long term we'd be better off having headers with
symbolic names for all the constants from the standards..
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-05 9:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-01 18:32 [Qemu-devel] [PATCH 2/5] ATAPI pass through v2: adds few comments Bique Alexandre
[not found] ` <m33a9g8cm7.fsf@neno.mitica>
2009-07-02 10:38 ` [Qemu-devel] " Bique Alexandre
2009-07-05 9:06 ` Stuart Brady
2009-07-05 8:08 ` [Qemu-devel] " Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).