All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] spapr-vscsi: fix CRQ status
Date: Wed, 05 Mar 2014 09:16:26 +0100	[thread overview]
Message-ID: <5316DD5A.8080708@redhat.com> (raw)
In-Reply-To: <1393996517-11250-1-git-send-email-aik@ozlabs.ru>

Il 05/03/2014 06:15, Alexey Kardashevskiy ha scritto:
> 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>
> ---
>  hw/scsi/spapr_vscsi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
> index e8bca39..6460e06 100644
> --- a/hw/scsi/spapr_vscsi.c
> +++ b/hw/scsi/spapr_vscsi.c
> @@ -193,9 +193,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);
>

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

  reply	other threads:[~2014-03-05  8:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05  5:15 [Qemu-devel] [PATCH] spapr-vscsi: fix CRQ status Alexey Kardashevskiy
2014-03-05  8:16 ` Paolo Bonzini [this message]
2014-03-05  9:14 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5316DD5A.8080708@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.