hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
....@@ -206,6 +206,9 @@
206206 if (priv->hca_caps & IB_DEVICE_MANAGED_FLOW_STEERING)
207207 init_attr.create_flags |= IB_QP_CREATE_NETIF_QP;
208208
209
+ if (priv->hca_caps & IB_DEVICE_RDMA_NETDEV_OPA)
210
+ init_attr.create_flags |= IB_QP_CREATE_NETDEV_USE;
211
+
209212 priv->qp = ib_create_qp(priv->pd, &init_attr);
210213 if (IS_ERR(priv->qp)) {
211214 pr_warn("%s: failed to create QP\n", ca->name);
....@@ -260,11 +263,8 @@
260263 priv->qp = NULL;
261264 }
262265
263
- if (ib_destroy_cq(priv->send_cq))
264
- ipoib_warn(priv, "ib_cq_destroy (send) failed\n");
265
-
266
- if (ib_destroy_cq(priv->recv_cq))
267
- ipoib_warn(priv, "ib_cq_destroy (recv) failed\n");
266
+ ib_destroy_cq(priv->send_cq);
267
+ ib_destroy_cq(priv->recv_cq);
268268 }
269269
270270 void ipoib_event(struct ib_event_handler *handler,
....@@ -277,10 +277,9 @@
277277 return;
278278
279279 ipoib_dbg(priv, "Event %d on device %s port %d\n", record->event,
280
- record->device->name, record->element.port_num);
280
+ dev_name(&record->device->dev), record->element.port_num);
281281
282
- if (record->event == IB_EVENT_SM_CHANGE ||
283
- record->event == IB_EVENT_CLIENT_REREGISTER) {
282
+ if (record->event == IB_EVENT_CLIENT_REREGISTER) {
284283 queue_work(ipoib_workqueue, &priv->flush_light);
285284 } else if (record->event == IB_EVENT_PORT_ERR ||
286285 record->event == IB_EVENT_PORT_ACTIVE ||