Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 1 | /* |
| 2 | * drivers/net/gianfar_sysfs.c |
| 3 | * |
| 4 | * Gianfar Ethernet Driver |
| 5 | * This driver is designed for the non-CPM ethernet controllers |
| 6 | * on the 85xx and 83xx family of integrated processors |
| 7 | * Based on 8260_io/fcc_enet.c |
| 8 | * |
| 9 | * Author: Andy Fleming |
Adrian Bunk | b56d55b | 2006-01-11 02:00:10 +0100 | [diff] [blame] | 10 | * Maintainer: Kumar Gala (galak@kernel.crashing.org) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 11 | * |
| 12 | * Copyright (c) 2002-2005 Freescale Semiconductor, Inc. |
| 13 | * |
| 14 | * This program is free software; you can redistribute it and/or modify it |
| 15 | * under the terms of the GNU General Public License as published by the |
| 16 | * Free Software Foundation; either version 2 of the License, or (at your |
| 17 | * option) any later version. |
| 18 | * |
| 19 | * Sysfs file creation and management |
| 20 | */ |
| 21 | |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 22 | #include <linux/kernel.h> |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 23 | #include <linux/string.h> |
| 24 | #include <linux/errno.h> |
| 25 | #include <linux/unistd.h> |
| 26 | #include <linux/slab.h> |
| 27 | #include <linux/init.h> |
| 28 | #include <linux/delay.h> |
| 29 | #include <linux/etherdevice.h> |
| 30 | #include <linux/spinlock.h> |
| 31 | #include <linux/mm.h> |
| 32 | #include <linux/device.h> |
| 33 | |
| 34 | #include <asm/uaccess.h> |
| 35 | #include <linux/module.h> |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 36 | |
| 37 | #include "gianfar.h" |
| 38 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 39 | static ssize_t gfar_show_bd_stash(struct device *dev, |
| 40 | struct device_attribute *attr, char *buf) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 41 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 42 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 43 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 44 | return sprintf(buf, "%s\n", priv->bd_stash_en ? "on" : "off"); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 45 | } |
| 46 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 47 | static ssize_t gfar_set_bd_stash(struct device *dev, |
| 48 | struct device_attribute *attr, |
| 49 | const char *buf, size_t count) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 50 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 51 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 52 | int new_setting = 0; |
| 53 | u32 temp; |
| 54 | unsigned long flags; |
| 55 | |
| 56 | /* Find out the new setting */ |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 57 | if (!strncmp("on", buf, count - 1) || !strncmp("1", buf, count - 1)) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 58 | new_setting = 1; |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 59 | else if (!strncmp("off", buf, count - 1) |
| 60 | || !strncmp("0", buf, count - 1)) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 61 | new_setting = 0; |
| 62 | else |
| 63 | return count; |
| 64 | |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 65 | spin_lock_irqsave(&priv->rxlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 66 | |
| 67 | /* Set the new stashing value */ |
| 68 | priv->bd_stash_en = new_setting; |
| 69 | |
| 70 | temp = gfar_read(&priv->regs->attr); |
Jeff Garzik | 6aa20a2 | 2006-09-13 13:24:59 -0400 | [diff] [blame] | 71 | |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 72 | if (new_setting) |
| 73 | temp |= ATTR_BDSTASH; |
| 74 | else |
| 75 | temp &= ~(ATTR_BDSTASH); |
| 76 | |
| 77 | gfar_write(&priv->regs->attr, temp); |
| 78 | |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 79 | spin_unlock_irqrestore(&priv->rxlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 80 | |
| 81 | return count; |
| 82 | } |
| 83 | |
Grant Likely | 35a84fd | 2007-12-01 22:12:45 -0700 | [diff] [blame] | 84 | DEVICE_ATTR(bd_stash, 0644, gfar_show_bd_stash, gfar_set_bd_stash); |
| 85 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 86 | static ssize_t gfar_show_rx_stash_size(struct device *dev, |
| 87 | struct device_attribute *attr, char *buf) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 88 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 89 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 90 | |
| 91 | return sprintf(buf, "%d\n", priv->rx_stash_size); |
| 92 | } |
| 93 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 94 | static ssize_t gfar_set_rx_stash_size(struct device *dev, |
| 95 | struct device_attribute *attr, |
| 96 | const char *buf, size_t count) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 97 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 98 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 99 | unsigned int length = simple_strtoul(buf, NULL, 0); |
| 100 | u32 temp; |
| 101 | unsigned long flags; |
| 102 | |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 103 | spin_lock_irqsave(&priv->rxlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 104 | if (length > priv->rx_buffer_size) |
Andy Fleming | f162b9d | 2008-05-02 13:00:30 -0500 | [diff] [blame] | 105 | goto out; |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 106 | |
| 107 | if (length == priv->rx_stash_size) |
Andy Fleming | f162b9d | 2008-05-02 13:00:30 -0500 | [diff] [blame] | 108 | goto out; |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 109 | |
| 110 | priv->rx_stash_size = length; |
| 111 | |
| 112 | temp = gfar_read(&priv->regs->attreli); |
| 113 | temp &= ~ATTRELI_EL_MASK; |
| 114 | temp |= ATTRELI_EL(length); |
| 115 | gfar_write(&priv->regs->attreli, temp); |
| 116 | |
| 117 | /* Turn stashing on/off as appropriate */ |
| 118 | temp = gfar_read(&priv->regs->attr); |
| 119 | |
| 120 | if (length) |
| 121 | temp |= ATTR_BUFSTASH; |
| 122 | else |
| 123 | temp &= ~(ATTR_BUFSTASH); |
| 124 | |
| 125 | gfar_write(&priv->regs->attr, temp); |
| 126 | |
Andy Fleming | f162b9d | 2008-05-02 13:00:30 -0500 | [diff] [blame] | 127 | out: |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 128 | spin_unlock_irqrestore(&priv->rxlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 129 | |
| 130 | return count; |
| 131 | } |
| 132 | |
Grant Likely | 35a84fd | 2007-12-01 22:12:45 -0700 | [diff] [blame] | 133 | DEVICE_ATTR(rx_stash_size, 0644, gfar_show_rx_stash_size, |
| 134 | gfar_set_rx_stash_size); |
| 135 | |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 136 | /* Stashing will only be enabled when rx_stash_size != 0 */ |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 137 | static ssize_t gfar_show_rx_stash_index(struct device *dev, |
| 138 | struct device_attribute *attr, |
| 139 | char *buf) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 140 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 141 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 142 | |
| 143 | return sprintf(buf, "%d\n", priv->rx_stash_index); |
| 144 | } |
| 145 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 146 | static ssize_t gfar_set_rx_stash_index(struct device *dev, |
| 147 | struct device_attribute *attr, |
| 148 | const char *buf, size_t count) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 149 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 150 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 151 | unsigned short index = simple_strtoul(buf, NULL, 0); |
| 152 | u32 temp; |
| 153 | unsigned long flags; |
| 154 | |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 155 | spin_lock_irqsave(&priv->rxlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 156 | if (index > priv->rx_stash_size) |
Andy Fleming | f162b9d | 2008-05-02 13:00:30 -0500 | [diff] [blame] | 157 | goto out; |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 158 | |
| 159 | if (index == priv->rx_stash_index) |
Andy Fleming | f162b9d | 2008-05-02 13:00:30 -0500 | [diff] [blame] | 160 | goto out; |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 161 | |
| 162 | priv->rx_stash_index = index; |
| 163 | |
| 164 | temp = gfar_read(&priv->regs->attreli); |
| 165 | temp &= ~ATTRELI_EI_MASK; |
| 166 | temp |= ATTRELI_EI(index); |
| 167 | gfar_write(&priv->regs->attreli, flags); |
| 168 | |
Andy Fleming | f162b9d | 2008-05-02 13:00:30 -0500 | [diff] [blame] | 169 | out: |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 170 | spin_unlock_irqrestore(&priv->rxlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 171 | |
| 172 | return count; |
| 173 | } |
| 174 | |
Grant Likely | 35a84fd | 2007-12-01 22:12:45 -0700 | [diff] [blame] | 175 | DEVICE_ATTR(rx_stash_index, 0644, gfar_show_rx_stash_index, |
| 176 | gfar_set_rx_stash_index); |
| 177 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 178 | static ssize_t gfar_show_fifo_threshold(struct device *dev, |
| 179 | struct device_attribute *attr, |
| 180 | char *buf) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 181 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 182 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 183 | |
| 184 | return sprintf(buf, "%d\n", priv->fifo_threshold); |
| 185 | } |
| 186 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 187 | static ssize_t gfar_set_fifo_threshold(struct device *dev, |
| 188 | struct device_attribute *attr, |
| 189 | const char *buf, size_t count) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 190 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 191 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 192 | unsigned int length = simple_strtoul(buf, NULL, 0); |
| 193 | u32 temp; |
| 194 | unsigned long flags; |
| 195 | |
| 196 | if (length > GFAR_MAX_FIFO_THRESHOLD) |
| 197 | return count; |
| 198 | |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 199 | spin_lock_irqsave(&priv->txlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 200 | |
| 201 | priv->fifo_threshold = length; |
| 202 | |
| 203 | temp = gfar_read(&priv->regs->fifo_tx_thr); |
| 204 | temp &= ~FIFO_TX_THR_MASK; |
| 205 | temp |= length; |
| 206 | gfar_write(&priv->regs->fifo_tx_thr, temp); |
| 207 | |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 208 | spin_unlock_irqrestore(&priv->txlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 209 | |
| 210 | return count; |
| 211 | } |
| 212 | |
Grant Likely | 35a84fd | 2007-12-01 22:12:45 -0700 | [diff] [blame] | 213 | DEVICE_ATTR(fifo_threshold, 0644, gfar_show_fifo_threshold, |
| 214 | gfar_set_fifo_threshold); |
| 215 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 216 | static ssize_t gfar_show_fifo_starve(struct device *dev, |
| 217 | struct device_attribute *attr, char *buf) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 218 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 219 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 220 | |
| 221 | return sprintf(buf, "%d\n", priv->fifo_starve); |
| 222 | } |
| 223 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 224 | static ssize_t gfar_set_fifo_starve(struct device *dev, |
| 225 | struct device_attribute *attr, |
| 226 | const char *buf, size_t count) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 227 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 228 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 229 | unsigned int num = simple_strtoul(buf, NULL, 0); |
| 230 | u32 temp; |
| 231 | unsigned long flags; |
| 232 | |
| 233 | if (num > GFAR_MAX_FIFO_STARVE) |
| 234 | return count; |
| 235 | |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 236 | spin_lock_irqsave(&priv->txlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 237 | |
| 238 | priv->fifo_starve = num; |
| 239 | |
| 240 | temp = gfar_read(&priv->regs->fifo_tx_starve); |
| 241 | temp &= ~FIFO_TX_STARVE_MASK; |
| 242 | temp |= num; |
| 243 | gfar_write(&priv->regs->fifo_tx_starve, temp); |
| 244 | |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 245 | spin_unlock_irqrestore(&priv->txlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 246 | |
| 247 | return count; |
| 248 | } |
| 249 | |
Grant Likely | 35a84fd | 2007-12-01 22:12:45 -0700 | [diff] [blame] | 250 | DEVICE_ATTR(fifo_starve, 0644, gfar_show_fifo_starve, gfar_set_fifo_starve); |
| 251 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 252 | static ssize_t gfar_show_fifo_starve_off(struct device *dev, |
| 253 | struct device_attribute *attr, |
| 254 | char *buf) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 255 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 256 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 257 | |
| 258 | return sprintf(buf, "%d\n", priv->fifo_starve_off); |
| 259 | } |
| 260 | |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 261 | static ssize_t gfar_set_fifo_starve_off(struct device *dev, |
| 262 | struct device_attribute *attr, |
| 263 | const char *buf, size_t count) |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 264 | { |
Kumar Gala | 4409d28 | 2007-02-12 23:40:06 -0600 | [diff] [blame] | 265 | struct gfar_private *priv = netdev_priv(to_net_dev(dev)); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 266 | unsigned int num = simple_strtoul(buf, NULL, 0); |
| 267 | u32 temp; |
| 268 | unsigned long flags; |
| 269 | |
| 270 | if (num > GFAR_MAX_FIFO_STARVE_OFF) |
| 271 | return count; |
| 272 | |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 273 | spin_lock_irqsave(&priv->txlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 274 | |
| 275 | priv->fifo_starve_off = num; |
| 276 | |
| 277 | temp = gfar_read(&priv->regs->fifo_tx_starve_shutoff); |
| 278 | temp &= ~FIFO_TX_STARVE_OFF_MASK; |
| 279 | temp |= num; |
| 280 | gfar_write(&priv->regs->fifo_tx_starve_shutoff, temp); |
| 281 | |
Andy Fleming | fef6108 | 2006-04-20 16:44:29 -0500 | [diff] [blame] | 282 | spin_unlock_irqrestore(&priv->txlock, flags); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 283 | |
| 284 | return count; |
| 285 | } |
| 286 | |
Grant Likely | 35a84fd | 2007-12-01 22:12:45 -0700 | [diff] [blame] | 287 | DEVICE_ATTR(fifo_starve_off, 0644, gfar_show_fifo_starve_off, |
| 288 | gfar_set_fifo_starve_off); |
| 289 | |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 290 | void gfar_init_sysfs(struct net_device *dev) |
| 291 | { |
| 292 | struct gfar_private *priv = netdev_priv(dev); |
Grant Likely | 35a84fd | 2007-12-01 22:12:45 -0700 | [diff] [blame] | 293 | int rc; |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 294 | |
| 295 | /* Initialize the default values */ |
| 296 | priv->rx_stash_size = DEFAULT_STASH_LENGTH; |
| 297 | priv->rx_stash_index = DEFAULT_STASH_INDEX; |
| 298 | priv->fifo_threshold = DEFAULT_FIFO_TX_THR; |
| 299 | priv->fifo_starve = DEFAULT_FIFO_TX_STARVE; |
| 300 | priv->fifo_starve_off = DEFAULT_FIFO_TX_STARVE_OFF; |
| 301 | priv->bd_stash_en = DEFAULT_BD_STASH; |
| 302 | |
| 303 | /* Create our sysfs files */ |
Grant Likely | 35a84fd | 2007-12-01 22:12:45 -0700 | [diff] [blame] | 304 | rc = device_create_file(&dev->dev, &dev_attr_bd_stash); |
| 305 | rc |= device_create_file(&dev->dev, &dev_attr_rx_stash_size); |
| 306 | rc |= device_create_file(&dev->dev, &dev_attr_rx_stash_index); |
| 307 | rc |= device_create_file(&dev->dev, &dev_attr_fifo_threshold); |
| 308 | rc |= device_create_file(&dev->dev, &dev_attr_fifo_starve); |
| 309 | rc |= device_create_file(&dev->dev, &dev_attr_fifo_starve_off); |
| 310 | if (rc) |
| 311 | dev_err(&dev->dev, "Error creating gianfar sysfs files.\n"); |
Andy Fleming | 7f7f531 | 2005-11-11 12:38:59 -0600 | [diff] [blame] | 312 | } |