Lines Matching refs:kobj
75 static int sysfs_rtnl_lock(struct kobject *kobj, struct attribute *attr, in sysfs_rtnl_lock() argument
97 kn = sysfs_break_active_protection(kobj, attr); in sysfs_rtnl_lock()
180 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in netdev_store()
319 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in carrier_show()
350 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in speed_show()
378 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in duplex_show()
581 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in ifalias_store()
644 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in phys_port_id_show()
665 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in phys_port_name_show()
686 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in phys_switch_id_show()
707 static umode_t netdev_phys_is_visible(struct kobject *kobj, in netdev_phys_is_visible() argument
710 struct device *dev = kobj_to_dev(kobj); in netdev_phys_is_visible()
927 #define to_rx_queue(obj) container_of(obj, struct netdev_rx_queue, kobj)
929 static ssize_t rx_queue_attr_show(struct kobject *kobj, struct attribute *attr, in rx_queue_attr_show() argument
933 struct netdev_rx_queue *queue = to_rx_queue(kobj); in rx_queue_attr_show()
941 static ssize_t rx_queue_attr_store(struct kobject *kobj, struct attribute *attr, in rx_queue_attr_store() argument
945 struct netdev_rx_queue *queue = to_rx_queue(kobj); in rx_queue_attr_store()
1158 static void rx_queue_release(struct kobject *kobj) in rx_queue_release() argument
1160 struct netdev_rx_queue *queue = to_rx_queue(kobj); in rx_queue_release()
1178 memset(kobj, 0, sizeof(*kobj)); in rx_queue_release()
1182 static const void *rx_queue_namespace(const struct kobject *kobj) in rx_queue_namespace() argument
1184 struct netdev_rx_queue *queue = to_rx_queue(kobj); in rx_queue_namespace()
1194 static void rx_queue_get_ownership(const struct kobject *kobj, in rx_queue_get_ownership() argument
1197 const struct net *net = rx_queue_namespace(kobj); in rx_queue_get_ownership()
1233 struct kobject *kobj = &queue->kobj; in rx_queue_add_kobject() local
1247 if (unlikely(kobj->state_initialized)) { in rx_queue_add_kobject()
1257 kobj->kset = dev->queues_kset; in rx_queue_add_kobject()
1258 error = kobject_init_and_add(kobj, &rx_queue_ktype, NULL, in rx_queue_add_kobject()
1264 error = sysfs_create_groups(kobj, queue->groups); in rx_queue_add_kobject()
1269 error = sysfs_create_group(kobj, dev->sysfs_rx_queue_group); in rx_queue_add_kobject()
1278 kobject_uevent(kobj, KOBJ_ADD); in rx_queue_add_kobject()
1283 sysfs_remove_groups(kobj, queue->groups); in rx_queue_add_kobject()
1285 kobject_put(kobj); in rx_queue_add_kobject()
1293 struct kobject *kobj = &queue->kobj; in rx_queue_change_owner() local
1296 error = sysfs_change_owner(kobj, kuid, kgid); in rx_queue_change_owner()
1302 kobj, dev->sysfs_rx_queue_group, kuid, kgid); in rx_queue_change_owner()
1329 struct kobject *kobj = &queue->kobj; in net_rx_queue_update_kobjects() local
1332 kobj->uevent_suppress = 1; in net_rx_queue_update_kobjects()
1334 sysfs_remove_group(kobj, dev->sysfs_rx_queue_group); in net_rx_queue_update_kobjects()
1335 sysfs_remove_groups(kobj, queue->groups); in net_rx_queue_update_kobjects()
1336 kobject_put(kobj); in net_rx_queue_update_kobjects()
1374 ssize_t (*show)(struct kobject *kobj, struct attribute *attr,
1376 ssize_t (*store)(struct kobject *kobj, struct attribute *attr,
1383 #define to_netdev_queue(obj) container_of(obj, struct netdev_queue, kobj)
1385 static ssize_t netdev_queue_attr_show(struct kobject *kobj, in netdev_queue_attr_show() argument
1390 struct netdev_queue *queue = to_netdev_queue(kobj); in netdev_queue_attr_show()
1395 return attribute->show(kobj, attr, queue, buf); in netdev_queue_attr_show()
1398 static ssize_t netdev_queue_attr_store(struct kobject *kobj, in netdev_queue_attr_store() argument
1404 struct netdev_queue *queue = to_netdev_queue(kobj); in netdev_queue_attr_store()
1409 return attribute->store(kobj, attr, queue, buf, count); in netdev_queue_attr_store()
1417 static ssize_t tx_timeout_show(struct kobject *kobj, struct attribute *attr, in tx_timeout_show() argument
1436 static ssize_t traffic_class_show(struct kobject *kobj, struct attribute *attr, in traffic_class_show() argument
1445 ret = sysfs_rtnl_lock(kobj, attr, queue->dev); in traffic_class_show()
1474 static ssize_t tx_maxrate_show(struct kobject *kobj, struct attribute *attr, in tx_maxrate_show() argument
1480 static ssize_t tx_maxrate_store(struct kobject *kobj, struct attribute *attr, in tx_maxrate_store() argument
1501 err = sysfs_rtnl_lock(kobj, attr, dev); in tx_maxrate_store()
1561 static ssize_t bql_show_hold_time(struct kobject *kobj, struct attribute *attr, in bql_show_hold_time() argument
1569 static ssize_t bql_set_hold_time(struct kobject *kobj, struct attribute *attr, in bql_set_hold_time() argument
1590 static ssize_t bql_show_stall_thrs(struct kobject *kobj, struct attribute *attr, in bql_show_stall_thrs() argument
1598 static ssize_t bql_set_stall_thrs(struct kobject *kobj, struct attribute *attr, in bql_set_stall_thrs() argument
1626 static ssize_t bql_show_stall_max(struct kobject *kobj, struct attribute *attr, in bql_show_stall_max() argument
1632 static ssize_t bql_set_stall_max(struct kobject *kobj, struct attribute *attr, in bql_set_stall_max() argument
1643 static ssize_t bql_show_stall_cnt(struct kobject *kobj, struct attribute *attr, in bql_show_stall_cnt() argument
1654 static ssize_t bql_show_inflight(struct kobject *kobj, struct attribute *attr, in bql_show_inflight() argument
1666 static ssize_t bql_show_ ## NAME(struct kobject *kobj, \
1673 static ssize_t bql_set_ ## NAME(struct kobject *kobj, \
1761 static ssize_t xps_cpus_show(struct kobject *kobj, struct attribute *attr, in xps_cpus_show() argument
1773 ret = sysfs_rtnl_lock(kobj, attr, queue->dev); in xps_cpus_show()
1798 static ssize_t xps_cpus_store(struct kobject *kobj, struct attribute *attr, in xps_cpus_store() argument
1824 err = sysfs_rtnl_lock(kobj, attr, dev); in xps_cpus_store()
1841 static ssize_t xps_rxqs_show(struct kobject *kobj, struct attribute *attr, in xps_rxqs_show() argument
1850 ret = sysfs_rtnl_lock(kobj, attr, dev); in xps_rxqs_show()
1867 static ssize_t xps_rxqs_store(struct kobject *kobj, struct attribute *attr, in xps_rxqs_store() argument
1892 err = sysfs_rtnl_lock(kobj, attr, dev); in xps_rxqs_store()
1924 static void netdev_queue_release(struct kobject *kobj) in netdev_queue_release() argument
1926 struct netdev_queue *queue = to_netdev_queue(kobj); in netdev_queue_release()
1928 memset(kobj, 0, sizeof(*kobj)); in netdev_queue_release()
1932 static const void *netdev_queue_namespace(const struct kobject *kobj) in netdev_queue_namespace() argument
1934 struct netdev_queue *queue = to_netdev_queue(kobj); in netdev_queue_namespace()
1944 static void netdev_queue_get_ownership(const struct kobject *kobj, in netdev_queue_get_ownership() argument
1947 const struct net *net = netdev_queue_namespace(kobj); in netdev_queue_get_ownership()
1970 struct kobject *kobj = &queue->kobj; in netdev_queue_add_kobject() local
1984 if (unlikely(kobj->state_initialized)) { in netdev_queue_add_kobject()
1994 kobj->kset = dev->queues_kset; in netdev_queue_add_kobject()
1995 error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, in netdev_queue_add_kobject()
2001 error = sysfs_create_groups(kobj, queue->groups); in netdev_queue_add_kobject()
2006 error = sysfs_create_group(kobj, &dql_group); in netdev_queue_add_kobject()
2011 kobject_uevent(kobj, KOBJ_ADD); in netdev_queue_add_kobject()
2015 sysfs_remove_groups(kobj, queue->groups); in netdev_queue_add_kobject()
2017 kobject_put(kobj); in netdev_queue_add_kobject()
2025 struct kobject *kobj = &queue->kobj; in tx_queue_change_owner() local
2028 error = sysfs_change_owner(kobj, kuid, kgid); in tx_queue_change_owner()
2033 error = sysfs_group_change_owner(kobj, &dql_group, kuid, kgid); in tx_queue_change_owner()
2065 queue->kobj.uevent_suppress = 1; in netdev_queue_update_kobjects()
2068 sysfs_remove_group(&queue->kobj, &dql_group); in netdev_queue_update_kobjects()
2070 sysfs_remove_groups(&queue->kobj, queue->groups); in netdev_queue_update_kobjects()
2071 kobject_put(&queue->kobj); in netdev_queue_update_kobjects()
2105 NULL, &dev->dev.kobj); in register_queue_kobjects()
2139 error = sysfs_change_owner(&ndev->queues_kset->kobj, kuid, kgid); in queue_change_owner()
2321 kobject_get(&dev->kobj); in netdev_unregister_kobject()