git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bnx2: Fix register printouts during NETEV_WATCHDOG.
[safe/jmp/linux-2.6]
/
drivers
/
net
/
dm9000.c
diff --git
a/drivers/net/dm9000.c
b/drivers/net/dm9000.c
index
0cbe3c0
..
254b6f7
100644
(file)
--- a/
drivers/net/dm9000.c
+++ b/
drivers/net/dm9000.c
@@
-33,6
+33,7
@@
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/irq.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/irq.h>
+#include <linux/slab.h>
#include <asm/delay.h>
#include <asm/irq.h>
#include <asm/delay.h>
#include <asm/irq.h>
@@
-724,8
+725,7
@@
static void
dm9000_hash_table(struct net_device *dev)
{
board_info_t *db = netdev_priv(dev);
dm9000_hash_table(struct net_device *dev)
{
board_info_t *db = netdev_priv(dev);
- struct dev_mc_list *mcptr = dev->mc_list;
- int mc_cnt = dev->mc_count;
+ struct netdev_hw_addr *ha;
int i, oft;
u32 hash_val;
u16 hash_table[4];
int i, oft;
u32 hash_val;
u16 hash_table[4];
@@
-753,8
+753,8
@@
dm9000_hash_table(struct net_device *dev)
rcr |= RCR_ALL;
/* the multicast address in Hash Table : 64 bits */
rcr |= RCR_ALL;
/* the multicast address in Hash Table : 64 bits */
-
for (i = 0; i < mc_cnt; i++, mcptr = mcptr->next
) {
- hash_val = ether_crc_le(6,
mcptr->dmi_
addr) & 0x3f;
+
netdev_for_each_mc_addr(ha, dev
) {
+ hash_val = ether_crc_le(6,
ha->
addr) & 0x3f;
hash_table[hash_val / 16] |= (u16) 1 << (hash_val % 16);
}
hash_table[hash_val / 16] |= (u16) 1 << (hash_val % 16);
}
@@
-769,7
+769,7
@@
dm9000_hash_table(struct net_device *dev)
}
/*
}
/*
- * Initilize dm9000 board
+ * Initi
a
lize dm9000 board
*/
static void
dm9000_init_dm9000(struct net_device *dev)
*/
static void
dm9000_init_dm9000(struct net_device *dev)
@@
-825,7
+825,7
@@
dm9000_init_dm9000(struct net_device *dev)
/* Init Driver variable */
db->tx_pkt_cnt = 0;
db->queue_pkt_len = 0;
/* Init Driver variable */
db->tx_pkt_cnt = 0;
db->queue_pkt_len = 0;
- dev->trans_start =
0
;
+ dev->trans_start =
jiffies
;
}
/* Our watchdog timed out. Called by the networking layer */
}
/* Our watchdog timed out. Called by the networking layer */
@@
-843,7
+843,7
@@
static void dm9000_timeout(struct net_device *dev)
dm9000_reset(db);
dm9000_init_dm9000(dev);
/* We can accept TX packets again */
dm9000_reset(db);
dm9000_init_dm9000(dev);
/* We can accept TX packets again */
- dev->trans_start = jiffies;
+ dev->trans_start = jiffies;
/* prevent tx timeout */
netif_wake_queue(dev);
/* Restore previous register address */
netif_wake_queue(dev);
/* Restore previous register address */
@@
-1646,7
+1646,7
@@
dm9000_drv_resume(struct device *dev)
return 0;
}
return 0;
}
-static struct dev_pm_ops dm9000_drv_pm_ops = {
+static
const
struct dev_pm_ops dm9000_drv_pm_ops = {
.suspend = dm9000_drv_suspend,
.resume = dm9000_drv_resume,
};
.suspend = dm9000_drv_suspend,
.resume = dm9000_drv_resume,
};