IB/qib,IB/hfi: Use core common header file
Use common header file structs, defines, and accessors in the drivers. The old declarations are removed. The repositioning of the includes allows for the removal of hfi1_message_header and replaces its use with ib_header. Also corrected are two issues with set_armed_to_active(): - The "packet" parameter is now a pointer as it should have been - The etype is validated to insure that the header is correct Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Reviewed-by: Don Hiatt <don.hiatt@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
7368ef0235
commit
261a435184
@@ -47,9 +47,9 @@
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include "trace.h"
|
||||
|
||||
u8 ibhdr_exhdr_len(struct hfi1_ib_header *hdr)
|
||||
u8 ibhdr_exhdr_len(struct ib_header *hdr)
|
||||
{
|
||||
struct hfi1_other_headers *ohdr;
|
||||
struct ib_other_headers *ohdr;
|
||||
u8 opcode;
|
||||
u8 lnh = (u8)(be16_to_cpu(hdr->lrh[0]) & 3);
|
||||
|
||||
@@ -72,11 +72,6 @@ u8 ibhdr_exhdr_len(struct hfi1_ib_header *hdr)
|
||||
|
||||
#define OP(transport, op) IB_OPCODE_## transport ## _ ## op
|
||||
|
||||
static u64 ib_u64_get(__be32 *p)
|
||||
{
|
||||
return ((u64)be32_to_cpu(p[0]) << 32) | be32_to_cpu(p[1]);
|
||||
}
|
||||
|
||||
static const char *parse_syndrome(u8 syndrome)
|
||||
{
|
||||
switch (syndrome >> 5) {
|
||||
@@ -113,8 +108,7 @@ const char *parse_everbs_hdrs(
|
||||
case OP(RC, RDMA_WRITE_ONLY_WITH_IMMEDIATE):
|
||||
case OP(UC, RDMA_WRITE_ONLY_WITH_IMMEDIATE):
|
||||
trace_seq_printf(p, RETH_PRN " " IMM_PRN,
|
||||
(unsigned long long)ib_u64_get(
|
||||
(__be32 *)&eh->rc.reth.vaddr),
|
||||
get_ib_reth_vaddr(&eh->rc.reth),
|
||||
be32_to_cpu(eh->rc.reth.rkey),
|
||||
be32_to_cpu(eh->rc.reth.length),
|
||||
be32_to_cpu(eh->rc.imm_data));
|
||||
@@ -126,8 +120,7 @@ const char *parse_everbs_hdrs(
|
||||
case OP(RC, RDMA_WRITE_ONLY):
|
||||
case OP(UC, RDMA_WRITE_ONLY):
|
||||
trace_seq_printf(p, RETH_PRN,
|
||||
(unsigned long long)ib_u64_get(
|
||||
(__be32 *)&eh->rc.reth.vaddr),
|
||||
get_ib_reth_vaddr(&eh->rc.reth),
|
||||
be32_to_cpu(eh->rc.reth.rkey),
|
||||
be32_to_cpu(eh->rc.reth.length));
|
||||
break;
|
||||
@@ -145,20 +138,16 @@ const char *parse_everbs_hdrs(
|
||||
be32_to_cpu(eh->at.aeth) >> 24,
|
||||
parse_syndrome(be32_to_cpu(eh->at.aeth) >> 24),
|
||||
be32_to_cpu(eh->at.aeth) & HFI1_MSN_MASK,
|
||||
(unsigned long long)
|
||||
ib_u64_get(eh->at.atomic_ack_eth));
|
||||
ib_u64_get(&eh->at.atomic_ack_eth));
|
||||
break;
|
||||
/* atomiceth */
|
||||
case OP(RC, COMPARE_SWAP):
|
||||
case OP(RC, FETCH_ADD):
|
||||
trace_seq_printf(p, ATOMICETH_PRN,
|
||||
(unsigned long long)ib_u64_get(
|
||||
eh->atomic_eth.vaddr),
|
||||
get_ib_ateth_vaddr(&eh->atomic_eth),
|
||||
eh->atomic_eth.rkey,
|
||||
(unsigned long long)ib_u64_get(
|
||||
(__be32 *)&eh->atomic_eth.swap_data),
|
||||
(unsigned long long)ib_u64_get(
|
||||
(__be32 *)&eh->atomic_eth.compare_data));
|
||||
get_ib_ateth_swap(&eh->atomic_eth),
|
||||
get_ib_ateth_compare(&eh->atomic_eth));
|
||||
break;
|
||||
/* deth */
|
||||
case OP(UD, SEND_ONLY):
|
||||
|
Reference in New Issue
Block a user