Lines Matching +full:multi +full:- +full:attr
1 // SPDX-License-Identifier: GPL-2.0
25 struct device_attribute *attr, char *buf) in ctcm_buffer_show() argument
30 return -ENODEV; in ctcm_buffer_show()
31 return sysfs_emit(buf, "%d\n", priv->buffer_size); in ctcm_buffer_show()
35 struct device_attribute *attr, const char *buf, size_t count) in ctcm_buffer_write() argument
42 if (!(priv && priv->channel[CTCM_READ] && in ctcm_buffer_write()
43 priv->channel[CTCM_READ]->netdev)) { in ctcm_buffer_write()
45 return -ENODEV; in ctcm_buffer_write()
47 ndev = priv->channel[CTCM_READ]->netdev; in ctcm_buffer_write()
56 priv->buffer_size = bs1; /* just to overwrite the default */ in ctcm_buffer_write()
58 if ((ndev->flags & IFF_RUNNING) && in ctcm_buffer_write()
59 (bs1 < (ndev->mtu + LL_HEADER_LENGTH + 2))) in ctcm_buffer_write()
62 priv->channel[CTCM_READ]->max_bufsize = bs1; in ctcm_buffer_write()
63 priv->channel[CTCM_WRITE]->max_bufsize = bs1; in ctcm_buffer_write()
64 if (!(ndev->flags & IFF_RUNNING)) in ctcm_buffer_write()
65 ndev->mtu = bs1 - LL_HEADER_LENGTH - 2; in ctcm_buffer_write()
66 priv->channel[CTCM_READ]->flags |= CHANNEL_FLAGS_BUFSIZE_CHANGED; in ctcm_buffer_write()
67 priv->channel[CTCM_WRITE]->flags |= CHANNEL_FLAGS_BUFSIZE_CHANGED; in ctcm_buffer_write()
74 return -EINVAL; in ctcm_buffer_write()
90 fsm_getstate_str(priv->fsm)); in ctcm_print_statistics()
92 fsm_getstate_str(priv->channel[CTCM_READ]->fsm)); in ctcm_print_statistics()
94 fsm_getstate_str(priv->channel[CTCM_WRITE]->fsm)); in ctcm_print_statistics()
96 priv->channel[WRITE]->prof.maxmulti); in ctcm_print_statistics()
98 priv->channel[WRITE]->prof.maxcqueue); in ctcm_print_statistics()
100 priv->channel[WRITE]->prof.doios_single); in ctcm_print_statistics()
101 p += scnprintf(p, CTCM_STATSIZE_LIMIT, " TX multi write ops: %ld\n", in ctcm_print_statistics()
102 priv->channel[WRITE]->prof.doios_multi); in ctcm_print_statistics()
104 priv->channel[WRITE]->prof.txlen); in ctcm_print_statistics()
105 p += scnprintf(p, CTCM_STATSIZE_LIMIT, " Max. TX IO-time: %u\n", in ctcm_print_statistics()
106 jiffies_to_usecs(priv->channel[WRITE]->prof.tx_time)); in ctcm_print_statistics()
109 priv->channel[CTCM_WRITE]->netdev->name, sbuf); in ctcm_print_statistics()
115 struct device_attribute *attr, char *buf) in stats_show() argument
120 if (!priv || gdev->state != CCWGROUP_ONLINE) in stats_show()
121 return -ENODEV; in stats_show()
126 static ssize_t stats_write(struct device *dev, struct device_attribute *attr, in stats_write() argument
131 return -ENODEV; in stats_write()
133 memset(&priv->channel[WRITE]->prof, 0, in stats_write()
134 sizeof(priv->channel[CTCM_WRITE]->prof)); in stats_write()
139 struct device_attribute *attr, char *buf) in ctcm_proto_show() argument
143 return -ENODEV; in ctcm_proto_show()
145 return sysfs_emit(buf, "%d\n", priv->protocol); in ctcm_proto_show()
149 struct device_attribute *attr, const char *buf, size_t count) in ctcm_proto_store() argument
155 return -ENODEV; in ctcm_proto_store()
162 return -EINVAL; in ctcm_proto_store()
163 priv->protocol = value; in ctcm_proto_store()
179 struct device_attribute *attr, char *buf) in ctcm_type_show() argument
185 return -ENODEV; in ctcm_type_show()
188 ctcm_type[cgdev->cdev[0]->id.driver_info]); in ctcm_type_show()
197 &dev_attr_protocol.attr,
198 &dev_attr_type.attr,
199 &dev_attr_buffer.attr,
200 &dev_attr_stats.attr,