diff options
Diffstat (limited to 'drivers/net/pcmcia/xirc2ps_cs.c')
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index 1f09bea6db5..d041f831a18 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -273,12 +273,12 @@ INT_MODULE_PARM(lockup_hack, 0); /* anti lockup hack */ | |||
273 | static unsigned maxrx_bytes = 22000; | 273 | static unsigned maxrx_bytes = 22000; |
274 | 274 | ||
275 | /* MII management prototypes */ | 275 | /* MII management prototypes */ |
276 | static void mii_idle(kio_addr_t ioaddr); | 276 | static void mii_idle(unsigned int ioaddr); |
277 | static void mii_putbit(kio_addr_t ioaddr, unsigned data); | 277 | static void mii_putbit(unsigned int ioaddr, unsigned data); |
278 | static int mii_getbit(kio_addr_t ioaddr); | 278 | static int mii_getbit(unsigned int ioaddr); |
279 | static void mii_wbits(kio_addr_t ioaddr, unsigned data, int len); | 279 | static void mii_wbits(unsigned int ioaddr, unsigned data, int len); |
280 | static unsigned mii_rd(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg); | 280 | static unsigned mii_rd(unsigned int ioaddr, u_char phyaddr, u_char phyreg); |
281 | static void mii_wr(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg, | 281 | static void mii_wr(unsigned int ioaddr, u_char phyaddr, u_char phyreg, |
282 | unsigned data, int len); | 282 | unsigned data, int len); |
283 | 283 | ||
284 | /* | 284 | /* |
@@ -403,7 +403,7 @@ next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse) | |||
403 | static void | 403 | static void |
404 | PrintRegisters(struct net_device *dev) | 404 | PrintRegisters(struct net_device *dev) |
405 | { | 405 | { |
406 | kio_addr_t ioaddr = dev->base_addr; | 406 | unsigned int ioaddr = dev->base_addr; |
407 | 407 | ||
408 | if (pc_debug > 1) { | 408 | if (pc_debug > 1) { |
409 | int i, page; | 409 | int i, page; |
@@ -439,7 +439,7 @@ PrintRegisters(struct net_device *dev) | |||
439 | * Turn around for read | 439 | * Turn around for read |
440 | */ | 440 | */ |
441 | static void | 441 | static void |
442 | mii_idle(kio_addr_t ioaddr) | 442 | mii_idle(unsigned int ioaddr) |
443 | { | 443 | { |
444 | PutByte(XIRCREG2_GPR2, 0x04|0); /* drive MDCK low */ | 444 | PutByte(XIRCREG2_GPR2, 0x04|0); /* drive MDCK low */ |
445 | udelay(1); | 445 | udelay(1); |
@@ -451,7 +451,7 @@ mii_idle(kio_addr_t ioaddr) | |||
451 | * Write a bit to MDI/O | 451 | * Write a bit to MDI/O |
452 | */ | 452 | */ |
453 | static void | 453 | static void |
454 | mii_putbit(kio_addr_t ioaddr, unsigned data) | 454 | mii_putbit(unsigned int ioaddr, unsigned data) |
455 | { | 455 | { |
456 | #if 1 | 456 | #if 1 |
457 | if (data) { | 457 | if (data) { |
@@ -484,7 +484,7 @@ mii_putbit(kio_addr_t ioaddr, unsigned data) | |||
484 | * Get a bit from MDI/O | 484 | * Get a bit from MDI/O |
485 | */ | 485 | */ |
486 | static int | 486 | static int |
487 | mii_getbit(kio_addr_t ioaddr) | 487 | mii_getbit(unsigned int ioaddr) |
488 | { | 488 | { |
489 | unsigned d; | 489 | unsigned d; |
490 | 490 | ||
@@ -497,7 +497,7 @@ mii_getbit(kio_addr_t ioaddr) | |||
497 | } | 497 | } |
498 | 498 | ||
499 | static void | 499 | static void |
500 | mii_wbits(kio_addr_t ioaddr, unsigned data, int len) | 500 | mii_wbits(unsigned int ioaddr, unsigned data, int len) |
501 | { | 501 | { |
502 | unsigned m = 1 << (len-1); | 502 | unsigned m = 1 << (len-1); |
503 | for (; m; m >>= 1) | 503 | for (; m; m >>= 1) |
@@ -505,7 +505,7 @@ mii_wbits(kio_addr_t ioaddr, unsigned data, int len) | |||
505 | } | 505 | } |
506 | 506 | ||
507 | static unsigned | 507 | static unsigned |
508 | mii_rd(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg) | 508 | mii_rd(unsigned int ioaddr, u_char phyaddr, u_char phyreg) |
509 | { | 509 | { |
510 | int i; | 510 | int i; |
511 | unsigned data=0, m; | 511 | unsigned data=0, m; |
@@ -527,7 +527,8 @@ mii_rd(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg) | |||
527 | } | 527 | } |
528 | 528 | ||
529 | static void | 529 | static void |
530 | mii_wr(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg, unsigned data, int len) | 530 | mii_wr(unsigned int ioaddr, u_char phyaddr, u_char phyreg, unsigned data, |
531 | int len) | ||
531 | { | 532 | { |
532 | int i; | 533 | int i; |
533 | 534 | ||
@@ -726,7 +727,7 @@ xirc2ps_config(struct pcmcia_device * link) | |||
726 | local_info_t *local = netdev_priv(dev); | 727 | local_info_t *local = netdev_priv(dev); |
727 | tuple_t tuple; | 728 | tuple_t tuple; |
728 | cisparse_t parse; | 729 | cisparse_t parse; |
729 | kio_addr_t ioaddr; | 730 | unsigned int ioaddr; |
730 | int err, i; | 731 | int err, i; |
731 | u_char buf[64]; | 732 | u_char buf[64]; |
732 | cistpl_lan_node_id_t *node_id = (cistpl_lan_node_id_t*)parse.funce.data; | 733 | cistpl_lan_node_id_t *node_id = (cistpl_lan_node_id_t*)parse.funce.data; |
@@ -1104,7 +1105,7 @@ xirc2ps_interrupt(int irq, void *dev_id) | |||
1104 | { | 1105 | { |
1105 | struct net_device *dev = (struct net_device *)dev_id; | 1106 | struct net_device *dev = (struct net_device *)dev_id; |
1106 | local_info_t *lp = netdev_priv(dev); | 1107 | local_info_t *lp = netdev_priv(dev); |
1107 | kio_addr_t ioaddr; | 1108 | unsigned int ioaddr; |
1108 | u_char saved_page; | 1109 | u_char saved_page; |
1109 | unsigned bytes_rcvd; | 1110 | unsigned bytes_rcvd; |
1110 | unsigned int_status, eth_status, rx_status, tx_status; | 1111 | unsigned int_status, eth_status, rx_status, tx_status; |
@@ -1209,7 +1210,7 @@ xirc2ps_interrupt(int irq, void *dev_id) | |||
1209 | unsigned i; | 1210 | unsigned i; |
1210 | u_long *p = skb_put(skb, pktlen); | 1211 | u_long *p = skb_put(skb, pktlen); |
1211 | register u_long a; | 1212 | register u_long a; |
1212 | kio_addr_t edpreg = ioaddr+XIRCREG_EDP-2; | 1213 | unsigned int edpreg = ioaddr+XIRCREG_EDP-2; |
1213 | for (i=0; i < len ; i += 4, p++) { | 1214 | for (i=0; i < len ; i += 4, p++) { |
1214 | a = inl(edpreg); | 1215 | a = inl(edpreg); |
1215 | __asm__("rorl $16,%0\n\t" | 1216 | __asm__("rorl $16,%0\n\t" |
@@ -1346,7 +1347,7 @@ static int | |||
1346 | do_start_xmit(struct sk_buff *skb, struct net_device *dev) | 1347 | do_start_xmit(struct sk_buff *skb, struct net_device *dev) |
1347 | { | 1348 | { |
1348 | local_info_t *lp = netdev_priv(dev); | 1349 | local_info_t *lp = netdev_priv(dev); |
1349 | kio_addr_t ioaddr = dev->base_addr; | 1350 | unsigned int ioaddr = dev->base_addr; |
1350 | int okay; | 1351 | int okay; |
1351 | unsigned freespace; | 1352 | unsigned freespace; |
1352 | unsigned pktlen = skb->len; | 1353 | unsigned pktlen = skb->len; |
@@ -1415,7 +1416,7 @@ do_get_stats(struct net_device *dev) | |||
1415 | static void | 1416 | static void |
1416 | set_addresses(struct net_device *dev) | 1417 | set_addresses(struct net_device *dev) |
1417 | { | 1418 | { |
1418 | kio_addr_t ioaddr = dev->base_addr; | 1419 | unsigned int ioaddr = dev->base_addr; |
1419 | local_info_t *lp = netdev_priv(dev); | 1420 | local_info_t *lp = netdev_priv(dev); |
1420 | struct dev_mc_list *dmi = dev->mc_list; | 1421 | struct dev_mc_list *dmi = dev->mc_list; |
1421 | unsigned char *addr; | 1422 | unsigned char *addr; |
@@ -1459,7 +1460,7 @@ set_addresses(struct net_device *dev) | |||
1459 | static void | 1460 | static void |
1460 | set_multicast_list(struct net_device *dev) | 1461 | set_multicast_list(struct net_device *dev) |
1461 | { | 1462 | { |
1462 | kio_addr_t ioaddr = dev->base_addr; | 1463 | unsigned int ioaddr = dev->base_addr; |
1463 | 1464 | ||
1464 | SelectPage(0x42); | 1465 | SelectPage(0x42); |
1465 | if (dev->flags & IFF_PROMISC) { /* snoop */ | 1466 | if (dev->flags & IFF_PROMISC) { /* snoop */ |
@@ -1543,7 +1544,7 @@ static int | |||
1543 | do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | 1544 | do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) |
1544 | { | 1545 | { |
1545 | local_info_t *local = netdev_priv(dev); | 1546 | local_info_t *local = netdev_priv(dev); |
1546 | kio_addr_t ioaddr = dev->base_addr; | 1547 | unsigned int ioaddr = dev->base_addr; |
1547 | u16 *data = (u16 *)&rq->ifr_ifru; | 1548 | u16 *data = (u16 *)&rq->ifr_ifru; |
1548 | 1549 | ||
1549 | DEBUG(1, "%s: ioctl(%-.6s, %#04x) %04x %04x %04x %04x\n", | 1550 | DEBUG(1, "%s: ioctl(%-.6s, %#04x) %04x %04x %04x %04x\n", |
@@ -1575,7 +1576,7 @@ static void | |||
1575 | hardreset(struct net_device *dev) | 1576 | hardreset(struct net_device *dev) |
1576 | { | 1577 | { |
1577 | local_info_t *local = netdev_priv(dev); | 1578 | local_info_t *local = netdev_priv(dev); |
1578 | kio_addr_t ioaddr = dev->base_addr; | 1579 | unsigned int ioaddr = dev->base_addr; |
1579 | 1580 | ||
1580 | SelectPage(4); | 1581 | SelectPage(4); |
1581 | udelay(1); | 1582 | udelay(1); |
@@ -1592,7 +1593,7 @@ static void | |||
1592 | do_reset(struct net_device *dev, int full) | 1593 | do_reset(struct net_device *dev, int full) |
1593 | { | 1594 | { |
1594 | local_info_t *local = netdev_priv(dev); | 1595 | local_info_t *local = netdev_priv(dev); |
1595 | kio_addr_t ioaddr = dev->base_addr; | 1596 | unsigned int ioaddr = dev->base_addr; |
1596 | unsigned value; | 1597 | unsigned value; |
1597 | 1598 | ||
1598 | DEBUG(0, "%s: do_reset(%p,%d)\n", dev? dev->name:"eth?", dev, full); | 1599 | DEBUG(0, "%s: do_reset(%p,%d)\n", dev? dev->name:"eth?", dev, full); |
@@ -1753,7 +1754,7 @@ static int | |||
1753 | init_mii(struct net_device *dev) | 1754 | init_mii(struct net_device *dev) |
1754 | { | 1755 | { |
1755 | local_info_t *local = netdev_priv(dev); | 1756 | local_info_t *local = netdev_priv(dev); |
1756 | kio_addr_t ioaddr = dev->base_addr; | 1757 | unsigned int ioaddr = dev->base_addr; |
1757 | unsigned control, status, linkpartner; | 1758 | unsigned control, status, linkpartner; |
1758 | int i; | 1759 | int i; |
1759 | 1760 | ||
@@ -1826,7 +1827,7 @@ static void | |||
1826 | do_powerdown(struct net_device *dev) | 1827 | do_powerdown(struct net_device *dev) |
1827 | { | 1828 | { |
1828 | 1829 | ||
1829 | kio_addr_t ioaddr = dev->base_addr; | 1830 | unsigned int ioaddr = dev->base_addr; |
1830 | 1831 | ||
1831 | DEBUG(0, "do_powerdown(%p)\n", dev); | 1832 | DEBUG(0, "do_powerdown(%p)\n", dev); |
1832 | 1833 | ||
@@ -1838,7 +1839,7 @@ do_powerdown(struct net_device *dev) | |||
1838 | static int | 1839 | static int |
1839 | do_stop(struct net_device *dev) | 1840 | do_stop(struct net_device *dev) |
1840 | { | 1841 | { |
1841 | kio_addr_t ioaddr = dev->base_addr; | 1842 | unsigned int ioaddr = dev->base_addr; |
1842 | local_info_t *lp = netdev_priv(dev); | 1843 | local_info_t *lp = netdev_priv(dev); |
1843 | struct pcmcia_device *link = lp->p_dev; | 1844 | struct pcmcia_device *link = lp->p_dev; |
1844 | 1845 | ||