aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/axnet_cs.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-02-06 11:04:00 -0500
committerSteve French <sfrench@us.ibm.com>2008-02-06 11:04:00 -0500
commitf315ccb3e679f271583f2a4f463ad9b65665b751 (patch)
tree44eb52102587d7b0bb592464cef6ec04bcac8b90 /drivers/net/pcmcia/axnet_cs.c
parentead03e30b050d6dda769e7e9b071c5fa720bf8d2 (diff)
parent551e4fb2465b87de9d4aa1669b27d624435443bb (diff)
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/net/pcmcia/axnet_cs.c')
-rw-r--r--drivers/net/pcmcia/axnet_cs.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 6d342f6c14f6..e8a63e483a2b 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -96,8 +96,8 @@ static irqreturn_t ei_irq_wrapper(int irq, void *dev_id);
96static void ei_watchdog(u_long arg); 96static void ei_watchdog(u_long arg);
97static void axnet_reset_8390(struct net_device *dev); 97static void axnet_reset_8390(struct net_device *dev);
98 98
99static int mdio_read(kio_addr_t addr, int phy_id, int loc); 99static int mdio_read(unsigned int addr, int phy_id, int loc);
100static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value); 100static void mdio_write(unsigned int addr, int phy_id, int loc, int value);
101 101
102static void get_8390_hdr(struct net_device *, 102static void get_8390_hdr(struct net_device *,
103 struct e8390_pkt_hdr *, int); 103 struct e8390_pkt_hdr *, int);
@@ -203,7 +203,7 @@ static void axnet_detach(struct pcmcia_device *link)
203static int get_prom(struct pcmcia_device *link) 203static int get_prom(struct pcmcia_device *link)
204{ 204{
205 struct net_device *dev = link->priv; 205 struct net_device *dev = link->priv;
206 kio_addr_t ioaddr = dev->base_addr; 206 unsigned int ioaddr = dev->base_addr;
207 int i, j; 207 int i, j;
208 208
209 /* This is based on drivers/net/ne.c */ 209 /* This is based on drivers/net/ne.c */
@@ -473,7 +473,7 @@ static int axnet_resume(struct pcmcia_device *link)
473#define MDIO_MASK 0x0f 473#define MDIO_MASK 0x0f
474#define MDIO_ENB_IN 0x02 474#define MDIO_ENB_IN 0x02
475 475
476static void mdio_sync(kio_addr_t addr) 476static void mdio_sync(unsigned int addr)
477{ 477{
478 int bits; 478 int bits;
479 for (bits = 0; bits < 32; bits++) { 479 for (bits = 0; bits < 32; bits++) {
@@ -482,7 +482,7 @@ static void mdio_sync(kio_addr_t addr)
482 } 482 }
483} 483}
484 484
485static int mdio_read(kio_addr_t addr, int phy_id, int loc) 485static int mdio_read(unsigned int addr, int phy_id, int loc)
486{ 486{
487 u_int cmd = (0xf6<<10)|(phy_id<<5)|loc; 487 u_int cmd = (0xf6<<10)|(phy_id<<5)|loc;
488 int i, retval = 0; 488 int i, retval = 0;
@@ -501,7 +501,7 @@ static int mdio_read(kio_addr_t addr, int phy_id, int loc)
501 return (retval>>1) & 0xffff; 501 return (retval>>1) & 0xffff;
502} 502}
503 503
504static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value) 504static void mdio_write(unsigned int addr, int phy_id, int loc, int value)
505{ 505{
506 u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value; 506 u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value;
507 int i; 507 int i;
@@ -575,7 +575,7 @@ static int axnet_close(struct net_device *dev)
575 575
576static void axnet_reset_8390(struct net_device *dev) 576static void axnet_reset_8390(struct net_device *dev)
577{ 577{
578 kio_addr_t nic_base = dev->base_addr; 578 unsigned int nic_base = dev->base_addr;
579 int i; 579 int i;
580 580
581 ei_status.txing = ei_status.dmaing = 0; 581 ei_status.txing = ei_status.dmaing = 0;
@@ -610,8 +610,8 @@ static void ei_watchdog(u_long arg)
610{ 610{
611 struct net_device *dev = (struct net_device *)(arg); 611 struct net_device *dev = (struct net_device *)(arg);
612 axnet_dev_t *info = PRIV(dev); 612 axnet_dev_t *info = PRIV(dev);
613 kio_addr_t nic_base = dev->base_addr; 613 unsigned int nic_base = dev->base_addr;
614 kio_addr_t mii_addr = nic_base + AXNET_MII_EEP; 614 unsigned int mii_addr = nic_base + AXNET_MII_EEP;
615 u_short link; 615 u_short link;
616 616
617 if (!netif_device_present(dev)) goto reschedule; 617 if (!netif_device_present(dev)) goto reschedule;
@@ -681,7 +681,7 @@ static int axnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
681{ 681{
682 axnet_dev_t *info = PRIV(dev); 682 axnet_dev_t *info = PRIV(dev);
683 u16 *data = (u16 *)&rq->ifr_ifru; 683 u16 *data = (u16 *)&rq->ifr_ifru;
684 kio_addr_t mii_addr = dev->base_addr + AXNET_MII_EEP; 684 unsigned int mii_addr = dev->base_addr + AXNET_MII_EEP;
685 switch (cmd) { 685 switch (cmd) {
686 case SIOCGMIIPHY: 686 case SIOCGMIIPHY:
687 data[0] = info->phy_id; 687 data[0] = info->phy_id;
@@ -703,7 +703,7 @@ static void get_8390_hdr(struct net_device *dev,
703 struct e8390_pkt_hdr *hdr, 703 struct e8390_pkt_hdr *hdr,
704 int ring_page) 704 int ring_page)
705{ 705{
706 kio_addr_t nic_base = dev->base_addr; 706 unsigned int nic_base = dev->base_addr;
707 707
708 outb_p(0, nic_base + EN0_RSARLO); /* On page boundary */ 708 outb_p(0, nic_base + EN0_RSARLO); /* On page boundary */
709 outb_p(ring_page, nic_base + EN0_RSARHI); 709 outb_p(ring_page, nic_base + EN0_RSARHI);
@@ -721,7 +721,7 @@ static void get_8390_hdr(struct net_device *dev,
721static void block_input(struct net_device *dev, int count, 721static void block_input(struct net_device *dev, int count,
722 struct sk_buff *skb, int ring_offset) 722 struct sk_buff *skb, int ring_offset)
723{ 723{
724 kio_addr_t nic_base = dev->base_addr; 724 unsigned int nic_base = dev->base_addr;
725 int xfer_count = count; 725 int xfer_count = count;
726 char *buf = skb->data; 726 char *buf = skb->data;
727 727
@@ -744,7 +744,7 @@ static void block_input(struct net_device *dev, int count,
744static void block_output(struct net_device *dev, int count, 744static void block_output(struct net_device *dev, int count,
745 const u_char *buf, const int start_page) 745 const u_char *buf, const int start_page)
746{ 746{
747 kio_addr_t nic_base = dev->base_addr; 747 unsigned int nic_base = dev->base_addr;
748 748
749#ifdef PCMCIA_DEBUG 749#ifdef PCMCIA_DEBUG
750 if (ei_debug > 4) 750 if (ei_debug > 4)
@@ -991,7 +991,7 @@ static int ax_open(struct net_device *dev)
991 * 991 *
992 * Opposite of ax_open(). Only used when "ifconfig <devname> down" is done. 992 * Opposite of ax_open(). Only used when "ifconfig <devname> down" is done.
993 */ 993 */
994int ax_close(struct net_device *dev) 994static int ax_close(struct net_device *dev)
995{ 995{
996 unsigned long flags; 996 unsigned long flags;
997 997
@@ -1014,7 +1014,7 @@ int ax_close(struct net_device *dev)
1014 * completed (or failed) - i.e. never posted a Tx related interrupt. 1014 * completed (or failed) - i.e. never posted a Tx related interrupt.
1015 */ 1015 */
1016 1016
1017void ei_tx_timeout(struct net_device *dev) 1017static void ei_tx_timeout(struct net_device *dev)
1018{ 1018{
1019 long e8390_base = dev->base_addr; 1019 long e8390_base = dev->base_addr;
1020 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 1020 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
@@ -1087,8 +1087,8 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
1087 1087
1088 ei_local->irqlock = 1; 1088 ei_local->irqlock = 1;
1089 1089
1090 send_length = ETH_ZLEN < length ? length : ETH_ZLEN; 1090 send_length = max(length, ETH_ZLEN);
1091 1091
1092 /* 1092 /*
1093 * We have two Tx slots available for use. Find the first free 1093 * We have two Tx slots available for use. Find the first free
1094 * slot, and then perform some sanity checks. With two Tx bufs, 1094 * slot, and then perform some sanity checks. With two Tx bufs,