From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: [PATCH] xen/pciif: Clarify what values go in op->err and op->result. Date: Tue, 31 Mar 2015 10:58:32 -0400 Message-ID: <1427813912-6593-1-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.campbell@citrix.com, ian.jackson@eu.citrix.com, jbeulich@suse.com, keir@xen.org, tim@xen.org, xen-devel@lists.xen.org Cc: Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org 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 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 --- 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