Lines Matching refs:us_ibdev
52 struct usnic_ib_dev *us_ibdev = in board_id_show() local
56 mutex_lock(&us_ibdev->usdev_lock); in board_id_show()
57 subsystem_device_id = us_ibdev->pdev->subsystem_device; in board_id_show()
58 mutex_unlock(&us_ibdev->usdev_lock); in board_id_show()
70 struct usnic_ib_dev *us_ibdev = in config_show() local
75 mutex_lock(&us_ibdev->usdev_lock); in config_show()
76 if (kref_read(&us_ibdev->vf_cnt) > 0) { in config_show()
83 busname = us_ibdev->pdev->bus->name; in config_show()
88 dev_name(&us_ibdev->ib_dev.dev), in config_show()
90 PCI_SLOT(us_ibdev->pdev->devfn), in config_show()
91 PCI_FUNC(us_ibdev->pdev->devfn), in config_show()
92 netdev_name(us_ibdev->netdev), in config_show()
93 us_ibdev->ufdev->mac, in config_show()
94 kref_read(&us_ibdev->vf_cnt)); in config_show()
99 if (us_ibdev->vf_res_cnt[res_type] == 0) in config_show()
103 us_ibdev->vf_res_cnt[res_type], in config_show()
110 dev_name(&us_ibdev->ib_dev.dev)); in config_show()
113 mutex_unlock(&us_ibdev->usdev_lock); in config_show()
122 struct usnic_ib_dev *us_ibdev = in iface_show() local
125 return sysfs_emit(buf, "%s\n", netdev_name(us_ibdev->netdev)); in iface_show()
132 struct usnic_ib_dev *us_ibdev = in max_vf_show() local
135 return sysfs_emit(buf, "%u\n", kref_read(&us_ibdev->vf_cnt)); in max_vf_show()
142 struct usnic_ib_dev *us_ibdev = in qp_per_vf_show() local
146 qp_per_vf = max(us_ibdev->vf_res_cnt[USNIC_VNIC_RES_TYPE_WQ], in qp_per_vf_show()
147 us_ibdev->vf_res_cnt[USNIC_VNIC_RES_TYPE_RQ]); in qp_per_vf_show()
156 struct usnic_ib_dev *us_ibdev = in cq_per_vf_show() local
160 us_ibdev->vf_res_cnt[USNIC_VNIC_RES_TYPE_CQ]); in cq_per_vf_show()
252 int usnic_ib_sysfs_register_usdev(struct usnic_ib_dev *us_ibdev) in usnic_ib_sysfs_register_usdev() argument
255 kobject_get(&us_ibdev->ib_dev.dev.kobj); in usnic_ib_sysfs_register_usdev()
256 us_ibdev->qpn_kobj = kobject_create_and_add("qpn", in usnic_ib_sysfs_register_usdev()
257 &us_ibdev->ib_dev.dev.kobj); in usnic_ib_sysfs_register_usdev()
258 if (us_ibdev->qpn_kobj == NULL) { in usnic_ib_sysfs_register_usdev()
259 kobject_put(&us_ibdev->ib_dev.dev.kobj); in usnic_ib_sysfs_register_usdev()
266 void usnic_ib_sysfs_unregister_usdev(struct usnic_ib_dev *us_ibdev) in usnic_ib_sysfs_unregister_usdev() argument
268 kobject_put(us_ibdev->qpn_kobj); in usnic_ib_sysfs_unregister_usdev()
273 struct usnic_ib_dev *us_ibdev; in usnic_ib_sysfs_qpn_add() local
276 us_ibdev = qp_grp->vf->pf; in usnic_ib_sysfs_qpn_add()
279 kobject_get(us_ibdev->qpn_kobj), in usnic_ib_sysfs_qpn_add()
282 kobject_put(us_ibdev->qpn_kobj); in usnic_ib_sysfs_qpn_add()
289 struct usnic_ib_dev *us_ibdev; in usnic_ib_sysfs_qpn_remove() local
291 us_ibdev = qp_grp->vf->pf; in usnic_ib_sysfs_qpn_remove()
294 kobject_put(us_ibdev->qpn_kobj); in usnic_ib_sysfs_qpn_remove()