]> xenbits.xen.org Git - xenclient/ioemu-pq.git/commitdiff
Add input/output data length of ATAPI commands to trace (XC-286)
authorThomas Horsten <thomas.horsten@citrix.com>
Fri, 18 Sep 2009 09:35:19 +0000 (10:35 +0100)
committerThomas Horsten <thomas.horsten@citrix.com>
Fri, 18 Sep 2009 09:35:19 +0000 (10:35 +0100)
master/atapi-async-fix.patch

index 558a3ee38dba7b0a189ae3008f43a35a97bf6a30..1369193cea8382505eddaa5225621df9feef8259 100644 (file)
@@ -1,5 +1,5 @@
 diff --git a/hw/atapi-pt.c b/hw/atapi-pt.c
-index 92f2934..6a7fab1 100644
+index 92f2934..6633994 100644
 --- a/hw/atapi-pt.c
 +++ b/hw/atapi-pt.c
 @@ -1,29 +1,43 @@
@@ -315,7 +315,7 @@ index 92f2934..6a7fab1 100644
      memset(cmd, 0, sizeof(*cmd));
      memcpy(s->atapi_pt.request, s->io_buffer, ATAPI_PACKET_SIZE);
      cmd_code = s->atapi_pt.request[0];
-@@ -1021,6 +1185,7 @@ static void ide_atapi_pt_cmd(IDEState *s)
+@@ -1021,15 +1185,13 @@ static void ide_atapi_pt_cmd(IDEState *s)
      cmd->response         = (__u64)&s->atapi_pt.sense;
      cmd->max_response_len = sizeof(s->atapi_pt.sense);
      cmd->timeout          = 15000; // 15 seconds
@@ -323,10 +323,22 @@ index 92f2934..6a7fab1 100644
  
      s->status |= BUSY_STAT;
  
-@@ -1043,6 +1208,13 @@ static void ide_atapi_pt_cmd(IDEState *s)
+     cmd->din_xferp = (__u64)s->io_buffer;
+     cmd->dout_xferp = (__u64)s->io_buffer;
+-    DEBUG_PRINTF("[ATAPI] sending command: 0x%02x (\e[0;32m%s\e[m)\n",
+-                 cmd_code, atapi_cmd_to_str(cmd_code));
+-
+     cmd->dout_xfer_len = atapi_data_sizes[cmd_code].dout_len_const +
+         (ide_atapi_pt_read_field_at_offset(s->atapi_pt.request,
+                                            atapi_data_sizes[cmd_code].dout_len_offset,
+@@ -1043,6 +1205,16 @@ static void ide_atapi_pt_cmd(IDEState *s)
           atapi_data_sizes[cmd_code].alloc_block_size);
  
  
++    DEBUG_PRINTF("[ATAPI] sending command: 0x%02x (\e[0;32m%s\e[m, in %d out %d)\n",
++                 cmd_code, atapi_cmd_to_str(cmd_code), cmd->din_xfer_len, cmd->dout_xfer_len);
++
 +    if ((cmd_code == GPCMD_REPORT_KEY) || (cmd_code == GPCMD_SEND_KEY)) {
 +      DEBUG_PRINTF("Command dump:\n");
 +      DEBUG_HEXDUMP(s->atapi_pt.request, 11);