From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: ian.campbell@citrix.com, ian.jackson@eu.citrix.com,
jbeulich@suse.com, keir@xen.org, tim@xen.org,
xen-devel@lists.xen.org
Subject: Re: [PATCH] xen/pciif: Clarify what values go in op->err and op->result.
Date: Tue, 31 Mar 2015 11:27:19 -0400 [thread overview]
Message-ID: <20150331152719.GD5088@l.oracle.com> (raw)
In-Reply-To: <1427813912-6593-1-git-send-email-konrad.wilk@oracle.com>
On Tue, Mar 31, 2015 at 10:58:32AM -0400, Konrad Rzeszutek Wilk wrote:
> The earlier comment says that errno values go in op->err.
> However all implementations (NetBSD, Linux) of the most
> common operations use XEN_PCI_ERR_* instead of -EXX values.
>
> The exception is the xen-pciback in Linux code when doing
And also linux-2.6.18.hg.
> XEN_PCI_OP_enable_msix can stash the -EXX in op->result
> and in op->err.
>
> As such lets clarify what '->err' and '->result' are
> suppose to contain.
>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> xen/include/public/io/pciif.h | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/xen/include/public/io/pciif.h b/xen/include/public/io/pciif.h
> index a4ba13c..535963a 100644
> --- a/xen/include/public/io/pciif.h
> +++ b/xen/include/public/io/pciif.h
> @@ -71,7 +71,7 @@ struct xen_pci_op {
> /* IN: what action to perform: XEN_PCI_OP_* */
> uint32_t cmd;
>
> - /* OUT: will contain an error number (if any) from errno.h */
> + /* OUT: will contain an XEN_PCI_ERR_* value. */
> int32_t err;
>
> /* IN: which device to touch */
> @@ -83,7 +83,9 @@ struct xen_pci_op {
> int32_t offset;
> int32_t size;
>
> - /* IN/OUT: Contains the result after a READ or the value to WRITE */
> + /* IN/OUT: Contains the result after a READ or the value to WRITE.
> + * If the err does not have XEN_PCI_ERR_success, depending on
> + * XEN_PCI_OP_* might have the errno value. */
> uint32_t value;
> /* IN: Contains extra infor for this operation */
> uint32_t info;
> --
> 2.1.0
>
next prev parent reply other threads:[~2015-03-31 15:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-31 14:58 [PATCH] xen/pciif: Clarify what values go in op->err and op->result Konrad Rzeszutek Wilk
2015-03-31 15:27 ` Konrad Rzeszutek Wilk [this message]
2015-03-31 16:05 ` Ian Campbell
2015-03-31 16:29 ` Konrad Rzeszutek Wilk
2015-04-15 16:05 ` Ian Campbell
2015-04-15 18:01 ` Konrad Rzeszutek Wilk
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=20150331152719.GD5088@l.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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.