Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma

Pull rdma fixes from Jason Gunthorpe:

- Add a missing mutex_destroy() in rxe

- Enhance the debugging print for cm_destroy failures to help debug
these

- Fix mlx5 MAD processing in cases where multiport devices are running
in switchedev mode

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
RDMA/mlx5: Fix port number for counter query in multi-port configuration
RDMA/cm: Print the old state when cm_destroy_id gets timeout
RDMA/rxe: Fix the problem "mutex_destroy missing"

+11 -5
+7 -4
drivers/infiniband/core/cm.c
··· 1026 1026 } 1027 1027 } 1028 1028 1029 - static noinline void cm_destroy_id_wait_timeout(struct ib_cm_id *cm_id) 1029 + static noinline void cm_destroy_id_wait_timeout(struct ib_cm_id *cm_id, 1030 + enum ib_cm_state old_state) 1030 1031 { 1031 1032 struct cm_id_private *cm_id_priv; 1032 1033 1033 1034 cm_id_priv = container_of(cm_id, struct cm_id_private, id); 1034 - pr_err("%s: cm_id=%p timed out. state=%d refcnt=%d\n", __func__, 1035 - cm_id, cm_id->state, refcount_read(&cm_id_priv->refcount)); 1035 + pr_err("%s: cm_id=%p timed out. state %d -> %d, refcnt=%d\n", __func__, 1036 + cm_id, old_state, cm_id->state, refcount_read(&cm_id_priv->refcount)); 1036 1037 } 1037 1038 1038 1039 static void cm_destroy_id(struct ib_cm_id *cm_id, int err) 1039 1040 { 1040 1041 struct cm_id_private *cm_id_priv; 1042 + enum ib_cm_state old_state; 1041 1043 struct cm_work *work; 1042 1044 int ret; 1043 1045 1044 1046 cm_id_priv = container_of(cm_id, struct cm_id_private, id); 1045 1047 spin_lock_irq(&cm_id_priv->lock); 1048 + old_state = cm_id->state; 1046 1049 retest: 1047 1050 switch (cm_id->state) { 1048 1051 case IB_CM_LISTEN: ··· 1154 1151 msecs_to_jiffies( 1155 1152 CM_DESTROY_ID_WAIT_TIMEOUT)); 1156 1153 if (!ret) /* timeout happened */ 1157 - cm_destroy_id_wait_timeout(cm_id); 1154 + cm_destroy_id_wait_timeout(cm_id, old_state); 1158 1155 } while (!ret); 1159 1156 1160 1157 while ((work = cm_dequeue_work(cm_id_priv)) != NULL)
+2 -1
drivers/infiniband/hw/mlx5/mad.c
··· 188 188 mdev = dev->mdev; 189 189 mdev_port_num = 1; 190 190 } 191 - if (MLX5_CAP_GEN(dev->mdev, num_ports) == 1) { 191 + if (MLX5_CAP_GEN(dev->mdev, num_ports) == 1 && 192 + !mlx5_core_mp_enabled(mdev)) { 192 193 /* set local port to one for Function-Per-Port HCA. */ 193 194 mdev = dev->mdev; 194 195 mdev_port_num = 1;
+2
drivers/infiniband/sw/rxe/rxe.c
··· 33 33 34 34 if (rxe->tfm) 35 35 crypto_free_shash(rxe->tfm); 36 + 37 + mutex_destroy(&rxe->usdev_lock); 36 38 } 37 39 38 40 /* initialize rxe device parameters */