Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133939
b: refs/heads/master
c: b2f66d1
h: refs/heads/master
i:
  133937: 9893176
  133935: 5d7c507
v: v3
  • Loading branch information
Anton Vorontsov authored and David S. Miller committed Feb 1, 2009
1 parent f0043f6 commit 50769be
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d1e4db2b0698785f4e4dd139d88257e855e53b8
refs/heads/master: b2f66d183966114fcc91591191ec9af14a252ac5
2 changes: 0 additions & 2 deletions trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ void gfar_start(struct net_device *dev);
static void gfar_clear_exact_match(struct net_device *dev);
static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr);

extern const struct ethtool_ops gfar_ethtool_ops;

MODULE_AUTHOR("Freescale Semiconductor, Inc");
MODULE_DESCRIPTION("Gianfar Ethernet Driver");
MODULE_LICENSE("GPL");
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/gianfar.h
Original file line number Diff line number Diff line change
Expand Up @@ -830,4 +830,6 @@ int gfar_local_mdio_write(struct gfar_mii __iomem *regs, int mii_id,
int regnum, u16 value);
int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum);

extern const struct ethtool_ops gfar_ethtool_ops;

#endif /* __GIANFAR_H */
12 changes: 6 additions & 6 deletions trunk/drivers/net/gianfar_mii.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum)
* All PHY configuration is done through the TSEC1 MIIM regs */
int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value)
{
struct gfar_mii __iomem *regs = (void __iomem *)bus->priv;
struct gfar_mii __iomem *regs = (void __force __iomem *)bus->priv;

/* Write to the local MII regs */
return(gfar_local_mdio_write(regs, mii_id, regnum, value));
Expand All @@ -116,7 +116,7 @@ int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value)
* configuration has to be done through the TSEC1 MIIM regs */
int gfar_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
{
struct gfar_mii __iomem *regs = (void __iomem *)bus->priv;
struct gfar_mii __iomem *regs = (void __force __iomem *)bus->priv;

/* Read the local MII regs */
return(gfar_local_mdio_read(regs, mii_id, regnum));
Expand All @@ -125,7 +125,7 @@ int gfar_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
/* Reset the MIIM registers, and wait for the bus to free */
static int gfar_mdio_reset(struct mii_bus *bus)
{
struct gfar_mii __iomem *regs = (void __iomem *)bus->priv;
struct gfar_mii __iomem *regs = (void __force __iomem *)bus->priv;
unsigned int timeout = PHY_INIT_TIMEOUT;

mutex_lock(&bus->mdio_lock);
Expand Down Expand Up @@ -268,8 +268,8 @@ static int gfar_mdio_probe(struct of_device *ofdev,
* Also, we have to cast back to struct gfar_mii because of
* definition weirdness done in gianfar.h.
*/
enet_regs = (struct gfar __iomem *)
((char *)regs - offsetof(struct gfar, gfar_mii_regs));
enet_regs = (struct gfar __force __iomem *)
((char __force *)regs - offsetof(struct gfar, gfar_mii_regs));

for_each_child_of_node(np, tbi) {
if (!strncmp(tbi->type, "tbi-phy", 8))
Expand Down Expand Up @@ -337,7 +337,7 @@ static int gfar_mdio_remove(struct of_device *ofdev)

dev_set_drvdata(&ofdev->dev, NULL);

iounmap((void __iomem *)bus->priv);
iounmap((void __force __iomem *)bus->priv);
bus->priv = NULL;
kfree(bus->irq);
mdiobus_free(bus);
Expand Down
21 changes: 11 additions & 10 deletions trunk/drivers/net/gianfar_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static ssize_t gfar_set_bd_stash(struct device *dev,
return count;
}

DEVICE_ATTR(bd_stash, 0644, gfar_show_bd_stash, gfar_set_bd_stash);
static DEVICE_ATTR(bd_stash, 0644, gfar_show_bd_stash, gfar_set_bd_stash);

static ssize_t gfar_show_rx_stash_size(struct device *dev,
struct device_attribute *attr, char *buf)
Expand Down Expand Up @@ -130,8 +130,8 @@ static ssize_t gfar_set_rx_stash_size(struct device *dev,
return count;
}

DEVICE_ATTR(rx_stash_size, 0644, gfar_show_rx_stash_size,
gfar_set_rx_stash_size);
static DEVICE_ATTR(rx_stash_size, 0644, gfar_show_rx_stash_size,
gfar_set_rx_stash_size);

/* Stashing will only be enabled when rx_stash_size != 0 */
static ssize_t gfar_show_rx_stash_index(struct device *dev,
Expand Down Expand Up @@ -172,8 +172,8 @@ static ssize_t gfar_set_rx_stash_index(struct device *dev,
return count;
}

DEVICE_ATTR(rx_stash_index, 0644, gfar_show_rx_stash_index,
gfar_set_rx_stash_index);
static DEVICE_ATTR(rx_stash_index, 0644, gfar_show_rx_stash_index,
gfar_set_rx_stash_index);

static ssize_t gfar_show_fifo_threshold(struct device *dev,
struct device_attribute *attr,
Expand Down Expand Up @@ -210,8 +210,8 @@ static ssize_t gfar_set_fifo_threshold(struct device *dev,
return count;
}

DEVICE_ATTR(fifo_threshold, 0644, gfar_show_fifo_threshold,
gfar_set_fifo_threshold);
static DEVICE_ATTR(fifo_threshold, 0644, gfar_show_fifo_threshold,
gfar_set_fifo_threshold);

static ssize_t gfar_show_fifo_starve(struct device *dev,
struct device_attribute *attr, char *buf)
Expand Down Expand Up @@ -247,7 +247,8 @@ static ssize_t gfar_set_fifo_starve(struct device *dev,
return count;
}

DEVICE_ATTR(fifo_starve, 0644, gfar_show_fifo_starve, gfar_set_fifo_starve);
static DEVICE_ATTR(fifo_starve, 0644, gfar_show_fifo_starve,
gfar_set_fifo_starve);

static ssize_t gfar_show_fifo_starve_off(struct device *dev,
struct device_attribute *attr,
Expand Down Expand Up @@ -284,8 +285,8 @@ static ssize_t gfar_set_fifo_starve_off(struct device *dev,
return count;
}

DEVICE_ATTR(fifo_starve_off, 0644, gfar_show_fifo_starve_off,
gfar_set_fifo_starve_off);
static DEVICE_ATTR(fifo_starve_off, 0644, gfar_show_fifo_starve_off,
gfar_set_fifo_starve_off);

void gfar_init_sysfs(struct net_device *dev)
{
Expand Down

0 comments on commit 50769be

Please sign in to comment.