All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH v4] spapr-vscsi: add task management
Date: Fri, 26 Jul 2013 11:34:29 +0200	[thread overview]
Message-ID: <51F242A5.3060704@redhat.com> (raw)
In-Reply-To: <1374830452-5365-1-git-send-email-aik@ozlabs.ru>

Il 26/07/2013 11:20, Alexey Kardashevskiy ha scritto:
> -    return !fn;
> +
> +    vscsi_send_rsp(s, req, resp, 0, 0);

We're not there yet, but getting closer...

These response codes are _not_ SCSI status codes that go in the
SRP_RSP's status field.  They go (in the error case) in the "response
data" field, so you have to set RSPVALID and set the first four bytes of
the data[] array in the format that I mentioned before.

The status field must be zero, because the spec says: "Response data
shall not be provided in any SRP_RSP response that returns a non-zero
status code in the STATUS field".

Paolo

> +    return 1;
>  }
>  
>  static int vscsi_handle_srp_req(VSCSIState *s, vscsi_req *req)
> diff --git a/hw/scsi/srp.h b/hw/scsi/srp.h
> index 5e0cad5..d27f31d 100644
> --- a/hw/scsi/srp.h
> +++ b/hw/scsi/srp.h
> @@ -90,6 +90,13 @@ enum {
>      SRP_REV16A_IB_IO_CLASS = 0x0100
>  };
>  
> +enum {
> +    SRP_TSK_MGMT_COMPLETE       = 0x00,
> +    SRP_TSK_MGMT_FIELDS_INVALID = 0x02,
> +    SRP_TSK_MGMT_NOT_SUPPORTED  = 0x04,
> +    SRP_TSK_MGMT_FAILED         = 0x05
> +};
> +
>  struct srp_direct_buf {
>      uint64_t    va;
>      uint32_t    key;
> 

  reply	other threads:[~2013-07-26  9:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26  9:20 [Qemu-devel] [PATCH v4] spapr-vscsi: add task management Alexey Kardashevskiy
2013-07-26  9:34 ` Paolo Bonzini [this message]
2013-07-26 10:25   ` Alexey Kardashevskiy
2013-07-26 11:30     ` 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=51F242A5.3060704@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.