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