diff options
-rw-r--r-- | drivers/net/gianfar.c | 2 | ||||
-rw-r--r-- | drivers/net/gianfar.h | 2 | ||||
-rw-r--r-- | drivers/net/gianfar_mii.c | 12 | ||||
-rw-r--r-- | drivers/net/gianfar_sysfs.c | 21 |
4 files changed, 19 insertions, 18 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 4d2ca490d76c..eb8302c5ba8c 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -141,8 +141,6 @@ void gfar_start(struct net_device *dev); | |||
141 | static void gfar_clear_exact_match(struct net_device *dev); | 141 | static void gfar_clear_exact_match(struct net_device *dev); |
142 | static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr); | 142 | static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr); |
143 | 143 | ||
144 | extern const struct ethtool_ops gfar_ethtool_ops; | ||
145 | |||
146 | MODULE_AUTHOR("Freescale Semiconductor, Inc"); | 144 | MODULE_AUTHOR("Freescale Semiconductor, Inc"); |
147 | MODULE_DESCRIPTION("Gianfar Ethernet Driver"); | 145 | MODULE_DESCRIPTION("Gianfar Ethernet Driver"); |
148 | MODULE_LICENSE("GPL"); | 146 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index b1a83344acc7..7820720ceeed 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h | |||
@@ -830,4 +830,6 @@ int gfar_local_mdio_write(struct gfar_mii __iomem *regs, int mii_id, | |||
830 | int regnum, u16 value); | 830 | int regnum, u16 value); |
831 | int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum); | 831 | int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum); |
832 | 832 | ||
833 | extern const struct ethtool_ops gfar_ethtool_ops; | ||
834 | |||
833 | #endif /* __GIANFAR_H */ | 835 | #endif /* __GIANFAR_H */ |
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index f49a426ad681..64e4679b3279 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c | |||
@@ -105,7 +105,7 @@ int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum) | |||
105 | * All PHY configuration is done through the TSEC1 MIIM regs */ | 105 | * All PHY configuration is done through the TSEC1 MIIM regs */ |
106 | int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value) | 106 | int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value) |
107 | { | 107 | { |
108 | struct gfar_mii __iomem *regs = (void __iomem *)bus->priv; | 108 | struct gfar_mii __iomem *regs = (void __force __iomem *)bus->priv; |
109 | 109 | ||
110 | /* Write to the local MII regs */ | 110 | /* Write to the local MII regs */ |
111 | return(gfar_local_mdio_write(regs, mii_id, regnum, value)); | 111 | return(gfar_local_mdio_write(regs, mii_id, regnum, value)); |
@@ -116,7 +116,7 @@ int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value) | |||
116 | * configuration has to be done through the TSEC1 MIIM regs */ | 116 | * configuration has to be done through the TSEC1 MIIM regs */ |
117 | int gfar_mdio_read(struct mii_bus *bus, int mii_id, int regnum) | 117 | int gfar_mdio_read(struct mii_bus *bus, int mii_id, int regnum) |
118 | { | 118 | { |
119 | struct gfar_mii __iomem *regs = (void __iomem *)bus->priv; | 119 | struct gfar_mii __iomem *regs = (void __force __iomem *)bus->priv; |
120 | 120 | ||
121 | /* Read the local MII regs */ | 121 | /* Read the local MII regs */ |
122 | return(gfar_local_mdio_read(regs, mii_id, regnum)); | 122 | return(gfar_local_mdio_read(regs, mii_id, regnum)); |
@@ -125,7 +125,7 @@ int gfar_mdio_read(struct mii_bus *bus, int mii_id, int regnum) | |||
125 | /* Reset the MIIM registers, and wait for the bus to free */ | 125 | /* Reset the MIIM registers, and wait for the bus to free */ |
126 | static int gfar_mdio_reset(struct mii_bus *bus) | 126 | static int gfar_mdio_reset(struct mii_bus *bus) |
127 | { | 127 | { |
128 | struct gfar_mii __iomem *regs = (void __iomem *)bus->priv; | 128 | struct gfar_mii __iomem *regs = (void __force __iomem *)bus->priv; |
129 | unsigned int timeout = PHY_INIT_TIMEOUT; | 129 | unsigned int timeout = PHY_INIT_TIMEOUT; |
130 | 130 | ||
131 | mutex_lock(&bus->mdio_lock); | 131 | mutex_lock(&bus->mdio_lock); |
@@ -268,8 +268,8 @@ static int gfar_mdio_probe(struct of_device *ofdev, | |||
268 | * Also, we have to cast back to struct gfar_mii because of | 268 | * Also, we have to cast back to struct gfar_mii because of |
269 | * definition weirdness done in gianfar.h. | 269 | * definition weirdness done in gianfar.h. |
270 | */ | 270 | */ |
271 | enet_regs = (struct gfar __iomem *) | 271 | enet_regs = (struct gfar __force __iomem *) |
272 | ((char *)regs - offsetof(struct gfar, gfar_mii_regs)); | 272 | ((char __force *)regs - offsetof(struct gfar, gfar_mii_regs)); |
273 | 273 | ||
274 | for_each_child_of_node(np, tbi) { | 274 | for_each_child_of_node(np, tbi) { |
275 | if (!strncmp(tbi->type, "tbi-phy", 8)) | 275 | if (!strncmp(tbi->type, "tbi-phy", 8)) |
@@ -337,7 +337,7 @@ static int gfar_mdio_remove(struct of_device *ofdev) | |||
337 | 337 | ||
338 | dev_set_drvdata(&ofdev->dev, NULL); | 338 | dev_set_drvdata(&ofdev->dev, NULL); |
339 | 339 | ||
340 | iounmap((void __iomem *)bus->priv); | 340 | iounmap((void __force __iomem *)bus->priv); |
341 | bus->priv = NULL; | 341 | bus->priv = NULL; |
342 | kfree(bus->irq); | 342 | kfree(bus->irq); |
343 | mdiobus_free(bus); | 343 | mdiobus_free(bus); |
diff --git a/drivers/net/gianfar_sysfs.c b/drivers/net/gianfar_sysfs.c index 782c20170082..74e0b4d42587 100644 --- a/drivers/net/gianfar_sysfs.c +++ b/drivers/net/gianfar_sysfs.c | |||
@@ -81,7 +81,7 @@ static ssize_t gfar_set_bd_stash(struct device *dev, | |||
81 | return count; | 81 | return count; |
82 | } | 82 | } |
83 | 83 | ||
84 | DEVICE_ATTR(bd_stash, 0644, gfar_show_bd_stash, gfar_set_bd_stash); | 84 | static DEVICE_ATTR(bd_stash, 0644, gfar_show_bd_stash, gfar_set_bd_stash); |
85 | 85 | ||
86 | static ssize_t gfar_show_rx_stash_size(struct device *dev, | 86 | static ssize_t gfar_show_rx_stash_size(struct device *dev, |
87 | struct device_attribute *attr, char *buf) | 87 | struct device_attribute *attr, char *buf) |
@@ -130,8 +130,8 @@ out: | |||
130 | return count; | 130 | return count; |
131 | } | 131 | } |
132 | 132 | ||
133 | DEVICE_ATTR(rx_stash_size, 0644, gfar_show_rx_stash_size, | 133 | static DEVICE_ATTR(rx_stash_size, 0644, gfar_show_rx_stash_size, |
134 | gfar_set_rx_stash_size); | 134 | gfar_set_rx_stash_size); |
135 | 135 | ||
136 | /* Stashing will only be enabled when rx_stash_size != 0 */ | 136 | /* Stashing will only be enabled when rx_stash_size != 0 */ |
137 | static ssize_t gfar_show_rx_stash_index(struct device *dev, | 137 | static ssize_t gfar_show_rx_stash_index(struct device *dev, |
@@ -172,8 +172,8 @@ out: | |||
172 | return count; | 172 | return count; |
173 | } | 173 | } |
174 | 174 | ||
175 | DEVICE_ATTR(rx_stash_index, 0644, gfar_show_rx_stash_index, | 175 | static DEVICE_ATTR(rx_stash_index, 0644, gfar_show_rx_stash_index, |
176 | gfar_set_rx_stash_index); | 176 | gfar_set_rx_stash_index); |
177 | 177 | ||
178 | static ssize_t gfar_show_fifo_threshold(struct device *dev, | 178 | static ssize_t gfar_show_fifo_threshold(struct device *dev, |
179 | struct device_attribute *attr, | 179 | struct device_attribute *attr, |
@@ -210,8 +210,8 @@ static ssize_t gfar_set_fifo_threshold(struct device *dev, | |||
210 | return count; | 210 | return count; |
211 | } | 211 | } |
212 | 212 | ||
213 | DEVICE_ATTR(fifo_threshold, 0644, gfar_show_fifo_threshold, | 213 | static DEVICE_ATTR(fifo_threshold, 0644, gfar_show_fifo_threshold, |
214 | gfar_set_fifo_threshold); | 214 | gfar_set_fifo_threshold); |
215 | 215 | ||
216 | static ssize_t gfar_show_fifo_starve(struct device *dev, | 216 | static ssize_t gfar_show_fifo_starve(struct device *dev, |
217 | struct device_attribute *attr, char *buf) | 217 | struct device_attribute *attr, char *buf) |
@@ -247,7 +247,8 @@ static ssize_t gfar_set_fifo_starve(struct device *dev, | |||
247 | return count; | 247 | return count; |
248 | } | 248 | } |
249 | 249 | ||
250 | DEVICE_ATTR(fifo_starve, 0644, gfar_show_fifo_starve, gfar_set_fifo_starve); | 250 | static DEVICE_ATTR(fifo_starve, 0644, gfar_show_fifo_starve, |
251 | gfar_set_fifo_starve); | ||
251 | 252 | ||
252 | static ssize_t gfar_show_fifo_starve_off(struct device *dev, | 253 | static ssize_t gfar_show_fifo_starve_off(struct device *dev, |
253 | struct device_attribute *attr, | 254 | struct device_attribute *attr, |
@@ -284,8 +285,8 @@ static ssize_t gfar_set_fifo_starve_off(struct device *dev, | |||
284 | return count; | 285 | return count; |
285 | } | 286 | } |
286 | 287 | ||
287 | DEVICE_ATTR(fifo_starve_off, 0644, gfar_show_fifo_starve_off, | 288 | static DEVICE_ATTR(fifo_starve_off, 0644, gfar_show_fifo_starve_off, |
288 | gfar_set_fifo_starve_off); | 289 | gfar_set_fifo_starve_off); |
289 | 290 | ||
290 | void gfar_init_sysfs(struct net_device *dev) | 291 | void gfar_init_sysfs(struct net_device *dev) |
291 | { | 292 | { |