• Home
  • Raw
  • Download

Lines Matching refs:ib_dev

186 static void free_netdevs(struct ib_device *ib_dev);
821 pdata->ib_dev = device; in alloc_port_data()
1344 static void prevent_dealloc_device(struct ib_device *ib_dev) in prevent_dealloc_device() argument
1462 static void __ib_unregister_device(struct ib_device *ib_dev) in __ib_unregister_device() argument
1471 mutex_lock(&ib_dev->unregistration_lock); in __ib_unregister_device()
1472 if (!refcount_read(&ib_dev->refcount)) in __ib_unregister_device()
1475 disable_device(ib_dev); in __ib_unregister_device()
1478 free_netdevs(ib_dev); in __ib_unregister_device()
1480 ib_free_port_attrs(&ib_dev->coredev); in __ib_unregister_device()
1481 device_del(&ib_dev->dev); in __ib_unregister_device()
1482 ib_device_unregister_rdmacg(ib_dev); in __ib_unregister_device()
1483 ib_cache_cleanup_one(ib_dev); in __ib_unregister_device()
1489 if (ib_dev->ops.dealloc_driver && in __ib_unregister_device()
1490 ib_dev->ops.dealloc_driver != prevent_dealloc_device) { in __ib_unregister_device()
1491 WARN_ON(kref_read(&ib_dev->dev.kobj.kref) <= 1); in __ib_unregister_device()
1492 ib_dealloc_device(ib_dev); in __ib_unregister_device()
1495 mutex_unlock(&ib_dev->unregistration_lock); in __ib_unregister_device()
1512 void ib_unregister_device(struct ib_device *ib_dev) in ib_unregister_device() argument
1514 get_device(&ib_dev->dev); in ib_unregister_device()
1515 __ib_unregister_device(ib_dev); in ib_unregister_device()
1516 put_device(&ib_dev->dev); in ib_unregister_device()
1534 void ib_unregister_device_and_put(struct ib_device *ib_dev) in ib_unregister_device_and_put() argument
1536 WARN_ON(!ib_dev->ops.dealloc_driver); in ib_unregister_device_and_put()
1537 get_device(&ib_dev->dev); in ib_unregister_device_and_put()
1538 ib_device_put(ib_dev); in ib_unregister_device_and_put()
1539 __ib_unregister_device(ib_dev); in ib_unregister_device_and_put()
1540 put_device(&ib_dev->dev); in ib_unregister_device_and_put()
1560 struct ib_device *ib_dev; in ib_unregister_driver() local
1564 xa_for_each (&devices, index, ib_dev) { in ib_unregister_driver()
1565 if (ib_dev->ops.driver_id != driver_id) in ib_unregister_driver()
1568 get_device(&ib_dev->dev); in ib_unregister_driver()
1571 WARN_ON(!ib_dev->ops.dealloc_driver); in ib_unregister_driver()
1572 __ib_unregister_device(ib_dev); in ib_unregister_driver()
1574 put_device(&ib_dev->dev); in ib_unregister_driver()
1583 struct ib_device *ib_dev = in ib_unregister_work() local
1586 __ib_unregister_device(ib_dev); in ib_unregister_work()
1587 put_device(&ib_dev->dev); in ib_unregister_work()
1601 void ib_unregister_device_queued(struct ib_device *ib_dev) in ib_unregister_device_queued() argument
1603 WARN_ON(!refcount_read(&ib_dev->refcount)); in ib_unregister_device_queued()
1604 WARN_ON(!ib_dev->ops.dealloc_driver); in ib_unregister_device_queued()
1605 get_device(&ib_dev->dev); in ib_unregister_device_queued()
1606 if (!queue_work(ib_unreg_wq, &ib_dev->unregistration_work)) in ib_unregister_device_queued()
1607 put_device(&ib_dev->dev); in ib_unregister_device_queued()
2134 int ib_device_set_netdev(struct ib_device *ib_dev, struct net_device *ndev, in ib_device_set_netdev() argument
2146 ret = alloc_port_data(ib_dev); in ib_device_set_netdev()
2150 if (!rdma_is_port_valid(ib_dev, port)) in ib_device_set_netdev()
2153 pdata = &ib_dev->port_data[port]; in ib_device_set_netdev()
2175 static void free_netdevs(struct ib_device *ib_dev) in free_netdevs() argument
2180 if (!ib_dev->port_data) in free_netdevs()
2183 rdma_for_each_port (ib_dev, port) { in free_netdevs()
2184 struct ib_port_data *pdata = &ib_dev->port_data[port]; in free_netdevs()
2208 struct net_device *ib_device_get_netdev(struct ib_device *ib_dev, in ib_device_get_netdev() argument
2214 if (!rdma_is_port_valid(ib_dev, port)) in ib_device_get_netdev()
2217 pdata = &ib_dev->port_data[port]; in ib_device_get_netdev()
2223 if (ib_dev->ops.get_netdev) in ib_device_get_netdev()
2224 res = ib_dev->ops.get_netdev(ib_dev, port); in ib_device_get_netdev()
2266 cur->ib_dev->ops.driver_id == driver_id) && in ib_device_get_by_netdev()
2267 ib_device_try_get(cur->ib_dev)) { in ib_device_get_by_netdev()
2268 res = cur->ib_dev; in ib_device_get_by_netdev()
2290 void ib_enum_roce_netdev(struct ib_device *ib_dev, in ib_enum_roce_netdev() argument
2298 rdma_for_each_port (ib_dev, port) in ib_enum_roce_netdev()
2299 if (rdma_protocol_roce(ib_dev, port)) { in ib_enum_roce_netdev()
2301 ib_device_get_netdev(ib_dev, port); in ib_enum_roce_netdev()
2303 if (filter(ib_dev, port, idev, filter_cookie)) in ib_enum_roce_netdev()
2304 cb(ib_dev, port, idev, cookie); in ib_enum_roce_netdev()