diff options
author | Michael Albaugh <Michael.Albaugh@qlogic.com> | 2007-06-18 17:24:47 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-09 23:12:26 -0400 |
commit | e8e7ad711509f576b1bffd92c3ae4672fe92ec48 (patch) | |
tree | bdb211849ca0354632882161ff46647bc4a1f015 /drivers/infiniband/hw/ipath/ipath_common.h | |
parent | bacf4013530e7fc230a8aa0c6ea3c17fc2f47665 (diff) |
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.h | 19 |
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 { | |||
501 | struct ipath_iovec sps_iov[4]; | 501 | struct ipath_iovec sps_iov[4]; |
502 | }; | 502 | }; |
503 | 503 | ||
504 | /* Passed into diag data special file's ->write method. */ | 504 | /* |
505 | * diagnostics can send a packet by "writing" one of the following | ||
506 | * two structs to diag data special file | ||
507 | * The first is the legacy version for backward compatibility | ||
508 | */ | ||
505 | struct ipath_diag_pkt { | 509 | struct ipath_diag_pkt { |
506 | __u32 unit; | 510 | __u32 unit; |
507 | __u64 data; | 511 | __u64 data; |
508 | __u32 len; | 512 | __u32 len; |
509 | }; | 513 | }; |
510 | 514 | ||
515 | /* The second diag_pkt struct is the expanded version that allows | ||
516 | * more control over the packet, specifically, by allowing a custom | ||
517 | * pbc (+ extra) qword, so that special modes and deliberate | ||
518 | * changes to CRCs can be used. The elements were also re-ordered | ||
519 | * for better alignment and to avoid padding issues. | ||
520 | */ | ||
521 | struct ipath_diag_xpkt { | ||
522 | __u64 data; | ||
523 | __u64 pbc_wd; | ||
524 | __u32 unit; | ||
525 | __u32 len; | ||
526 | }; | ||
527 | |||
511 | /* | 528 | /* |
512 | * Data layout in I2C flash (for GUID, etc.) | 529 | * Data layout in I2C flash (for GUID, etc.) |
513 | * All fields are little-endian binary unless otherwise stated | 530 | * All fields are little-endian binary unless otherwise stated |