23 #include <linux/kernel.h>
24 #include <linux/string.h>
25 #include <linux/errno.h>
32 #include <linux/device.h>
34 #include <asm/uaccess.h>
35 #include <linux/module.h>
49 const char *buf,
size_t count)
62 if (!
strncmp(
"on", buf, count - 1) || !
strncmp(
"1", buf, count - 1))
64 else if (!
strncmp(
"off", buf, count - 1) ||
77 temp = gfar_read(®s->
attr);
84 gfar_write(®s->
attr, temp);
92 static DEVICE_ATTR(bd_stash, 0644, gfar_show_bd_stash, gfar_set_bd_stash);
104 const char *buf,
size_t count)
126 temp = gfar_read(®s->
attreli);
129 gfar_write(®s->
attreli, temp);
132 temp = gfar_read(®s->
attr);
139 gfar_write(®s->
attr, temp);
148 static DEVICE_ATTR(rx_stash_size, 0644, gfar_show_rx_stash_size,
149 gfar_set_rx_stash_size);
163 const char *buf,
size_t count)
185 temp = gfar_read(®s->
attreli);
188 gfar_write(®s->
attreli, temp);
197 static DEVICE_ATTR(rx_stash_index, 0644, gfar_show_rx_stash_index,
198 gfar_set_rx_stash_index);
211 const char *buf,
size_t count)
238 static DEVICE_ATTR(fifo_threshold, 0644, gfar_show_fifo_threshold,
239 gfar_set_fifo_threshold);
251 const char *buf,
size_t count)
278 static DEVICE_ATTR(fifo_starve, 0644, gfar_show_fifo_starve,
279 gfar_set_fifo_starve);
292 const char *buf,
size_t count)
319 static DEVICE_ATTR(fifo_starve_off, 0644, gfar_show_fifo_starve_off,
320 gfar_set_fifo_starve_off);
340 dev_err(&dev->
dev,
"Error creating gianfar sysfs files.\n");