aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-04 06:29:54 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-04 06:29:54 -0400
commit3784fd7316d336f2ba79b6c7c8168d08eff8a714 (patch)
tree3019c37f1ba588f252d1a9f1ef33beb5d3d683b1 /drivers/net
parent7c440e7990ea22c0c374c59a5fbd79b0579d1517 (diff)
parentc336923b668fdcf0312efbec3b44895d713f4d81 (diff)
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/e100.c6
-rw-r--r--drivers/net/sunlance.c27
-rw-r--r--drivers/net/wireless/strip.c6
3 files changed, 20 insertions, 19 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 3b0b95892d5f..47d970896a5c 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -173,8 +173,11 @@ MODULE_LICENSE("GPL");
173MODULE_VERSION(DRV_VERSION); 173MODULE_VERSION(DRV_VERSION);
174 174
175static int debug = 3; 175static int debug = 3;
176static int eeprom_bad_csum_allow = 0;
176module_param(debug, int, 0); 177module_param(debug, int, 0);
178module_param(eeprom_bad_csum_allow, int, 0);
177MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); 179MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
180MODULE_PARM_DESC(eeprom_bad_csum_allow, "Allow bad eeprom checksums");
178#define DPRINTK(nlevel, klevel, fmt, args...) \ 181#define DPRINTK(nlevel, klevel, fmt, args...) \
179 (void)((NETIF_MSG_##nlevel & nic->msg_enable) && \ 182 (void)((NETIF_MSG_##nlevel & nic->msg_enable) && \
180 printk(KERN_##klevel PFX "%s: %s: " fmt, nic->netdev->name, \ 183 printk(KERN_##klevel PFX "%s: %s: " fmt, nic->netdev->name, \
@@ -756,7 +759,8 @@ static int e100_eeprom_load(struct nic *nic)
756 checksum = le16_to_cpu(0xBABA - checksum); 759 checksum = le16_to_cpu(0xBABA - checksum);
757 if(checksum != nic->eeprom[nic->eeprom_wc - 1]) { 760 if(checksum != nic->eeprom[nic->eeprom_wc - 1]) {
758 DPRINTK(PROBE, ERR, "EEPROM corrupted\n"); 761 DPRINTK(PROBE, ERR, "EEPROM corrupted\n");
759 return -EAGAIN; 762 if (!eeprom_bad_csum_allow)
763 return -EAGAIN;
760 } 764 }
761 765
762 return 0; 766 return 0;
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index 0e3fdf7c6dd3..ec0413609f36 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -1566,20 +1566,21 @@ static int __exit sunlance_sun4_remove(void)
1566static int __devinit sunlance_sbus_probe(struct of_device *dev, const struct of_device_id *match) 1566static int __devinit sunlance_sbus_probe(struct of_device *dev, const struct of_device_id *match)
1567{ 1567{
1568 struct sbus_dev *sdev = to_sbus_device(&dev->dev); 1568 struct sbus_dev *sdev = to_sbus_device(&dev->dev);
1569 struct device_node *dp = dev->node;
1570 int err; 1569 int err;
1571 1570
1572 if (!strcmp(dp->name, "le")) { 1571 if (sdev->parent) {
1573 err = sparc_lance_probe_one(sdev, NULL, NULL); 1572 struct of_device *parent = &sdev->parent->ofdev;
1574 } else if (!strcmp(dp->name, "ledma")) {
1575 struct sbus_dma *ledma = find_ledma(sdev);
1576 1573
1577 err = sparc_lance_probe_one(sdev->child, ledma, NULL); 1574 if (!strcmp(parent->node->name, "ledma")) {
1578 } else { 1575 struct sbus_dma *ledma = find_ledma(to_sbus_device(&parent->dev));
1579 BUG_ON(strcmp(dp->name, "lebuffer"));
1580 1576
1581 err = sparc_lance_probe_one(sdev->child, NULL, sdev); 1577 err = sparc_lance_probe_one(sdev, ledma, NULL);
1582 } 1578 } else if (!strcmp(parent->node->name, "lebuffer")) {
1579 err = sparc_lance_probe_one(sdev, NULL, to_sbus_device(&parent->dev));
1580 } else
1581 err = sparc_lance_probe_one(sdev, NULL, NULL);
1582 } else
1583 err = sparc_lance_probe_one(sdev, NULL, NULL);
1583 1584
1584 return err; 1585 return err;
1585} 1586}
@@ -1604,12 +1605,6 @@ static struct of_device_id sunlance_sbus_match[] = {
1604 { 1605 {
1605 .name = "le", 1606 .name = "le",
1606 }, 1607 },
1607 {
1608 .name = "ledma",
1609 },
1610 {
1611 .name = "lebuffer",
1612 },
1613 {}, 1608 {},
1614}; 1609};
1615 1610
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index fd31885c6844..ccaf28e8db0a 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -467,6 +467,7 @@ static int arp_query(unsigned char *haddr, u32 paddr,
467 struct net_device *dev) 467 struct net_device *dev)
468{ 468{
469 struct neighbour *neighbor_entry; 469 struct neighbour *neighbor_entry;
470 int ret = 0;
470 471
471 neighbor_entry = neigh_lookup(&arp_tbl, &paddr, dev); 472 neighbor_entry = neigh_lookup(&arp_tbl, &paddr, dev);
472 473
@@ -474,10 +475,11 @@ static int arp_query(unsigned char *haddr, u32 paddr,
474 neighbor_entry->used = jiffies; 475 neighbor_entry->used = jiffies;
475 if (neighbor_entry->nud_state & NUD_VALID) { 476 if (neighbor_entry->nud_state & NUD_VALID) {
476 memcpy(haddr, neighbor_entry->ha, dev->addr_len); 477 memcpy(haddr, neighbor_entry->ha, dev->addr_len);
477 return 1; 478 ret = 1;
478 } 479 }
480 neigh_release(neighbor_entry);
479 } 481 }
480 return 0; 482 return ret;
481} 483}
482 484
483static void DumpData(char *msg, struct strip *strip_info, __u8 * ptr, 485static void DumpData(char *msg, struct strip *strip_info, __u8 * ptr,