aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sunlance.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-08-06 13:13:54 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-08-06 13:13:54 -0400
commit11e4afb49b7fa1fc8e1ffd850c1806dd86a08204 (patch)
tree9e57efcb106ae912f7bec718feb3f8ec607559bb /drivers/net/sunlance.c
parent162500b3a3ff39d941d29db49b41a16667ae44f0 (diff)
parent9b2a606d3898fcb2eedb6faded3bb37549590ac4 (diff)
Merge branches 'gemini' and 'misc' into devel
Diffstat (limited to 'drivers/net/sunlance.c')
-rw-r--r--drivers/net/sunlance.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index d7c73f478ef5..7d9c33dd9d1a 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -78,7 +78,6 @@ static char lancestr[] = "LANCE";
78#include <linux/interrupt.h> 78#include <linux/interrupt.h>
79#include <linux/ioport.h> 79#include <linux/ioport.h>
80#include <linux/in.h> 80#include <linux/in.h>
81#include <linux/slab.h>
82#include <linux/string.h> 81#include <linux/string.h>
83#include <linux/delay.h> 82#include <linux/delay.h>
84#include <linux/init.h> 83#include <linux/init.h>
@@ -94,6 +93,7 @@ static char lancestr[] = "LANCE";
94#include <linux/dma-mapping.h> 93#include <linux/dma-mapping.h>
95#include <linux/of.h> 94#include <linux/of.h>
96#include <linux/of_device.h> 95#include <linux/of_device.h>
96#include <linux/gfp.h>
97 97
98#include <asm/system.h> 98#include <asm/system.h>
99#include <asm/io.h> 99#include <asm/io.h>
@@ -1003,7 +1003,7 @@ static int lance_reset(struct net_device *dev)
1003 } 1003 }
1004 lp->init_ring(dev); 1004 lp->init_ring(dev);
1005 load_csrs(lp); 1005 load_csrs(lp);
1006 dev->trans_start = jiffies; 1006 dev->trans_start = jiffies; /* prevent tx timeout */
1007 status = init_restart_lance(lp); 1007 status = init_restart_lance(lp);
1008 return status; 1008 return status;
1009} 1009}
@@ -1054,7 +1054,7 @@ static void lance_piocopy_from_skb(void __iomem *dest, unsigned char *src, int l
1054 } 1054 }
1055 src = (char *) p16; 1055 src = (char *) p16;
1056 break; 1056 break;
1057 }; 1057 }
1058 if (len >= 2) { 1058 if (len >= 2) {
1059 u16 val = src[0] << 8 | src[1]; 1059 u16 val = src[0] << 8 | src[1];
1060 sbus_writew(val, piobuf); 1060 sbus_writew(val, piobuf);
@@ -1160,7 +1160,6 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
1160 1160
1161 spin_unlock_irq(&lp->lock); 1161 spin_unlock_irq(&lp->lock);
1162 1162
1163 dev->trans_start = jiffies;
1164 dev_kfree_skb(skb); 1163 dev_kfree_skb(skb);
1165 1164
1166 return NETDEV_TX_OK; 1165 return NETDEV_TX_OK;
@@ -1170,7 +1169,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
1170static void lance_load_multicast(struct net_device *dev) 1169static void lance_load_multicast(struct net_device *dev)
1171{ 1170{
1172 struct lance_private *lp = netdev_priv(dev); 1171 struct lance_private *lp = netdev_priv(dev);
1173 struct dev_mc_list *dmi; 1172 struct netdev_hw_addr *ha;
1174 char *addrs; 1173 char *addrs;
1175 u32 crc; 1174 u32 crc;
1176 u32 val; 1175 u32 val;
@@ -1195,8 +1194,8 @@ static void lance_load_multicast(struct net_device *dev)
1195 return; 1194 return;
1196 1195
1197 /* Add addresses */ 1196 /* Add addresses */
1198 netdev_for_each_mc_addr(dmi, dev) { 1197 netdev_for_each_mc_addr(ha, dev) {
1199 addrs = dmi->dmi_addr; 1198 addrs = ha->addr;
1200 1199
1201 /* multicast address? */ 1200 /* multicast address? */
1202 if (!(*addrs & 1)) 1201 if (!(*addrs & 1))
@@ -1324,7 +1323,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op,
1324 struct of_device *ledma, 1323 struct of_device *ledma,
1325 struct of_device *lebuffer) 1324 struct of_device *lebuffer)
1326{ 1325{
1327 struct device_node *dp = op->node; 1326 struct device_node *dp = op->dev.of_node;
1328 static unsigned version_printed; 1327 static unsigned version_printed;
1329 struct lance_private *lp; 1328 struct lance_private *lp;
1330 struct net_device *dev; 1329 struct net_device *dev;
@@ -1411,7 +1410,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op,
1411 1410
1412 lp->burst_sizes = 0; 1411 lp->burst_sizes = 0;
1413 if (lp->ledma) { 1412 if (lp->ledma) {
1414 struct device_node *ledma_dp = ledma->node; 1413 struct device_node *ledma_dp = ledma->dev.of_node;
1415 struct device_node *sbus_dp; 1414 struct device_node *sbus_dp;
1416 unsigned int sbmask; 1415 unsigned int sbmask;
1417 const char *prop; 1416 const char *prop;
@@ -1507,7 +1506,7 @@ fail:
1507static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match) 1506static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match)
1508{ 1507{
1509 struct of_device *parent = to_of_device(op->dev.parent); 1508 struct of_device *parent = to_of_device(op->dev.parent);
1510 struct device_node *parent_dp = parent->node; 1509 struct device_node *parent_dp = parent->dev.of_node;
1511 int err; 1510 int err;
1512 1511
1513 if (!strcmp(parent_dp->name, "ledma")) { 1512 if (!strcmp(parent_dp->name, "ledma")) {
@@ -1546,8 +1545,11 @@ static const struct of_device_id sunlance_sbus_match[] = {
1546MODULE_DEVICE_TABLE(of, sunlance_sbus_match); 1545MODULE_DEVICE_TABLE(of, sunlance_sbus_match);
1547 1546
1548static struct of_platform_driver sunlance_sbus_driver = { 1547static struct of_platform_driver sunlance_sbus_driver = {
1549 .name = "sunlance", 1548 .driver = {
1550 .match_table = sunlance_sbus_match, 1549 .name = "sunlance",
1550 .owner = THIS_MODULE,
1551 .of_match_table = sunlance_sbus_match,
1552 },
1551 .probe = sunlance_sbus_probe, 1553 .probe = sunlance_sbus_probe,
1552 .remove = __devexit_p(sunlance_sbus_remove), 1554 .remove = __devexit_p(sunlance_sbus_remove),
1553}; 1555};