IB/ipath: simplify layering code
A lot of ipath layer code was only called in one place. Now that the ipath_core and ib_ipath drivers are merged, it's more sensible to simply inline the simple stuff that the layer code was doing. Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:

committed by
Roland Dreier

父節點
b1c1b6a30e
當前提交
34b2aafea3
@@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include "ipath_verbs.h"
|
||||
#include "ipath_common.h"
|
||||
#include "ipath_kernel.h"
|
||||
|
||||
/* cut down ridiculously long IB macro names */
|
||||
#define OP(x) IB_OPCODE_RC_##x
|
||||
@@ -540,7 +540,7 @@ static void send_rc_ack(struct ipath_qp *qp)
|
||||
lrh0 = IPATH_LRH_GRH;
|
||||
}
|
||||
/* read pkey_index w/o lock (its atomic) */
|
||||
bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index);
|
||||
bth0 = ipath_get_pkey(dev->dd, qp->s_pkey_index);
|
||||
if (qp->r_nak_state)
|
||||
ohdr->u.aeth = cpu_to_be32((qp->r_msn & IPATH_MSN_MASK) |
|
||||
(qp->r_nak_state <<
|
||||
@@ -557,7 +557,7 @@ static void send_rc_ack(struct ipath_qp *qp)
|
||||
hdr.lrh[0] = cpu_to_be16(lrh0);
|
||||
hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid);
|
||||
hdr.lrh[2] = cpu_to_be16(hwords + SIZE_OF_CRC);
|
||||
hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd));
|
||||
hdr.lrh[3] = cpu_to_be16(dev->dd->ipath_lid);
|
||||
ohdr->bth[0] = cpu_to_be32(bth0);
|
||||
ohdr->bth[1] = cpu_to_be32(qp->remote_qpn);
|
||||
ohdr->bth[2] = cpu_to_be32(qp->r_ack_psn & IPATH_PSN_MASK);
|
||||
@@ -1323,8 +1323,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
|
||||
* the eager header buffer size to 56 bytes so the last 4
|
||||
* bytes of the BTH header (PSN) is in the data buffer.
|
||||
*/
|
||||
header_in_data =
|
||||
ipath_layer_get_rcvhdrentsize(dev->dd) == 16;
|
||||
header_in_data = dev->dd->ipath_rcvhdrentsize == 16;
|
||||
if (header_in_data) {
|
||||
psn = be32_to_cpu(((__be32 *) data)[0]);
|
||||
data += sizeof(__be32);
|
||||
|
Reference in New Issue
Block a user