X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fnet%2Fe2100.c;h=6390f51ea6fbdc7e455ed70c6650b29edc53fc8a;hb=b963dc1df78399a2166c2e6e3eb726a2dc98cf11;hp=f5a4dd7d856440d5ae6b5a41784ee80952dec4b3;hpb=5028770a42e7bc4d15791a44c28f0ad539323807;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/e2100.c b/drivers/net/e2100.c index f5a4dd7d856..6390f51ea6f 100644 --- a/drivers/net/e2100.c +++ b/drivers/net/e2100.c @@ -110,7 +110,7 @@ static void e21_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, static int e21_close(struct net_device *dev); - + /* Probe for the E2100 series ethercards. These cards have an 8390 at the base address and the station address at both offset 0x10 and 0x18. I read the station address from offset 0x18 to avoid the dataport of NE2000 @@ -124,8 +124,6 @@ static int __init do_e2100_probe(struct net_device *dev) int base_addr = dev->base_addr; int irq = dev->irq; - SET_MODULE_OWNER(dev); - if (base_addr > 0x1ff) /* Check a single specified location. */ return e21_probe1(dev, base_addr); else if (base_addr != 0) /* Don't probe at all. */ @@ -140,13 +138,6 @@ static int __init do_e2100_probe(struct net_device *dev) return -ENODEV; } -static void cleanup_card(struct net_device *dev) -{ - /* NB: e21_close() handles free_irq */ - iounmap(ei_status.mem); - release_region(dev->base_addr, E21_IO_EXTENT); -} - #ifndef MODULE struct net_device * __init e2100_probe(int unit) { @@ -362,8 +353,7 @@ e21_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring mem_on(ioaddr, shared_mem, (ring_offset>>8)); - /* Packet is always in one chunk -- we can copy + cksum. */ - eth_io_copy_and_sum(skb, ei_status.mem + (ring_offset & 0xff), count, 0); + memcpy_fromio(skb->data, ei_status.mem + (ring_offset & 0xff), count); mem_off(ioaddr); } @@ -410,7 +400,7 @@ e21_close(struct net_device *dev) return 0; } - + #ifdef MODULE #define MAX_E21_CARDS 4 /* Max number of E21 cards per module */ static struct net_device *dev_e21[MAX_E21_CARDS]; @@ -432,8 +422,8 @@ MODULE_LICENSE("GPL"); /* This is set up so that only a single autoprobe takes place per call. ISA device autoprobes on a running machine are not recommended. */ -int -init_module(void) + +int __init init_module(void) { struct net_device *dev; int this_dev, found = 0; @@ -463,7 +453,14 @@ init_module(void) return -ENXIO; } -void +static void cleanup_card(struct net_device *dev) +{ + /* NB: e21_close() handles free_irq */ + iounmap(ei_status.mem); + release_region(dev->base_addr, E21_IO_EXTENT); +} + +void __exit cleanup_module(void) { int this_dev;