From: Thomas Horsten Date: Fri, 18 Sep 2009 09:35:19 +0000 (+0100) Subject: Add input/output data length of ATAPI commands to trace (XC-286) X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d0f3cfb61406dcfa20330c5b796c980f5db44f3c;p=xenclient%2Fioemu-pq.git Add input/output data length of ATAPI commands to trace (XC-286) --- diff --git a/master/atapi-async-fix.patch b/master/atapi-async-fix.patch index 558a3ee..1369193 100644 --- a/master/atapi-async-fix.patch +++ b/master/atapi-async-fix.patch @@ -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);