diff options
Diffstat (limited to 'drivers/net/at1700.c')
-rw-r--r-- | drivers/net/at1700.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c index e613cc289749..4aeca11f3ee2 100644 --- a/drivers/net/at1700.c +++ b/drivers/net/at1700.c | |||
@@ -18,7 +18,7 @@ | |||
18 | straight-forward Fujitsu MB86965 implementations. | 18 | straight-forward Fujitsu MB86965 implementations. |
19 | 19 | ||
20 | Modification for Fujitsu FMV-18X cards is done by Yutaka Tamiya | 20 | Modification for Fujitsu FMV-18X cards is done by Yutaka Tamiya |
21 | (tamy@flab.fujitsu.co.jp). | 21 | (tamy@flab.fujitsu.co.jp). |
22 | 22 | ||
23 | Sources: | 23 | Sources: |
24 | The Fujitsu MB86965 datasheet. | 24 | The Fujitsu MB86965 datasheet. |
@@ -35,7 +35,6 @@ | |||
35 | response to inb()s from other device probes! | 35 | response to inb()s from other device probes! |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/config.h> | ||
39 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
40 | #include <linux/netdevice.h> | 39 | #include <linux/netdevice.h> |
41 | #include <linux/etherdevice.h> | 40 | #include <linux/etherdevice.h> |
@@ -59,7 +58,7 @@ | |||
59 | #include <asm/dma.h> | 58 | #include <asm/dma.h> |
60 | 59 | ||
61 | static char version[] __initdata = | 60 | static char version[] __initdata = |
62 | "at1700.c:v1.15 4/7/98 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n"; | 61 | "at1700.c:v1.16 9/11/06 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n"; |
63 | 62 | ||
64 | #define DRV_NAME "at1700" | 63 | #define DRV_NAME "at1700" |
65 | 64 | ||
@@ -169,7 +168,7 @@ static struct net_device_stats *net_get_stats(struct net_device *dev); | |||
169 | static void set_rx_mode(struct net_device *dev); | 168 | static void set_rx_mode(struct net_device *dev); |
170 | static void net_tx_timeout (struct net_device *dev); | 169 | static void net_tx_timeout (struct net_device *dev); |
171 | 170 | ||
172 | 171 | ||
173 | #ifdef CONFIG_MCA_LEGACY | 172 | #ifdef CONFIG_MCA_LEGACY |
174 | struct at1720_mca_adapters_struct { | 173 | struct at1720_mca_adapters_struct { |
175 | char* name; | 174 | char* name; |
@@ -202,7 +201,7 @@ static void cleanup_card(struct net_device *dev) | |||
202 | struct net_local *lp = netdev_priv(dev); | 201 | struct net_local *lp = netdev_priv(dev); |
203 | if (lp->mca_slot >= 0) | 202 | if (lp->mca_slot >= 0) |
204 | mca_mark_as_unused(lp->mca_slot); | 203 | mca_mark_as_unused(lp->mca_slot); |
205 | #endif | 204 | #endif |
206 | free_irq(dev->irq, NULL); | 205 | free_irq(dev->irq, NULL); |
207 | release_region(dev->base_addr, AT1700_IO_EXTENT); | 206 | release_region(dev->base_addr, AT1700_IO_EXTENT); |
208 | } | 207 | } |
@@ -302,7 +301,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr) | |||
302 | for (j = 0; at1720_mca_adapters[j].name != NULL; j ++) { | 301 | for (j = 0; at1720_mca_adapters[j].name != NULL; j ++) { |
303 | slot = 0; | 302 | slot = 0; |
304 | while (slot != MCA_NOTFOUND) { | 303 | while (slot != MCA_NOTFOUND) { |
305 | 304 | ||
306 | slot = mca_find_unused_adapter( at1720_mca_adapters[j].id, slot ); | 305 | slot = mca_find_unused_adapter( at1720_mca_adapters[j].id, slot ); |
307 | if (slot == MCA_NOTFOUND) break; | 306 | if (slot == MCA_NOTFOUND) break; |
308 | 307 | ||
@@ -316,7 +315,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr) | |||
316 | if (( pos3 & 0x07) == at1700_ioaddr_pattern[l_i]) | 315 | if (( pos3 & 0x07) == at1700_ioaddr_pattern[l_i]) |
317 | break; | 316 | break; |
318 | ioaddr = at1700_mca_probe_list[l_i]; | 317 | ioaddr = at1700_mca_probe_list[l_i]; |
319 | 318 | ||
320 | for (irq = 0; irq < 0x10; irq++) | 319 | for (irq = 0; irq < 0x10; irq++) |
321 | if (((((pos4>>4) & 0x0f) | (pos3 & 0xf0)) & 0xff) == at1700_irq_pattern[irq]) | 320 | if (((((pos4>>4) & 0x0f) | (pos3 & 0xf0)) & 0xff) == at1700_irq_pattern[irq]) |
322 | break; | 321 | break; |
@@ -329,7 +328,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr) | |||
329 | } | 328 | } |
330 | 329 | ||
331 | dev->irq = irq; | 330 | dev->irq = irq; |
332 | 331 | ||
333 | /* claim the slot */ | 332 | /* claim the slot */ |
334 | mca_set_adapter_name( slot, at1720_mca_adapters[j].name ); | 333 | mca_set_adapter_name( slot, at1720_mca_adapters[j].name ); |
335 | mca_mark_as_used(slot); | 334 | mca_mark_as_used(slot); |
@@ -354,7 +353,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr) | |||
354 | else { | 353 | else { |
355 | goto err_out; | 354 | goto err_out; |
356 | } | 355 | } |
357 | 356 | ||
358 | #ifdef CONFIG_MCA_LEGACY | 357 | #ifdef CONFIG_MCA_LEGACY |
359 | found: | 358 | found: |
360 | #endif | 359 | #endif |
@@ -488,7 +487,7 @@ err_out: | |||
488 | return ret; | 487 | return ret; |
489 | } | 488 | } |
490 | 489 | ||
491 | 490 | ||
492 | /* EEPROM_Ctrl bits. */ | 491 | /* EEPROM_Ctrl bits. */ |
493 | #define EE_SHIFT_CLK 0x40 /* EEPROM shift clock, in reg. 16. */ | 492 | #define EE_SHIFT_CLK 0x40 /* EEPROM shift clock, in reg. 16. */ |
494 | #define EE_CS 0x20 /* EEPROM chip select, in reg. 16. */ | 493 | #define EE_CS 0x20 /* EEPROM chip select, in reg. 16. */ |
@@ -529,7 +528,7 @@ static int __init read_eeprom(long ioaddr, int location) | |||
529 | return retval; | 528 | return retval; |
530 | } | 529 | } |
531 | 530 | ||
532 | 531 | ||
533 | 532 | ||
534 | static int net_open(struct net_device *dev) | 533 | static int net_open(struct net_device *dev) |
535 | { | 534 | { |
@@ -646,7 +645,7 @@ static int net_send_packet (struct sk_buff *skb, struct net_device *dev) | |||
646 | 645 | ||
647 | return 0; | 646 | return 0; |
648 | } | 647 | } |
649 | 648 | ||
650 | /* The typical workload of the driver: | 649 | /* The typical workload of the driver: |
651 | Handle the network interface interrupts. */ | 650 | Handle the network interface interrupts. */ |
652 | static irqreturn_t | 651 | static irqreturn_t |
@@ -664,9 +663,9 @@ net_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
664 | 663 | ||
665 | ioaddr = dev->base_addr; | 664 | ioaddr = dev->base_addr; |
666 | lp = netdev_priv(dev); | 665 | lp = netdev_priv(dev); |
667 | 666 | ||
668 | spin_lock (&lp->lock); | 667 | spin_lock (&lp->lock); |
669 | 668 | ||
670 | status = inw(ioaddr + TX_STATUS); | 669 | status = inw(ioaddr + TX_STATUS); |
671 | outw(status, ioaddr + TX_STATUS); | 670 | outw(status, ioaddr + TX_STATUS); |
672 | 671 | ||
@@ -852,8 +851,6 @@ set_rx_mode(struct net_device *dev) | |||
852 | int i; | 851 | int i; |
853 | 852 | ||
854 | if (dev->flags & IFF_PROMISC) { | 853 | if (dev->flags & IFF_PROMISC) { |
855 | /* Unconditionally log net taps. */ | ||
856 | printk("%s: Promiscuous mode enabled.\n", dev->name); | ||
857 | memset(mc_filter, 0xff, sizeof(mc_filter)); | 854 | memset(mc_filter, 0xff, sizeof(mc_filter)); |
858 | outb(3, ioaddr + RX_MODE); /* Enable promiscuous mode */ | 855 | outb(3, ioaddr + RX_MODE); /* Enable promiscuous mode */ |
859 | } else if (dev->mc_count > MC_FILTERBREAK | 856 | } else if (dev->mc_count > MC_FILTERBREAK |
@@ -902,7 +899,7 @@ MODULE_PARM_DESC(io, "AT1700/FMV18X I/O base address"); | |||
902 | MODULE_PARM_DESC(irq, "AT1700/FMV18X IRQ number"); | 899 | MODULE_PARM_DESC(irq, "AT1700/FMV18X IRQ number"); |
903 | MODULE_PARM_DESC(net_debug, "AT1700/FMV18X debug level (0-6)"); | 900 | MODULE_PARM_DESC(net_debug, "AT1700/FMV18X debug level (0-6)"); |
904 | 901 | ||
905 | int init_module(void) | 902 | int __init init_module(void) |
906 | { | 903 | { |
907 | if (io == 0) | 904 | if (io == 0) |
908 | printk("at1700: You should not use auto-probing with insmod!\n"); | 905 | printk("at1700: You should not use auto-probing with insmod!\n"); |
@@ -922,7 +919,7 @@ cleanup_module(void) | |||
922 | #endif /* MODULE */ | 919 | #endif /* MODULE */ |
923 | MODULE_LICENSE("GPL"); | 920 | MODULE_LICENSE("GPL"); |
924 | 921 | ||
925 | 922 | ||
926 | /* | 923 | /* |
927 | * Local variables: | 924 | * Local variables: |
928 | * compile-command: "gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c at1700.c" | 925 | * compile-command: "gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c at1700.c" |