diff options
| author | David S. Miller <davem@davemloft.net> | 2019-05-02 22:14:21 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-05-02 22:14:21 -0400 |
| commit | ff24e4980a68d83090a02fda081741a410fe8eef (patch) | |
| tree | 4d874dfcaf2bb8c3abc2446af9447a983402c0ae /drivers/infiniband/hw/mlx5 | |
| parent | 26f146ed971c0e4a264ce525d7a66a71ef73690d (diff) | |
| parent | ea9866793d1e925b4d320eaea409263b2a568f38 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Three trivial overlapping conflicts.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/hw/mlx5')
| -rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 12 | ||||
| -rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 11 |
2 files changed, 14 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 0845e95d2d11..347e3cac254e 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c | |||
| @@ -1119,6 +1119,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, | |||
| 1119 | if (MLX5_CAP_GEN(mdev, qp_packet_based)) | 1119 | if (MLX5_CAP_GEN(mdev, qp_packet_based)) |
| 1120 | resp.flags |= | 1120 | resp.flags |= |
| 1121 | MLX5_IB_QUERY_DEV_RESP_PACKET_BASED_CREDIT_MODE; | 1121 | MLX5_IB_QUERY_DEV_RESP_PACKET_BASED_CREDIT_MODE; |
| 1122 | |||
| 1123 | resp.flags |= MLX5_IB_QUERY_DEV_RESP_FLAGS_SCAT2CQE_DCT; | ||
| 1122 | } | 1124 | } |
| 1123 | 1125 | ||
| 1124 | if (field_avail(typeof(resp), sw_parsing_caps, | 1126 | if (field_avail(typeof(resp), sw_parsing_caps, |
| @@ -2066,6 +2068,7 @@ static int mlx5_ib_mmap_clock_info_page(struct mlx5_ib_dev *dev, | |||
| 2066 | 2068 | ||
| 2067 | if (vma->vm_flags & VM_WRITE) | 2069 | if (vma->vm_flags & VM_WRITE) |
| 2068 | return -EPERM; | 2070 | return -EPERM; |
| 2071 | vma->vm_flags &= ~VM_MAYWRITE; | ||
| 2069 | 2072 | ||
| 2070 | if (!dev->mdev->clock_info_page) | 2073 | if (!dev->mdev->clock_info_page) |
| 2071 | return -EOPNOTSUPP; | 2074 | return -EOPNOTSUPP; |
| @@ -2231,19 +2234,18 @@ static int mlx5_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vm | |||
| 2231 | 2234 | ||
| 2232 | if (vma->vm_flags & VM_WRITE) | 2235 | if (vma->vm_flags & VM_WRITE) |
| 2233 | return -EPERM; | 2236 | return -EPERM; |
| 2237 | vma->vm_flags &= ~VM_MAYWRITE; | ||
| 2234 | 2238 | ||
| 2235 | /* Don't expose to user-space information it shouldn't have */ | 2239 | /* Don't expose to user-space information it shouldn't have */ |
| 2236 | if (PAGE_SIZE > 4096) | 2240 | if (PAGE_SIZE > 4096) |
| 2237 | return -EOPNOTSUPP; | 2241 | return -EOPNOTSUPP; |
| 2238 | 2242 | ||
| 2239 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
| 2240 | pfn = (dev->mdev->iseg_base + | 2243 | pfn = (dev->mdev->iseg_base + |
| 2241 | offsetof(struct mlx5_init_seg, internal_timer_h)) >> | 2244 | offsetof(struct mlx5_init_seg, internal_timer_h)) >> |
| 2242 | PAGE_SHIFT; | 2245 | PAGE_SHIFT; |
| 2243 | if (io_remap_pfn_range(vma, vma->vm_start, pfn, | 2246 | return rdma_user_mmap_io(&context->ibucontext, vma, pfn, |
| 2244 | PAGE_SIZE, vma->vm_page_prot)) | 2247 | PAGE_SIZE, |
| 2245 | return -EAGAIN; | 2248 | pgprot_noncached(vma->vm_page_prot)); |
| 2246 | break; | ||
| 2247 | case MLX5_IB_MMAP_CLOCK_INFO: | 2249 | case MLX5_IB_MMAP_CLOCK_INFO: |
| 2248 | return mlx5_ib_mmap_clock_info_page(dev, vma, context); | 2250 | return mlx5_ib_mmap_clock_info_page(dev, vma, context); |
| 2249 | 2251 | ||
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index ef7d69269a88..fc67d78ca959 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c | |||
| @@ -1818,13 +1818,16 @@ static void configure_responder_scat_cqe(struct ib_qp_init_attr *init_attr, | |||
| 1818 | 1818 | ||
| 1819 | rcqe_sz = mlx5_ib_get_cqe_size(init_attr->recv_cq); | 1819 | rcqe_sz = mlx5_ib_get_cqe_size(init_attr->recv_cq); |
| 1820 | 1820 | ||
| 1821 | if (rcqe_sz == 128) { | 1821 | if (init_attr->qp_type == MLX5_IB_QPT_DCT) { |
| 1822 | MLX5_SET(qpc, qpc, cs_res, MLX5_RES_SCAT_DATA64_CQE); | 1822 | if (rcqe_sz == 128) |
| 1823 | MLX5_SET(dctc, qpc, cs_res, MLX5_RES_SCAT_DATA64_CQE); | ||
| 1824 | |||
| 1823 | return; | 1825 | return; |
| 1824 | } | 1826 | } |
| 1825 | 1827 | ||
| 1826 | if (init_attr->qp_type != MLX5_IB_QPT_DCT) | 1828 | MLX5_SET(qpc, qpc, cs_res, |
| 1827 | MLX5_SET(qpc, qpc, cs_res, MLX5_RES_SCAT_DATA32_CQE); | 1829 | rcqe_sz == 128 ? MLX5_RES_SCAT_DATA64_CQE : |
| 1830 | MLX5_RES_SCAT_DATA32_CQE); | ||
| 1828 | } | 1831 | } |
| 1829 | 1832 | ||
| 1830 | static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev, | 1833 | static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev, |
