diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2014-03-05 16:15:16 +1100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-03-14 10:06:55 +0100 |
commit | 22956a3755749b9cf6375ad024d58c1d277100bf (patch) | |
tree | b857aa946fd5de51475222671a909e4efd52bb12 /hw/scsi/spapr_vscsi.c | |
parent | 5d92c74f8a1728a202ba9457872ab0f27ff15e81 (diff) | |
download | qemu-22956a3755749b9cf6375ad024d58c1d277100bf.zip qemu-22956a3755749b9cf6375ad024d58c1d277100bf.tar.gz qemu-22956a3755749b9cf6375ad024d58c1d277100bf.tar.bz2 |
spapr-vscsi: fix CRQ status
Normally VIOSRP_OK (0) means success and non-zero value means error
except VIOSRP_OK2 (0x99) which is another success code by weird accident.
This uses 0 as success code always as some guests do not cope with
the 0x99 value well. The existing linux driver checks for both VIOSRP_OK
and VIOSRP_OK2 since 2.6.32.
This returns non-zero code (VIOSRP_ADAPTER_FAIL == 0x10) on errors which
can only happen if DMA write failed.
Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c index b3835c8..34478f0 100644 --- a/hw/scsi/spapr_vscsi.c +++ b/hw/scsi/spapr_vscsi.c @@ -195,9 +195,9 @@ static int vscsi_send_iu(VSCSIState *s, vscsi_req *req, req->crq.s.IU_data_ptr = req->iu.srp.rsp.tag; /* right byte order */ if (rc == 0) { - req->crq.s.status = 0x99; /* Just needs to be non-zero */ + req->crq.s.status = VIOSRP_OK; } else { - req->crq.s.status = 0x00; + req->crq.s.status = VIOSRP_ADAPTER_FAIL; } rc1 = spapr_vio_send_crq(&s->vdev, req->crq.raw); |