[openib-general] [PATCH] ehca: remove dead code
Roland Dreier
rolandd at cisco.com
Mon Nov 28 20:28:49 PST 2005
ib2ehca_mask() is not used anywhere that I can find.
Signed-off-by: Roland Dreier <rolandd at cisco.com>
---
Index: infiniband/hw/ehca/ehca_qp.c
===================================================================
--- infiniband/hw/ehca/ehca_qp.c (revision 4128)
+++ infiniband/hw/ehca/ehca_qp.c (working copy)
@@ -490,87 +490,6 @@ static inline int ibqptype2servicetype(e
}
}
-/** @brief returns ehca bit mask corresponding to given ib attr mask
- * as parameter of modify qp
- */
-static inline u64 ib2ehca_mask(enum ib_qp_attr_mask attr_mask)
-{
- u64 update_mask = 0;
- if (attr_mask & IB_QP_PKEY_INDEX) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_PRIM_P_KEY_IDX, 1);
- }
- if (attr_mask & IB_QP_PORT) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_PRIM_PHYS_PORT, 1);
- }
- if (attr_mask & IB_QP_QKEY) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_QKEY, 1);
- }
- if (attr_mask & IB_QP_AV) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_DLID, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SOURCE_PATH_BITS, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SERVICE_LEVEL, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_MAX_STATIC_RATE, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SEND_GRH_FLAG, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SOURCE_GID_IDX, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_DEST_GID, 1);
- }
-
- if (attr_mask & IB_QP_PATH_MTU) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_PATH_MTU, 1);
- }
- if (attr_mask & IB_QP_TIMEOUT) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_TIMEOUT, 1);
- }
- if (attr_mask & IB_QP_RETRY_CNT) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_RETRY_COUNT, 1);
- }
- if (attr_mask & IB_QP_RNR_RETRY) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_RNR_RETRY_COUNT, 1);
- }
- if (attr_mask & IB_QP_RQ_PSN) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_RECEIVE_PSN, 1);
- }
- if (attr_mask & IB_QP_MAX_DEST_RD_ATOMIC) {
- update_mask |=
- EHCA_BMASK_SET
- (MQPCB_MASK_RDMA_ATOMIC_OUTST_DEST_QP, 1);
- }
- if (attr_mask & IB_QP_MAX_QP_RD_ATOMIC) {
- update_mask |=
- EHCA_BMASK_SET(MQPCB_MASK_RDMA_NR_ATOMIC_RESP_RES, 1);
- }
- if (attr_mask & IB_QP_ALT_PATH) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_DLID, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SOURCE_PATH_BITS, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SERVICE_LEVEL, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_MAX_STATIC_RATE, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SEND_GRH_FLAG, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SOURCE_GID_IDX, 1);
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_DEST_GID, 1);
- }
- if (attr_mask & IB_QP_MIN_RNR_TIMER) {
- update_mask |=
- EHCA_BMASK_SET(MQPCB_MASK_MIN_RNR_NAK_TIMER_FIELD, 1);
- }
- if (attr_mask & IB_QP_SQ_PSN) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SEND_PSN, 1);
- }
- if (attr_mask & IB_QP_DEST_QPN) {
- update_mask |= EHCA_BMASK_SET(MQPCB_MASK_DEST_QP_NR, 1);
- }
- if (attr_mask & IB_QP_PATH_MIG_STATE) {
- update_mask |=
- EHCA_BMASK_SET(MQPCB_MASK_PATH_MIGRATION_STATE, 1);
- }
- if (attr_mask & IB_QP_CAP) {
- update_mask |=
- EHCA_BMASK_SET(MQPCB_MASK_MAX_NR_OUTST_SEND_WR, 1);
- update_mask |=
- EHCA_BMASK_SET(MQPCB_MASK_MAX_NR_OUTST_RECV_WR, 1);
- }
- return update_mask;
-}
-
/* init_qp_queues - Initializes/constructs r/squeue and registers queue pages.
* returns 0 if successful,
* -EXXXX if not
More information about the general
mailing list