X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fac3200.c;h=644c408515df9b643823557ce7459b985164d2a7;hb=693aa9470d8273a0ded8b211a8f5f7c0835adf30;hp=8a0af5453e21c93ed6eb19e7d8d925b65cc16cee;hpb=344a076110f4ecb16ea6d286b63be696604982ed;p=powerpc.git diff --git a/drivers/net/ac3200.c b/drivers/net/ac3200.c index 8a0af5453e..644c408515 100644 --- a/drivers/net/ac3200.c +++ b/drivers/net/ac3200.c @@ -45,7 +45,7 @@ static const char version[] = #define AC_NIC_BASE 0x00 #define AC_SA_PROM 0x16 /* The station address PROM. */ #define AC_ADDR0 0x00 /* Prefix station address values. */ -#define AC_ADDR1 0x40 +#define AC_ADDR1 0x40 #define AC_ADDR2 0x90 #define AC_ID_PORT 0xC80 #define AC_EISA_ID 0x0110d305 @@ -89,7 +89,7 @@ static void ac_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page); static int ac_close_card(struct net_device *dev); - + /* Probe for the AC3200. @@ -123,14 +123,6 @@ static int __init do_ac3200_probe(struct net_device *dev) return -ENODEV; } -static void cleanup_card(struct net_device *dev) -{ - /* Someday free_irq may be in ac_close_card() */ - free_irq(dev->irq, dev); - release_region(dev->base_addr, AC_IO_EXTENT); - iounmap(ei_status.mem); -} - #ifndef MODULE struct net_device * __init ac3200_probe(int unit) { @@ -225,7 +217,7 @@ static int __init ac_probe1(int ioaddr, struct net_device *dev) dev->if_port = inb(ioaddr + AC_CONFIG) >> 6; dev->mem_start = config2mem(inb(ioaddr + AC_CONFIG)); - printk("%s: AC3200 at %#3x with %dkB memory at physical address %#lx.\n", + printk("%s: AC3200 at %#3x with %dkB memory at physical address %#lx.\n", dev->name, ioaddr, AC_STOP_PG/4, dev->mem_start); /* @@ -335,8 +327,7 @@ static void ac_block_input(struct net_device *dev, int count, struct sk_buff *sk memcpy_fromio(skb->data + semi_count, ei_status.mem + TX_PAGES*256, count); } else { - /* Packet is in one chunk -- we can copy + cksum. */ - eth_io_copy_and_sum(skb, start, count, 0); + memcpy_fromio(skb->data, start, count); } } @@ -378,8 +369,7 @@ MODULE_PARM_DESC(mem, "Memory base address(es)"); MODULE_DESCRIPTION("Ansel AC3200 EISA ethernet driver"); MODULE_LICENSE("GPL"); -int -init_module(void) +int __init init_module(void) { struct net_device *dev; int this_dev, found = 0; @@ -406,7 +396,15 @@ init_module(void) return -ENXIO; } -void +static void cleanup_card(struct net_device *dev) +{ + /* Someday free_irq may be in ac_close_card() */ + free_irq(dev->irq, dev); + release_region(dev->base_addr, AC_IO_EXTENT); + iounmap(ei_status.mem); +} + +void __exit cleanup_module(void) { int this_dev;