mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 07:39:47 +00:00
InfiniBand/RDMA fixes for 3.16
- cxgb4 hardware driver regression fixes - mlx5 hardware driver regression fixes -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCAAGBQJTyYWiAAoJEENa44ZhAt0hKkMP/ROnFwRtk0DKNGbyZLx/gLpK hEvzNeqZKn8OS2eHMvkP+pbKWrm1GoPcPEMZVfZv8dqwS7PzcmHVsA7WjzJF0mXh PLuPZfLHu4UZAZttP7Hm8XV+p7uthD/Fvk60x/uzboMZhSjFt4Khb0tEvezZ8Jyh 5bbkiCp2PokD4z32fFoErTxa5XE8bYuqL70G9YyMuwdZWS2W4WbjihYHbi8vBzFd IsAvl4Ms/Fs8B5aeK0beeuals0yLYishPQY/F+r10GUQ3Q3JlD1/5j/MML3SZOlX FfYC3BDm3zgVHdaDTohlXbGVvJbziI5xkj0cUxVIk5f3SVZC36/BR+AxtjlhLjvR GEh9wwCP1cfXt7tRFBOS11M869oUOjG/5SQozsnJTAztpll85wxIWOyCCupRSokX 90YNFtdGTBMkkm5vbddpekw+ku/qhrG8oNhKLMXoP1v4nV/8HiVG+oZdzQYrPPOp KMkNtC6ItLCXBRF0hUGGAszUaFap0ZFCfWk9d8W+xpOnFzVgE8pkG2kRH1fty5ja HbI/0OhiX5x+lYhyzGUb+AnjNTT5yYba1M+t1Sr3JC5AxBzwiS4FYq7TRTnNGt+p H6/+WMw+PcCpCaOcVCivbFCl1gceA7bKCMuwjjFoO0CjDT8Tr6pX3gRcDvrxHVGr rLi5EcHdgJEsPfaUACbv =JbA3 -----END PGP SIGNATURE----- Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband Pull infiniband/rdma fixes from Roland Dreier: - cxgb4 hardware driver regression fixes - mlx5 hardware driver regression fixes * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/mlx5: Enable "block multicast loopback" for kernel consumers RDMA/cxgb4: Call iwpm_init() only once mlx5_core: Fix possible race between mr tree insert/delete RDMA/cxgb4: Initialize the device status page RDMA/cxgb4: Clean up connection on ARP error RDMA/cxgb4: Fix skb_leak in reject_cr()
This commit is contained in:
commit
b579fcca32
@ -432,8 +432,17 @@ static void arp_failure_discard(void *handle, struct sk_buff *skb)
|
||||
*/
|
||||
static void act_open_req_arp_failure(void *handle, struct sk_buff *skb)
|
||||
{
|
||||
struct c4iw_ep *ep = handle;
|
||||
|
||||
printk(KERN_ERR MOD "ARP failure duing connect\n");
|
||||
kfree_skb(skb);
|
||||
connect_reply_upcall(ep, -EHOSTUNREACH);
|
||||
state_set(&ep->com, DEAD);
|
||||
remove_handle(ep->com.dev, &ep->com.dev->atid_idr, ep->atid);
|
||||
cxgb4_free_atid(ep->com.dev->rdev.lldi.tids, ep->atid);
|
||||
dst_release(ep->dst);
|
||||
cxgb4_l2t_release(ep->l2t);
|
||||
c4iw_put_ep(&ep->com);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -658,7 +667,7 @@ static int send_connect(struct c4iw_ep *ep)
|
||||
opt2 |= T5_OPT_2_VALID;
|
||||
opt2 |= V_CONG_CNTRL(CONG_ALG_TAHOE);
|
||||
}
|
||||
t4_set_arp_err_handler(skb, NULL, act_open_req_arp_failure);
|
||||
t4_set_arp_err_handler(skb, ep, act_open_req_arp_failure);
|
||||
|
||||
if (is_t4(ep->com.dev->rdev.lldi.adapter_type)) {
|
||||
if (ep->com.remote_addr.ss_family == AF_INET) {
|
||||
@ -2180,7 +2189,6 @@ static void reject_cr(struct c4iw_dev *dev, u32 hwtid, struct sk_buff *skb)
|
||||
PDBG("%s c4iw_dev %p tid %u\n", __func__, dev, hwtid);
|
||||
BUG_ON(skb_cloned(skb));
|
||||
skb_trim(skb, sizeof(struct cpl_tid_release));
|
||||
skb_get(skb);
|
||||
release_tid(&dev->rdev, hwtid, skb);
|
||||
return;
|
||||
}
|
||||
@ -3917,7 +3925,7 @@ int __init c4iw_cm_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __exit c4iw_cm_term(void)
|
||||
void c4iw_cm_term(void)
|
||||
{
|
||||
WARN_ON(!list_empty(&timeout_list));
|
||||
flush_workqueue(workq);
|
||||
|
@ -696,6 +696,7 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
|
||||
pr_err(MOD "error allocating status page\n");
|
||||
goto err4;
|
||||
}
|
||||
rdev->status_page->db_off = 0;
|
||||
return 0;
|
||||
err4:
|
||||
c4iw_rqtpool_destroy(rdev);
|
||||
@ -729,7 +730,6 @@ static void c4iw_dealloc(struct uld_ctx *ctx)
|
||||
if (ctx->dev->rdev.oc_mw_kva)
|
||||
iounmap(ctx->dev->rdev.oc_mw_kva);
|
||||
ib_dealloc_device(&ctx->dev->ibdev);
|
||||
iwpm_exit(RDMA_NL_C4IW);
|
||||
ctx->dev = NULL;
|
||||
}
|
||||
|
||||
@ -826,12 +826,6 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)
|
||||
setup_debugfs(devp);
|
||||
}
|
||||
|
||||
ret = iwpm_init(RDMA_NL_C4IW);
|
||||
if (ret) {
|
||||
pr_err("port mapper initialization failed with %d\n", ret);
|
||||
ib_dealloc_device(&devp->ibdev);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
return devp;
|
||||
}
|
||||
@ -1332,6 +1326,15 @@ static int __init c4iw_init_module(void)
|
||||
pr_err("%s[%u]: Failed to add netlink callback\n"
|
||||
, __func__, __LINE__);
|
||||
|
||||
err = iwpm_init(RDMA_NL_C4IW);
|
||||
if (err) {
|
||||
pr_err("port mapper initialization failed with %d\n", err);
|
||||
ibnl_remove_client(RDMA_NL_C4IW);
|
||||
c4iw_cm_term();
|
||||
debugfs_remove_recursive(c4iw_debugfs_root);
|
||||
return err;
|
||||
}
|
||||
|
||||
cxgb4_register_uld(CXGB4_ULD_RDMA, &c4iw_uld_info);
|
||||
|
||||
return 0;
|
||||
@ -1349,6 +1352,7 @@ static void __exit c4iw_exit_module(void)
|
||||
}
|
||||
mutex_unlock(&dev_mutex);
|
||||
cxgb4_unregister_uld(CXGB4_ULD_RDMA);
|
||||
iwpm_exit(RDMA_NL_C4IW);
|
||||
ibnl_remove_client(RDMA_NL_C4IW);
|
||||
c4iw_cm_term();
|
||||
debugfs_remove_recursive(c4iw_debugfs_root);
|
||||
|
@ -908,7 +908,7 @@ int c4iw_destroy_ctrl_qp(struct c4iw_rdev *rdev);
|
||||
int c4iw_register_device(struct c4iw_dev *dev);
|
||||
void c4iw_unregister_device(struct c4iw_dev *dev);
|
||||
int __init c4iw_cm_init(void);
|
||||
void __exit c4iw_cm_term(void);
|
||||
void c4iw_cm_term(void);
|
||||
void c4iw_release_dev_ucontext(struct c4iw_rdev *rdev,
|
||||
struct c4iw_dev_ucontext *uctx);
|
||||
void c4iw_init_dev_ucontext(struct c4iw_rdev *rdev,
|
||||
|
@ -675,7 +675,7 @@ static int create_kernel_qp(struct mlx5_ib_dev *dev,
|
||||
int err;
|
||||
|
||||
uuari = &dev->mdev.priv.uuari;
|
||||
if (init_attr->create_flags & ~IB_QP_CREATE_SIGNATURE_EN)
|
||||
if (init_attr->create_flags & ~(IB_QP_CREATE_SIGNATURE_EN | IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK))
|
||||
return -EINVAL;
|
||||
|
||||
if (init_attr->qp_type == MLX5_IB_QPT_REG_UMR)
|
||||
|
@ -94,6 +94,11 @@ int mlx5_core_create_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr,
|
||||
write_lock_irq(&table->lock);
|
||||
err = radix_tree_insert(&table->tree, mlx5_base_mkey(mr->key), mr);
|
||||
write_unlock_irq(&table->lock);
|
||||
if (err) {
|
||||
mlx5_core_warn(dev, "failed radix tree insert of mr 0x%x, %d\n",
|
||||
mlx5_base_mkey(mr->key), err);
|
||||
mlx5_core_destroy_mkey(dev, mr);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
@ -104,12 +109,22 @@ int mlx5_core_destroy_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr)
|
||||
struct mlx5_mr_table *table = &dev->priv.mr_table;
|
||||
struct mlx5_destroy_mkey_mbox_in in;
|
||||
struct mlx5_destroy_mkey_mbox_out out;
|
||||
struct mlx5_core_mr *deleted_mr;
|
||||
unsigned long flags;
|
||||
int err;
|
||||
|
||||
memset(&in, 0, sizeof(in));
|
||||
memset(&out, 0, sizeof(out));
|
||||
|
||||
write_lock_irqsave(&table->lock, flags);
|
||||
deleted_mr = radix_tree_delete(&table->tree, mlx5_base_mkey(mr->key));
|
||||
write_unlock_irqrestore(&table->lock, flags);
|
||||
if (!deleted_mr) {
|
||||
mlx5_core_warn(dev, "failed radix tree delete of mr 0x%x\n",
|
||||
mlx5_base_mkey(mr->key));
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
in.hdr.opcode = cpu_to_be16(MLX5_CMD_OP_DESTROY_MKEY);
|
||||
in.mkey = cpu_to_be32(mlx5_mkey_to_idx(mr->key));
|
||||
err = mlx5_cmd_exec(dev, &in, sizeof(in), &out, sizeof(out));
|
||||
@ -119,10 +134,6 @@ int mlx5_core_destroy_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr)
|
||||
if (out.hdr.status)
|
||||
return mlx5_cmd_status_to_err(&out.hdr);
|
||||
|
||||
write_lock_irqsave(&table->lock, flags);
|
||||
radix_tree_delete(&table->tree, mlx5_base_mkey(mr->key));
|
||||
write_unlock_irqrestore(&table->lock, flags);
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(mlx5_core_destroy_mkey);
|
||||
|
Loading…
x
Reference in New Issue
Block a user