11 #define KMSG_COMPONENT "ctcm"
12 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
14 #include <linux/device.h>
16 #include <linux/slab.h>
72 static void ctcm_print_statistics(
struct ctcm_priv *priv)
84 p +=
sprintf(p,
" Device FSM state: %s\n",
86 p +=
sprintf(p,
" RX channel FSM state: %s\n",
88 p +=
sprintf(p,
" TX channel FSM state: %s\n",
90 p +=
sprintf(p,
" Max. TX buffer used: %ld\n",
92 p +=
sprintf(p,
" Max. chained SKBs: %ld\n",
94 p +=
sprintf(p,
" TX single write ops: %ld\n",
96 p +=
sprintf(p,
" TX multi write ops: %ld\n",
98 p +=
sprintf(p,
" Netto bytes written: %ld\n",
100 p +=
sprintf(p,
" Max. TX IO-time: %ld\n",
115 if (!priv || gdev->
state != CCWGROUP_ONLINE)
117 ctcm_print_statistics(priv);
122 const char *buf,
size_t count)
151 sscanf(buf,
"%u", &value);
163 static const char *ctcm_type[] = {
168 "unknown channel type",
169 "unsupported channel type",
182 ctcm_type[cgdev->
cdev[0]->id.driver_info]);
191 &dev_attr_protocol.attr,
193 &dev_attr_buffer.attr,
194 &dev_attr_stats.attr,