X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fat1700.c;h=56ae8babd919d3d302c332fa783c9072d9d93e7a;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=e613cc289749d6a89ee595eb24b8285a95b41163;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c index e613cc289..56ae8babd 100644 --- a/drivers/net/at1700.c +++ b/drivers/net/at1700.c @@ -18,7 +18,7 @@ straight-forward Fujitsu MB86965 implementations. Modification for Fujitsu FMV-18X cards is done by Yutaka Tamiya - (tamy@flab.fujitsu.co.jp). + (tamy@flab.fujitsu.co.jp). Sources: The Fujitsu MB86965 datasheet. @@ -35,7 +35,6 @@ response to inb()s from other device probes! */ -#include #include #include #include @@ -59,7 +58,7 @@ #include static char version[] __initdata = - "at1700.c:v1.15 4/7/98 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n"; + "at1700.c:v1.16 9/11/06 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n"; #define DRV_NAME "at1700" @@ -162,14 +161,14 @@ static int at1700_probe1(struct net_device *dev, int ioaddr); static int read_eeprom(long ioaddr, int location); static int net_open(struct net_device *dev); static int net_send_packet(struct sk_buff *skb, struct net_device *dev); -static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t net_interrupt(int irq, void *dev_id); static void net_rx(struct net_device *dev); static int net_close(struct net_device *dev); static struct net_device_stats *net_get_stats(struct net_device *dev); static void set_rx_mode(struct net_device *dev); static void net_tx_timeout (struct net_device *dev); - + #ifdef CONFIG_MCA_LEGACY struct at1720_mca_adapters_struct { char* name; @@ -202,7 +201,7 @@ static void cleanup_card(struct net_device *dev) struct net_local *lp = netdev_priv(dev); if (lp->mca_slot >= 0) mca_mark_as_unused(lp->mca_slot); -#endif +#endif free_irq(dev->irq, NULL); release_region(dev->base_addr, AT1700_IO_EXTENT); } @@ -302,7 +301,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr) for (j = 0; at1720_mca_adapters[j].name != NULL; j ++) { slot = 0; while (slot != MCA_NOTFOUND) { - + slot = mca_find_unused_adapter( at1720_mca_adapters[j].id, slot ); if (slot == MCA_NOTFOUND) break; @@ -316,7 +315,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr) if (( pos3 & 0x07) == at1700_ioaddr_pattern[l_i]) break; ioaddr = at1700_mca_probe_list[l_i]; - + for (irq = 0; irq < 0x10; irq++) if (((((pos4>>4) & 0x0f) | (pos3 & 0xf0)) & 0xff) == at1700_irq_pattern[irq]) break; @@ -329,7 +328,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr) } dev->irq = irq; - + /* claim the slot */ mca_set_adapter_name( slot, at1720_mca_adapters[j].name ); mca_mark_as_used(slot); @@ -354,7 +353,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr) else { goto err_out; } - + #ifdef CONFIG_MCA_LEGACY found: #endif @@ -488,7 +487,7 @@ err_out: return ret; } - + /* EEPROM_Ctrl bits. */ #define EE_SHIFT_CLK 0x40 /* EEPROM shift clock, in reg. 16. */ #define EE_CS 0x20 /* EEPROM chip select, in reg. 16. */ @@ -529,7 +528,7 @@ static int __init read_eeprom(long ioaddr, int location) return retval; } - + static int net_open(struct net_device *dev) { @@ -646,11 +645,10 @@ static int net_send_packet (struct sk_buff *skb, struct net_device *dev) return 0; } - + /* The typical workload of the driver: Handle the network interface interrupts. */ -static irqreturn_t -net_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t net_interrupt(int irq, void *dev_id) { struct net_device *dev = dev_id; struct net_local *lp; @@ -664,9 +662,9 @@ net_interrupt(int irq, void *dev_id, struct pt_regs *regs) ioaddr = dev->base_addr; lp = netdev_priv(dev); - + spin_lock (&lp->lock); - + status = inw(ioaddr + TX_STATUS); outw(status, ioaddr + TX_STATUS); @@ -852,8 +850,6 @@ set_rx_mode(struct net_device *dev) int i; if (dev->flags & IFF_PROMISC) { - /* Unconditionally log net taps. */ - printk("%s: Promiscuous mode enabled.\n", dev->name); memset(mc_filter, 0xff, sizeof(mc_filter)); outb(3, ioaddr + RX_MODE); /* Enable promiscuous mode */ } else if (dev->mc_count > MC_FILTERBREAK @@ -902,7 +898,7 @@ MODULE_PARM_DESC(io, "AT1700/FMV18X I/O base address"); MODULE_PARM_DESC(irq, "AT1700/FMV18X IRQ number"); MODULE_PARM_DESC(net_debug, "AT1700/FMV18X debug level (0-6)"); -int init_module(void) +int __init init_module(void) { if (io == 0) printk("at1700: You should not use auto-probing with insmod!\n"); @@ -912,7 +908,7 @@ int init_module(void) return 0; } -void +void __exit cleanup_module(void) { unregister_netdev(dev_at1700); @@ -922,7 +918,7 @@ cleanup_module(void) #endif /* MODULE */ MODULE_LICENSE("GPL"); - + /* * Local variables: * compile-command: "gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c at1700.c"