aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_common.h
diff options
context:
space:
mode:
authorMichael Albaugh <Michael.Albaugh@qlogic.com>2007-06-18 14:24:47 -0700
committerRoland Dreier <rolandd@cisco.com>2007-07-09 20:12:26 -0700
commite8e7ad711509f576b1bffd92c3ae4672fe92ec48 (patch)
treebdb211849ca0354632882161ff46647bc4a1f015 /drivers/infiniband/hw/ipath/ipath_common.h
parentIB/ipath: Make handling of one subport consistent (diff)
downloadlinux-dev-e8e7ad711509f576b1bffd92c3ae4672fe92ec48.tar.xz
linux-dev-e8e7ad711509f576b1bffd92c3ae4672fe92ec48.zip
IB/ipath: Add capability to modify PBC word
During compliance testing and when debugging some interconnect issues, it is very useful to be able to send malformed packets, without having the device signal them as malformed (drop, or terminate with EBP). The hardware supports this, but the driver "diagnostic packet" interface did not. Extend capability to send specific malformed packets for testing. Signed-off-by: Michael Albaugh <Michael.Albaugh@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_common.h')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_common.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_common.h b/drivers/infiniband/hw/ipath/ipath_common.h
index 12e1349cd03e..f70788c25ea6 100644
--- a/drivers/infiniband/hw/ipath/ipath_common.h
+++ b/drivers/infiniband/hw/ipath/ipath_common.h
@@ -501,13 +501,30 @@ struct __ipath_sendpkt {
struct ipath_iovec sps_iov[4];
};
-/* Passed into diag data special file's ->write method. */
+/*
+ * diagnostics can send a packet by "writing" one of the following
+ * two structs to diag data special file
+ * The first is the legacy version for backward compatibility
+ */
struct ipath_diag_pkt {
__u32 unit;
__u64 data;
__u32 len;
};
+/* The second diag_pkt struct is the expanded version that allows
+ * more control over the packet, specifically, by allowing a custom
+ * pbc (+ extra) qword, so that special modes and deliberate
+ * changes to CRCs can be used. The elements were also re-ordered
+ * for better alignment and to avoid padding issues.
+ */
+struct ipath_diag_xpkt {
+ __u64 data;
+ __u64 pbc_wd;
+ __u32 unit;
+ __u32 len;
+};
+
/*
* Data layout in I2C flash (for GUID, etc.)
* All fields are little-endian binary unless otherwise stated