aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/cs89x0.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
index 29a7c0cf84bc..04fca31f1733 100644
--- a/drivers/net/cs89x0.c
+++ b/drivers/net/cs89x0.c
@@ -491,8 +491,8 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
491 491
492#ifdef CONFIG_SH_HICOSH4 492#ifdef CONFIG_SH_HICOSH4
493 /* truely reset the chip */ 493 /* truely reset the chip */
494 outw(0x0114, ioaddr + ADD_PORT); 494 writeword(ioaddr, ADD_PORT, 0x0114);
495 outw(0x0040, ioaddr + DATA_PORT); 495 writeword(ioaddr, DATA_PORT, 0x0040);
496#endif 496#endif
497 497
498 /* if they give us an odd I/O address, then do ONE write to 498 /* if they give us an odd I/O address, then do ONE write to
@@ -503,24 +503,24 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
503 if (net_debug > 1) 503 if (net_debug > 1)
504 printk(KERN_INFO "%s: odd ioaddr 0x%x\n", dev->name, ioaddr); 504 printk(KERN_INFO "%s: odd ioaddr 0x%x\n", dev->name, ioaddr);
505 if ((ioaddr & 2) != 2) 505 if ((ioaddr & 2) != 2)
506 if ((inw((ioaddr & ~3)+ ADD_PORT) & ADD_MASK) != ADD_SIG) { 506 if ((readword(ioaddr & ~3, ADD_PORT) & ADD_MASK) != ADD_SIG) {
507 printk(KERN_ERR "%s: bad signature 0x%x\n", 507 printk(KERN_ERR "%s: bad signature 0x%x\n",
508 dev->name, inw((ioaddr & ~3)+ ADD_PORT)); 508 dev->name, readword(ioaddr & ~3, ADD_PORT));
509 retval = -ENODEV; 509 retval = -ENODEV;
510 goto out2; 510 goto out2;
511 } 511 }
512 } 512 }
513 printk(KERN_DEBUG "PP_addr at %x: 0x%x\n", 513 printk(KERN_DEBUG "PP_addr at %x[%x]: 0x%x\n",
514 ioaddr + ADD_PORT, inw(ioaddr + ADD_PORT)); 514 ioaddr, ADD_PORT, readword(ioaddr, ADD_PORT));
515 515
516 ioaddr &= ~3; 516 ioaddr &= ~3;
517 outw(PP_ChipID, ioaddr + ADD_PORT); 517 writeword(ioaddr, ADD_PORT, PP_ChipID);
518 518
519 tmp = inw(ioaddr + DATA_PORT); 519 tmp = readword(ioaddr, DATA_PORT);
520 if (tmp != CHIP_EISA_ID_SIG) { 520 if (tmp != CHIP_EISA_ID_SIG) {
521 printk(KERN_DEBUG "%s: incorrect signature at %x: 0x%x!=" 521 printk(KERN_DEBUG "%s: incorrect signature at %x[%x]: 0x%x!="
522 CHIP_EISA_ID_SIG_STR "\n", 522 CHIP_EISA_ID_SIG_STR "\n",
523 dev->name, ioaddr + DATA_PORT, tmp); 523 dev->name, ioaddr, DATA_PORT, tmp);
524 retval = -ENODEV; 524 retval = -ENODEV;
525 goto out2; 525 goto out2;
526 } 526 }
@@ -790,7 +790,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
790 goto out3; 790 goto out3;
791 return 0; 791 return 0;
792out3: 792out3:
793 outw(PP_ChipID, dev->base_addr + ADD_PORT); 793 writeword(dev->base_addr, ADD_PORT, PP_ChipID);
794out2: 794out2:
795 release_region(ioaddr & ~3, NETCARD_IO_EXTENT); 795 release_region(ioaddr & ~3, NETCARD_IO_EXTENT);
796out1: 796out1:
@@ -970,11 +970,11 @@ void __init reset_chip(struct net_device *dev)
970#ifndef CONFIG_ARCH_IXDP2X01 970#ifndef CONFIG_ARCH_IXDP2X01
971 if (lp->chip_type != CS8900) { 971 if (lp->chip_type != CS8900) {
972 /* Hardware problem requires PNP registers to be reconfigured after a reset */ 972 /* Hardware problem requires PNP registers to be reconfigured after a reset */
973 outw(PP_CS8920_ISAINT, ioaddr + ADD_PORT); 973 writeword(ioaddr, ADD_PORT, PP_CS8920_ISAINT);
974 outb(dev->irq, ioaddr + DATA_PORT); 974 outb(dev->irq, ioaddr + DATA_PORT);
975 outb(0, ioaddr + DATA_PORT + 1); 975 outb(0, ioaddr + DATA_PORT + 1);
976 976
977 outw(PP_CS8920_ISAMemB, ioaddr + ADD_PORT); 977 writeword(ioaddr, ADD_PORT, PP_CS8920_ISAMemB);
978 outb((dev->mem_start >> 16) & 0xff, ioaddr + DATA_PORT); 978 outb((dev->mem_start >> 16) & 0xff, ioaddr + DATA_PORT);
979 outb((dev->mem_start >> 8) & 0xff, ioaddr + DATA_PORT + 1); 979 outb((dev->mem_start >> 8) & 0xff, ioaddr + DATA_PORT + 1);
980 } 980 }
@@ -1606,8 +1606,8 @@ net_rx(struct net_device *dev)
1606 int status, length; 1606 int status, length;
1607 1607
1608 int ioaddr = dev->base_addr; 1608 int ioaddr = dev->base_addr;
1609 status = inw(ioaddr + RX_FRAME_PORT); 1609 status = readword(ioaddr, RX_FRAME_PORT);
1610 length = inw(ioaddr + RX_FRAME_PORT); 1610 length = readword(ioaddr, RX_FRAME_PORT);
1611 1611
1612 if ((status & RX_OK) == 0) { 1612 if ((status & RX_OK) == 0) {
1613 count_rx_errors(status, lp); 1613 count_rx_errors(status, lp);
@@ -1628,7 +1628,7 @@ net_rx(struct net_device *dev)
1628 1628
1629 insw(ioaddr + RX_FRAME_PORT, skb_put(skb, length), length >> 1); 1629 insw(ioaddr + RX_FRAME_PORT, skb_put(skb, length), length >> 1);
1630 if (length & 1) 1630 if (length & 1)
1631 skb->data[length-1] = inw(ioaddr + RX_FRAME_PORT); 1631 skb->data[length-1] = readword(ioaddr, RX_FRAME_PORT);
1632 1632
1633 if (net_debug > 3) { 1633 if (net_debug > 3) {
1634 printk( "%s: received %d byte packet of type %x\n", 1634 printk( "%s: received %d byte packet of type %x\n",
@@ -1901,7 +1901,7 @@ void
1901cleanup_module(void) 1901cleanup_module(void)
1902{ 1902{
1903 unregister_netdev(dev_cs89x0); 1903 unregister_netdev(dev_cs89x0);
1904 outw(PP_ChipID, dev_cs89x0->base_addr + ADD_PORT); 1904 writeword(dev_cs89x0->base_addr, ADD_PORT, PP_ChipID);
1905 release_region(dev_cs89x0->base_addr, NETCARD_IO_EXTENT); 1905 release_region(dev_cs89x0->base_addr, NETCARD_IO_EXTENT);
1906 free_netdev(dev_cs89x0); 1906 free_netdev(dev_cs89x0);
1907} 1907}