diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-02 18:08:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-02 18:08:32 -0500 |
commit | 97be852f81c5bb114aab31974af2c061eb86a6de (patch) | |
tree | 701a9c88eef7fc3692150f5dd7edb226a6089173 /drivers/net/arm/etherh.c | |
parent | cdb54fac35812a21943f0e506e8e3b94b469a77c (diff) | |
parent | aae343d493df965ac3abec1bd97cccfe44a7d920 (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (118 commits)
[netdrvr] skge: build fix
[PATCH] NetXen: driver cleanup, removed unnecessary __iomem type casts
[PATCH] PHY: Add support for configuring the PHY connection interface
[PATCH] chelesio: transmit locking (plus bug fix).
[PATCH] chelsio: statistics improvement
[PATCH] chelsio: add MSI support
[PATCH] chelsio: use standard CRC routines
[PATCH] chelsio: cleanup pm3393 code
[PATCH] chelsio: add 1G swcixw aupport
[PATCH] chelsio: add support for other 10G boards
[PATCH] chelsio: remove unused mutex
[PATCH] chelsio: use kzalloc
[PATCH] chelsio: whitespace fixes
[PATCH] amd8111e use standard CRC lib
[PATCH] sky2: msi enhancements.
[PATCH] sky2: kfree_skb_any needed
[PATCH] sky2: fixes for Yukon EC_U chip revisions
[PATCH] sky2: add Dlink 560SX id
[PATCH] sky2: receive error handling fix
[PATCH] skge: don't clear MC state on link down
...
Diffstat (limited to 'drivers/net/arm/etherh.c')
-rw-r--r-- | drivers/net/arm/etherh.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c index 4ae98970b282..f3faa4fe58e7 100644 --- a/drivers/net/arm/etherh.c +++ b/drivers/net/arm/etherh.c | |||
@@ -52,7 +52,12 @@ | |||
52 | #include <asm/ecard.h> | 52 | #include <asm/ecard.h> |
53 | #include <asm/io.h> | 53 | #include <asm/io.h> |
54 | 54 | ||
55 | #include "../8390.h" | 55 | #define EI_SHIFT(x) (ei_local->reg_offset[x]) |
56 | |||
57 | #define ei_inb(_p) readb((void __iomem *)_p) | ||
58 | #define ei_outb(_v,_p) writeb(_v,(void __iomem *)_p) | ||
59 | #define ei_inb_p(_p) readb((void __iomem *)_p) | ||
60 | #define ei_outb_p(_v,_p) writeb(_v,(void __iomem *)_p) | ||
56 | 61 | ||
57 | #define NET_DEBUG 0 | 62 | #define NET_DEBUG 0 |
58 | #define DEBUG_INIT 2 | 63 | #define DEBUG_INIT 2 |
@@ -60,6 +65,11 @@ | |||
60 | #define DRV_NAME "etherh" | 65 | #define DRV_NAME "etherh" |
61 | #define DRV_VERSION "1.11" | 66 | #define DRV_VERSION "1.11" |
62 | 67 | ||
68 | static char version[] __initdata = | ||
69 | "EtherH/EtherM Driver (c) 2002-2004 Russell King " DRV_VERSION "\n"; | ||
70 | |||
71 | #include "../lib8390.c" | ||
72 | |||
63 | static unsigned int net_debug = NET_DEBUG; | 73 | static unsigned int net_debug = NET_DEBUG; |
64 | 74 | ||
65 | struct etherh_priv { | 75 | struct etherh_priv { |
@@ -87,9 +97,6 @@ MODULE_AUTHOR("Russell King"); | |||
87 | MODULE_DESCRIPTION("EtherH/EtherM driver"); | 97 | MODULE_DESCRIPTION("EtherH/EtherM driver"); |
88 | MODULE_LICENSE("GPL"); | 98 | MODULE_LICENSE("GPL"); |
89 | 99 | ||
90 | static char version[] __initdata = | ||
91 | "EtherH/EtherM Driver (c) 2002-2004 Russell King " DRV_VERSION "\n"; | ||
92 | |||
93 | #define ETHERH500_DATAPORT 0x800 /* MEMC */ | 100 | #define ETHERH500_DATAPORT 0x800 /* MEMC */ |
94 | #define ETHERH500_NS8390 0x000 /* MEMC */ | 101 | #define ETHERH500_NS8390 0x000 /* MEMC */ |
95 | #define ETHERH500_CTRLPORT 0x800 /* IOC */ | 102 | #define ETHERH500_CTRLPORT 0x800 /* IOC */ |
@@ -177,7 +184,7 @@ etherh_setif(struct net_device *dev) | |||
177 | switch (etherh_priv(dev)->id) { | 184 | switch (etherh_priv(dev)->id) { |
178 | case PROD_I3_ETHERLAN600: | 185 | case PROD_I3_ETHERLAN600: |
179 | case PROD_I3_ETHERLAN600A: | 186 | case PROD_I3_ETHERLAN600A: |
180 | addr = (void *)dev->base_addr + EN0_RCNTHI; | 187 | addr = (void __iomem *)dev->base_addr + EN0_RCNTHI; |
181 | 188 | ||
182 | switch (dev->if_port) { | 189 | switch (dev->if_port) { |
183 | case IF_PORT_10BASE2: | 190 | case IF_PORT_10BASE2: |
@@ -218,7 +225,7 @@ etherh_getifstat(struct net_device *dev) | |||
218 | switch (etherh_priv(dev)->id) { | 225 | switch (etherh_priv(dev)->id) { |
219 | case PROD_I3_ETHERLAN600: | 226 | case PROD_I3_ETHERLAN600: |
220 | case PROD_I3_ETHERLAN600A: | 227 | case PROD_I3_ETHERLAN600A: |
221 | addr = (void *)dev->base_addr + EN0_RCNTHI; | 228 | addr = (void __iomem *)dev->base_addr + EN0_RCNTHI; |
222 | switch (dev->if_port) { | 229 | switch (dev->if_port) { |
223 | case IF_PORT_10BASE2: | 230 | case IF_PORT_10BASE2: |
224 | stat = 1; | 231 | stat = 1; |
@@ -281,7 +288,7 @@ static void | |||
281 | etherh_reset(struct net_device *dev) | 288 | etherh_reset(struct net_device *dev) |
282 | { | 289 | { |
283 | struct ei_device *ei_local = netdev_priv(dev); | 290 | struct ei_device *ei_local = netdev_priv(dev); |
284 | void __iomem *addr = (void *)dev->base_addr; | 291 | void __iomem *addr = (void __iomem *)dev->base_addr; |
285 | 292 | ||
286 | writeb(E8390_NODMA+E8390_PAGE0+E8390_STOP, addr); | 293 | writeb(E8390_NODMA+E8390_PAGE0+E8390_STOP, addr); |
287 | 294 | ||
@@ -327,7 +334,7 @@ etherh_block_output (struct net_device *dev, int count, const unsigned char *buf | |||
327 | 334 | ||
328 | ei_local->dmaing = 1; | 335 | ei_local->dmaing = 1; |
329 | 336 | ||
330 | addr = (void *)dev->base_addr; | 337 | addr = (void __iomem *)dev->base_addr; |
331 | dma_base = etherh_priv(dev)->dma_base; | 338 | dma_base = etherh_priv(dev)->dma_base; |
332 | 339 | ||
333 | count = (count + 1) & ~1; | 340 | count = (count + 1) & ~1; |
@@ -360,7 +367,7 @@ etherh_block_output (struct net_device *dev, int count, const unsigned char *buf | |||
360 | printk(KERN_ERR "%s: timeout waiting for TX RDC\n", | 367 | printk(KERN_ERR "%s: timeout waiting for TX RDC\n", |
361 | dev->name); | 368 | dev->name); |
362 | etherh_reset (dev); | 369 | etherh_reset (dev); |
363 | NS8390_init (dev, 1); | 370 | __NS8390_init (dev, 1); |
364 | break; | 371 | break; |
365 | } | 372 | } |
366 | 373 | ||
@@ -387,7 +394,7 @@ etherh_block_input (struct net_device *dev, int count, struct sk_buff *skb, int | |||
387 | 394 | ||
388 | ei_local->dmaing = 1; | 395 | ei_local->dmaing = 1; |
389 | 396 | ||
390 | addr = (void *)dev->base_addr; | 397 | addr = (void __iomem *)dev->base_addr; |
391 | dma_base = etherh_priv(dev)->dma_base; | 398 | dma_base = etherh_priv(dev)->dma_base; |
392 | 399 | ||
393 | buf = skb->data; | 400 | buf = skb->data; |
@@ -427,7 +434,7 @@ etherh_get_header (struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_p | |||
427 | 434 | ||
428 | ei_local->dmaing = 1; | 435 | ei_local->dmaing = 1; |
429 | 436 | ||
430 | addr = (void *)dev->base_addr; | 437 | addr = (void __iomem *)dev->base_addr; |
431 | dma_base = etherh_priv(dev)->dma_base; | 438 | dma_base = etherh_priv(dev)->dma_base; |
432 | 439 | ||
433 | writeb (E8390_NODMA | E8390_PAGE0 | E8390_START, addr + E8390_CMD); | 440 | writeb (E8390_NODMA | E8390_PAGE0 | E8390_START, addr + E8390_CMD); |
@@ -465,7 +472,7 @@ etherh_open(struct net_device *dev) | |||
465 | return -EINVAL; | 472 | return -EINVAL; |
466 | } | 473 | } |
467 | 474 | ||
468 | if (request_irq(dev->irq, ei_interrupt, 0, dev->name, dev)) | 475 | if (request_irq(dev->irq, __ei_interrupt, 0, dev->name, dev)) |
469 | return -EAGAIN; | 476 | return -EAGAIN; |
470 | 477 | ||
471 | /* | 478 | /* |
@@ -491,7 +498,7 @@ etherh_open(struct net_device *dev) | |||
491 | etherh_setif(dev); | 498 | etherh_setif(dev); |
492 | 499 | ||
493 | etherh_reset(dev); | 500 | etherh_reset(dev); |
494 | ei_open(dev); | 501 | __ei_open(dev); |
495 | 502 | ||
496 | return 0; | 503 | return 0; |
497 | } | 504 | } |
@@ -502,7 +509,7 @@ etherh_open(struct net_device *dev) | |||
502 | static int | 509 | static int |
503 | etherh_close(struct net_device *dev) | 510 | etherh_close(struct net_device *dev) |
504 | { | 511 | { |
505 | ei_close (dev); | 512 | __ei_close (dev); |
506 | free_irq (dev->irq, dev); | 513 | free_irq (dev->irq, dev); |
507 | return 0; | 514 | return 0; |
508 | } | 515 | } |
@@ -650,7 +657,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
650 | if (ret) | 657 | if (ret) |
651 | goto out; | 658 | goto out; |
652 | 659 | ||
653 | dev = __alloc_ei_netdev(sizeof(struct etherh_priv)); | 660 | dev = ____alloc_ei_netdev(sizeof(struct etherh_priv)); |
654 | if (!dev) { | 661 | if (!dev) { |
655 | ret = -ENOMEM; | 662 | ret = -ENOMEM; |
656 | goto release; | 663 | goto release; |
@@ -736,7 +743,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
736 | ei_local->interface_num = 0; | 743 | ei_local->interface_num = 0; |
737 | 744 | ||
738 | etherh_reset(dev); | 745 | etherh_reset(dev); |
739 | NS8390_init(dev, 0); | 746 | __NS8390_init(dev, 0); |
740 | 747 | ||
741 | ret = register_netdev(dev); | 748 | ret = register_netdev(dev); |
742 | if (ret) | 749 | if (ret) |