Commit 7e2c2328 authored by Roland Dreier's avatar Roland Dreier

Merge branches 'ipoib', 'mlx4' and 'nes' into for-linus

...@@ -1342,6 +1342,12 @@ static __be32 convert_access(int acc) ...@@ -1342,6 +1342,12 @@ static __be32 convert_access(int acc)
static void set_fmr_seg(struct mlx4_wqe_fmr_seg *fseg, struct ib_send_wr *wr) static void set_fmr_seg(struct mlx4_wqe_fmr_seg *fseg, struct ib_send_wr *wr)
{ {
struct mlx4_ib_fast_reg_page_list *mfrpl = to_mfrpl(wr->wr.fast_reg.page_list); struct mlx4_ib_fast_reg_page_list *mfrpl = to_mfrpl(wr->wr.fast_reg.page_list);
int i;
for (i = 0; i < wr->wr.fast_reg.page_list_len; ++i)
wr->wr.fast_reg.page_list->page_list[i] =
cpu_to_be64(wr->wr.fast_reg.page_list->page_list[i] |
MLX4_MTT_FLAG_PRESENT);
fseg->flags = convert_access(wr->wr.fast_reg.access_flags); fseg->flags = convert_access(wr->wr.fast_reg.access_flags);
fseg->mem_key = cpu_to_be32(wr->wr.fast_reg.rkey); fseg->mem_key = cpu_to_be32(wr->wr.fast_reg.rkey);
......
...@@ -1956,13 +1956,6 @@ static int mini_cm_reject(struct nes_cm_core *cm_core, ...@@ -1956,13 +1956,6 @@ static int mini_cm_reject(struct nes_cm_core *cm_core,
return ret; return ret;
cleanup_retrans_entry(cm_node); cleanup_retrans_entry(cm_node);
cm_node->state = NES_CM_STATE_CLOSED; cm_node->state = NES_CM_STATE_CLOSED;
ret = send_fin(cm_node, NULL);
if (cm_node->accept_pend) {
BUG_ON(!cm_node->listener);
atomic_dec(&cm_node->listener->pend_accepts_cnt);
BUG_ON(atomic_read(&cm_node->listener->pend_accepts_cnt) < 0);
}
ret = send_reset(cm_node, NULL); ret = send_reset(cm_node, NULL);
return ret; return ret;
...@@ -2383,6 +2376,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp) ...@@ -2383,6 +2376,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
atomic_inc(&cm_disconnects); atomic_inc(&cm_disconnects);
cm_event.event = IW_CM_EVENT_DISCONNECT; cm_event.event = IW_CM_EVENT_DISCONNECT;
if (last_ae == NES_AEQE_AEID_LLP_CONNECTION_RESET) { if (last_ae == NES_AEQE_AEID_LLP_CONNECTION_RESET) {
issued_disconnect_reset = 1;
cm_event.status = IW_CM_EVENT_STATUS_RESET; cm_event.status = IW_CM_EVENT_STATUS_RESET;
nes_debug(NES_DBG_CM, "Generating a CM " nes_debug(NES_DBG_CM, "Generating a CM "
"Disconnect Event (status reset) for " "Disconnect Event (status reset) for "
...@@ -2508,7 +2502,6 @@ static int nes_disconnect(struct nes_qp *nesqp, int abrupt) ...@@ -2508,7 +2502,6 @@ static int nes_disconnect(struct nes_qp *nesqp, int abrupt)
nes_debug(NES_DBG_CM, "Call close API\n"); nes_debug(NES_DBG_CM, "Call close API\n");
g_cm_core->api->close(g_cm_core, nesqp->cm_node); g_cm_core->api->close(g_cm_core, nesqp->cm_node);
nesqp->cm_node = NULL;
} }
return ret; return ret;
...@@ -2837,6 +2830,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) ...@@ -2837,6 +2830,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
cm_node->apbvt_set = 1; cm_node->apbvt_set = 1;
nesqp->cm_node = cm_node; nesqp->cm_node = cm_node;
cm_node->nesqp = nesqp; cm_node->nesqp = nesqp;
nes_add_ref(&nesqp->ibqp);
return 0; return 0;
} }
...@@ -3167,7 +3161,6 @@ static void cm_event_connect_error(struct nes_cm_event *event) ...@@ -3167,7 +3161,6 @@ static void cm_event_connect_error(struct nes_cm_event *event)
if (ret) if (ret)
printk(KERN_ERR "%s[%u] OFA CM event_handler returned, " printk(KERN_ERR "%s[%u] OFA CM event_handler returned, "
"ret=%d\n", __func__, __LINE__, ret); "ret=%d\n", __func__, __LINE__, ret);
nes_rem_ref(&nesqp->ibqp);
cm_id->rem_ref(cm_id); cm_id->rem_ref(cm_id);
rem_ref_cm_node(event->cm_node->cm_core, event->cm_node); rem_ref_cm_node(event->cm_node->cm_core, event->cm_node);
......
...@@ -67,11 +67,10 @@ struct mlx4_mpt_entry { ...@@ -67,11 +67,10 @@ struct mlx4_mpt_entry {
#define MLX4_MPT_FLAG_PHYSICAL (1 << 9) #define MLX4_MPT_FLAG_PHYSICAL (1 << 9)
#define MLX4_MPT_FLAG_REGION (1 << 8) #define MLX4_MPT_FLAG_REGION (1 << 8)
#define MLX4_MPT_PD_FLAG_FAST_REG (1 << 26) #define MLX4_MPT_PD_FLAG_FAST_REG (1 << 27)
#define MLX4_MPT_PD_FLAG_RAE (1 << 28)
#define MLX4_MPT_PD_FLAG_EN_INV (3 << 24) #define MLX4_MPT_PD_FLAG_EN_INV (3 << 24)
#define MLX4_MTT_FLAG_PRESENT 1
#define MLX4_MPT_STATUS_SW 0xF0 #define MLX4_MPT_STATUS_SW 0xF0
#define MLX4_MPT_STATUS_HW 0x00 #define MLX4_MPT_STATUS_HW 0x00
...@@ -348,7 +347,10 @@ int mlx4_mr_enable(struct mlx4_dev *dev, struct mlx4_mr *mr) ...@@ -348,7 +347,10 @@ int mlx4_mr_enable(struct mlx4_dev *dev, struct mlx4_mr *mr)
if (mr->mtt.order >= 0 && mr->mtt.page_shift == 0) { if (mr->mtt.order >= 0 && mr->mtt.page_shift == 0) {
/* fast register MR in free state */ /* fast register MR in free state */
mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_FREE); mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_FREE);
mpt_entry->pd_flags |= cpu_to_be32(MLX4_MPT_PD_FLAG_FAST_REG); mpt_entry->pd_flags |= cpu_to_be32(MLX4_MPT_PD_FLAG_FAST_REG |
MLX4_MPT_PD_FLAG_RAE);
mpt_entry->mtt_sz = cpu_to_be32((1 << mr->mtt.order) *
MLX4_MTT_ENTRY_PER_SEG);
} else { } else {
mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_SW_OWNS); mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_SW_OWNS);
} }
......
...@@ -141,6 +141,10 @@ enum { ...@@ -141,6 +141,10 @@ enum {
MLX4_STAT_RATE_OFFSET = 5 MLX4_STAT_RATE_OFFSET = 5
}; };
enum {
MLX4_MTT_FLAG_PRESENT = 1
};
static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor)
{ {
return (major << 32) | (minor << 16) | subminor; return (major << 32) | (minor << 16) | subminor;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment