All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/pciif: Clarify what values go in op->err and op->result.
@ 2015-03-31 14:58 Konrad Rzeszutek Wilk
  2015-03-31 15:27 ` Konrad Rzeszutek Wilk
  2015-03-31 16:05 ` Ian Campbell
  0 siblings, 2 replies; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-03-31 14:58 UTC (permalink / raw)
  To: ian.campbell, ian.jackson, jbeulich, keir, tim, xen-devel
  Cc: Konrad Rzeszutek Wilk

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 <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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-15 18:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.