summaryrefslogtreecommitdiffstats
path: root/hw/scsi/spapr_vscsi.c
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2014-06-12 15:41:37 +1000
committerPaolo Bonzini <pbonzini@redhat.com>2014-06-18 08:47:10 +0200
commitb9e77bc718db3593ffbb56f3a51488cdce4d5af3 (patch)
treeb5b4f99b0625f15d829cef54375268f64239c3a2 /hw/scsi/spapr_vscsi.c
parent2fe5a9f73b3446690db2cae8a58473b0b4beaa32 (diff)
downloadhqemu-b9e77bc718db3593ffbb56f3a51488cdce4d5af3.zip
hqemu-b9e77bc718db3593ffbb56f3a51488cdce4d5af3.tar.gz
scsi: Print command name in debug
This makes scsi_command_name() public. This makes use of scsi_command_name() in debug output for scsi-disk and spapr-vscsi host bus adapter. Before this, SCSI used to print hex numbers instead of human-friendly strings. This adds GET_EVENT_STATUS_NOTIFICATION and READ_DISC_INFORMATION to the list of SCSI commands supported by scsi_command_name(). Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/spapr_vscsi.c')
-rw-r--r--hw/scsi/spapr_vscsi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
index f96b7af..048cfc7 100644
--- a/hw/scsi/spapr_vscsi.c
+++ b/hw/scsi/spapr_vscsi.c
@@ -799,8 +799,9 @@ static int vscsi_queue_cmd(VSCSIState *s, vscsi_req *req)
req->sreq = scsi_req_new(sdev, req->qtag, lun, srp->cmd.cdb, req);
n = scsi_req_enqueue(req->sreq);
- DPRINTF("VSCSI: Queued command tag 0x%x CMD 0x%x LUN %d ret: %d\n",
- req->qtag, srp->cmd.cdb[0], lun, n);
+ DPRINTF("VSCSI: Queued command tag 0x%x CMD 0x%x=%s LUN %d ret: %d\n",
+ req->qtag, srp->cmd.cdb[0], scsi_command_name(srp->cmd.cdb[0]),
+ lun, n);
if (n) {
/* Transfer direction must be set before preprocessing the
OpenPOWER on IntegriCloud