net: ep93xx_eth stops receiving packets
[safe/jmp/linux-2.6] / drivers / net / gianfar_sysfs.c
index 4b726f6..64f4094 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/string.h>
 #include <linux/errno.h>
 #include <linux/unistd.h>
-#include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/etherdevice.h>
@@ -50,7 +49,7 @@ static ssize_t gfar_set_bd_stash(struct device *dev,
                                 const char *buf, size_t count)
 {
        struct gfar_private *priv = netdev_priv(to_net_dev(dev));
-       struct gfar __iomem *regs = priv->gfargrp.regs;
+       struct gfar __iomem *regs = priv->gfargrp[0].regs;
        int new_setting = 0;
        u32 temp;
        unsigned long flags;
@@ -62,8 +61,8 @@ static ssize_t gfar_set_bd_stash(struct device *dev,
        /* Find out the new setting */
        if (!strncmp("on", buf, count - 1) || !strncmp("1", buf, count - 1))
                new_setting = 1;
-       else if (!strncmp("off", buf, count - 1)
-                || !strncmp("0", buf, count - 1))
+       else if (!strncmp("off", buf, count - 1) ||
+                !strncmp("0", buf, count - 1))
                new_setting = 0;
        else
                return count;
@@ -105,7 +104,7 @@ static ssize_t gfar_set_rx_stash_size(struct device *dev,
                                      const char *buf, size_t count)
 {
        struct gfar_private *priv = netdev_priv(to_net_dev(dev));
-       struct gfar __iomem *regs = priv->gfargrp.regs;
+       struct gfar __iomem *regs = priv->gfargrp[0].regs;
        unsigned int length = simple_strtoul(buf, NULL, 0);
        u32 temp;
        unsigned long flags;
@@ -164,7 +163,7 @@ static ssize_t gfar_set_rx_stash_index(struct device *dev,
                                       const char *buf, size_t count)
 {
        struct gfar_private *priv = netdev_priv(to_net_dev(dev));
-       struct gfar __iomem *regs = priv->gfargrp.regs;
+       struct gfar __iomem *regs = priv->gfargrp[0].regs;
        unsigned short index = simple_strtoul(buf, NULL, 0);
        u32 temp;
        unsigned long flags;
@@ -186,7 +185,7 @@ static ssize_t gfar_set_rx_stash_index(struct device *dev,
        temp = gfar_read(&regs->attreli);
        temp &= ~ATTRELI_EI_MASK;
        temp |= ATTRELI_EI(index);
-       gfar_write(&regs->attreli, flags);
+       gfar_write(&regs->attreli, temp);
 
 out:
        unlock_rx_qs(priv);
@@ -212,7 +211,7 @@ static ssize_t gfar_set_fifo_threshold(struct device *dev,
                                       const char *buf, size_t count)
 {
        struct gfar_private *priv = netdev_priv(to_net_dev(dev));
-       struct gfar __iomem *regs = priv->gfargrp.regs;
+       struct gfar __iomem *regs = priv->gfargrp[0].regs;
        unsigned int length = simple_strtoul(buf, NULL, 0);
        u32 temp;
        unsigned long flags;
@@ -252,7 +251,7 @@ static ssize_t gfar_set_fifo_starve(struct device *dev,
                                    const char *buf, size_t count)
 {
        struct gfar_private *priv = netdev_priv(to_net_dev(dev));
-       struct gfar __iomem *regs = priv->gfargrp.regs;
+       struct gfar __iomem *regs = priv->gfargrp[0].regs;
        unsigned int num = simple_strtoul(buf, NULL, 0);
        u32 temp;
        unsigned long flags;
@@ -293,7 +292,7 @@ static ssize_t gfar_set_fifo_starve_off(struct device *dev,
                                        const char *buf, size_t count)
 {
        struct gfar_private *priv = netdev_priv(to_net_dev(dev));
-       struct gfar __iomem *regs = priv->gfargrp.regs;
+       struct gfar __iomem *regs = priv->gfargrp[0].regs;
        unsigned int num = simple_strtoul(buf, NULL, 0);
        u32 temp;
        unsigned long flags;