Lines Matching refs:slave
15 ssize_t (*show)(struct slave *, char *);
21 static ssize_t state_show(struct slave *slave, char *buf)
23 switch (bond_slave_state(slave)) {
34 static ssize_t mii_status_show(struct slave *slave, char *buf)
36 return sysfs_emit(buf, "%s\n", bond_slave_link_status(slave->link));
40 static ssize_t link_failure_count_show(struct slave *slave, char *buf)
42 return sysfs_emit(buf, "%d\n", slave->link_failure_count);
46 static ssize_t perm_hwaddr_show(struct slave *slave, char *buf)
49 slave->dev->addr_len,
50 slave->perm_hwaddr);
54 static ssize_t queue_id_show(struct slave *slave, char *buf)
56 return sysfs_emit(buf, "%d\n", slave->queue_id);
60 static ssize_t ad_aggregator_id_show(struct slave *slave, char *buf)
64 if (BOND_MODE(slave->bond) == BOND_MODE_8023AD) {
65 agg = SLAVE_AD_INFO(slave)->port.aggregator;
75 static ssize_t ad_actor_oper_port_state_show(struct slave *slave, char *buf)
79 if (BOND_MODE(slave->bond) == BOND_MODE_8023AD) {
80 ad_port = &SLAVE_AD_INFO(slave)->port;
90 static ssize_t ad_partner_oper_port_state_show(struct slave *slave, char *buf)
94 if (BOND_MODE(slave->bond) == BOND_MODE_8023AD) {
95 ad_port = &SLAVE_AD_INFO(slave)->port;
123 struct slave *slave = to_slave(kobj);
125 return slave_attr->show(slave, buf);
132 int bond_sysfs_slave_add(struct slave *slave)
134 return sysfs_create_files(&slave->kobj, slave_attrs);
137 void bond_sysfs_slave_del(struct slave *slave)
139 sysfs_remove_files(&slave->kobj, slave_attrs);