diff options
Diffstat (limited to 'drivers/net/arm/am79c961a.c')
-rw-r--r-- | drivers/net/arm/am79c961a.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c index 9b659e3c8d67..c56d86d371a9 100644 --- a/drivers/net/arm/am79c961a.c +++ b/drivers/net/arm/am79c961a.c | |||
@@ -15,16 +15,13 @@ | |||
15 | */ | 15 | */ |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/fcntl.h> | ||
19 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
20 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
21 | #include <linux/in.h> | ||
22 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
23 | #include <linux/string.h> | 21 | #include <linux/string.h> |
24 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
25 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
26 | #include <linux/etherdevice.h> | 24 | #include <linux/etherdevice.h> |
27 | #include <linux/skbuff.h> | ||
28 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
29 | #include <linux/init.h> | 26 | #include <linux/init.h> |
30 | #include <linux/crc32.h> | 27 | #include <linux/crc32.h> |
@@ -33,7 +30,6 @@ | |||
33 | #include <asm/system.h> | 30 | #include <asm/system.h> |
34 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
35 | #include <asm/io.h> | 32 | #include <asm/io.h> |
36 | #include <asm/dma.h> | ||
37 | 33 | ||
38 | #define TX_BUFFERS 15 | 34 | #define TX_BUFFERS 15 |
39 | #define RX_BUFFERS 25 | 35 | #define RX_BUFFERS 25 |
@@ -85,7 +81,7 @@ static inline unsigned short read_ireg(u_long base_addr, u_int reg) | |||
85 | u_short v; | 81 | u_short v; |
86 | __asm__( | 82 | __asm__( |
87 | "str%?h %1, [%2] @ NAT_RAP\n\t" | 83 | "str%?h %1, [%2] @ NAT_RAP\n\t" |
88 | "str%?h %0, [%2, #8] @ NET_IDP\n\t" | 84 | "ldr%?h %0, [%2, #8] @ NET_IDP\n\t" |
89 | : "=r" (v) | 85 | : "=r" (v) |
90 | : "r" (reg), "r" (ISAIO_BASE + 0x0464)); | 86 | : "r" (reg), "r" (ISAIO_BASE + 0x0464)); |
91 | return v; | 87 | return v; |
@@ -288,7 +284,7 @@ static void am79c961_timer(unsigned long data) | |||
288 | else if (!lnkstat && carrier) | 284 | else if (!lnkstat && carrier) |
289 | netif_carrier_off(dev); | 285 | netif_carrier_off(dev); |
290 | 286 | ||
291 | mod_timer(&priv->timer, jiffies + 5*HZ); | 287 | mod_timer(&priv->timer, jiffies + msecs_to_jiffies(500)); |
292 | } | 288 | } |
293 | 289 | ||
294 | /* | 290 | /* |
@@ -709,13 +705,9 @@ static int __init am79c961_init(void) | |||
709 | goto release; | 705 | goto release; |
710 | 706 | ||
711 | am79c961_banner(); | 707 | am79c961_banner(); |
712 | printk(KERN_INFO "%s: ether address ", dev->name); | ||
713 | 708 | ||
714 | /* Retrive and print the ethernet address. */ | 709 | for (i = 0; i < 6; i++) |
715 | for (i = 0; i < 6; i++) { | ||
716 | dev->dev_addr[i] = inb(dev->base_addr + i * 2) & 0xff; | 710 | dev->dev_addr[i] = inb(dev->base_addr + i * 2) & 0xff; |
717 | printk (i == 5 ? "%02x\n" : "%02x:", dev->dev_addr[i]); | ||
718 | } | ||
719 | 711 | ||
720 | spin_lock_init(&priv->chip_lock); | 712 | spin_lock_init(&priv->chip_lock); |
721 | init_timer(&priv->timer); | 713 | init_timer(&priv->timer); |
@@ -736,8 +728,14 @@ static int __init am79c961_init(void) | |||
736 | #endif | 728 | #endif |
737 | 729 | ||
738 | ret = register_netdev(dev); | 730 | ret = register_netdev(dev); |
739 | if (ret == 0) | 731 | if (ret == 0) { |
732 | printk(KERN_INFO "%s: ether address ", dev->name); | ||
733 | |||
734 | for (i = 0; i < 6; i++) | ||
735 | printk (i == 5 ? "%02x\n" : "%02x:", dev->dev_addr[i]); | ||
736 | |||
740 | return 0; | 737 | return 0; |
738 | } | ||
741 | 739 | ||
742 | release: | 740 | release: |
743 | release_region(dev->base_addr, 0x18); | 741 | release_region(dev->base_addr, 0x18); |