aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/smc91c92_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia/smc91c92_cs.c')
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index c9868e9dac4c..f18eca9831e8 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -295,7 +295,7 @@ static int s9k_config(struct net_device *dev, struct ifmap *map);
295static void smc_set_xcvr(struct net_device *dev, int if_port); 295static void smc_set_xcvr(struct net_device *dev, int if_port);
296static void smc_reset(struct net_device *dev); 296static void smc_reset(struct net_device *dev);
297static void media_check(u_long arg); 297static void media_check(u_long arg);
298static void mdio_sync(kio_addr_t addr); 298static void mdio_sync(unsigned int addr);
299static int mdio_read(struct net_device *dev, int phy_id, int loc); 299static int mdio_read(struct net_device *dev, int phy_id, int loc);
300static void mdio_write(struct net_device *dev, int phy_id, int loc, int value); 300static void mdio_write(struct net_device *dev, int phy_id, int loc, int value);
301static int smc_link_ok(struct net_device *dev); 301static int smc_link_ok(struct net_device *dev);
@@ -601,8 +601,8 @@ static void mot_config(struct pcmcia_device *link)
601{ 601{
602 struct net_device *dev = link->priv; 602 struct net_device *dev = link->priv;
603 struct smc_private *smc = netdev_priv(dev); 603 struct smc_private *smc = netdev_priv(dev);
604 kio_addr_t ioaddr = dev->base_addr; 604 unsigned int ioaddr = dev->base_addr;
605 kio_addr_t iouart = link->io.BasePort2; 605 unsigned int iouart = link->io.BasePort2;
606 606
607 /* Set UART base address and force map with COR bit 1 */ 607 /* Set UART base address and force map with COR bit 1 */
608 writeb(iouart & 0xff, smc->base + MOT_UART + CISREG_IOBASE_0); 608 writeb(iouart & 0xff, smc->base + MOT_UART + CISREG_IOBASE_0);
@@ -621,7 +621,7 @@ static void mot_config(struct pcmcia_device *link)
621static int mot_setup(struct pcmcia_device *link) 621static int mot_setup(struct pcmcia_device *link)
622{ 622{
623 struct net_device *dev = link->priv; 623 struct net_device *dev = link->priv;
624 kio_addr_t ioaddr = dev->base_addr; 624 unsigned int ioaddr = dev->base_addr;
625 int i, wait, loop; 625 int i, wait, loop;
626 u_int addr; 626 u_int addr;
627 627
@@ -754,7 +754,7 @@ free_cfg_mem:
754static int osi_config(struct pcmcia_device *link) 754static int osi_config(struct pcmcia_device *link)
755{ 755{
756 struct net_device *dev = link->priv; 756 struct net_device *dev = link->priv;
757 static const kio_addr_t com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; 757 static const unsigned int com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
758 int i, j; 758 int i, j;
759 759
760 link->conf.Attributes |= CONF_ENABLE_SPKR; 760 link->conf.Attributes |= CONF_ENABLE_SPKR;
@@ -900,7 +900,7 @@ static int smc91c92_resume(struct pcmcia_device *link)
900static int check_sig(struct pcmcia_device *link) 900static int check_sig(struct pcmcia_device *link)
901{ 901{
902 struct net_device *dev = link->priv; 902 struct net_device *dev = link->priv;
903 kio_addr_t ioaddr = dev->base_addr; 903 unsigned int ioaddr = dev->base_addr;
904 int width; 904 int width;
905 u_short s; 905 u_short s;
906 906
@@ -960,7 +960,7 @@ static int smc91c92_config(struct pcmcia_device *link)
960 struct smc_private *smc = netdev_priv(dev); 960 struct smc_private *smc = netdev_priv(dev);
961 char *name; 961 char *name;
962 int i, j, rev; 962 int i, j, rev;
963 kio_addr_t ioaddr; 963 unsigned int ioaddr;
964 u_long mir; 964 u_long mir;
965 DECLARE_MAC_BUF(mac); 965 DECLARE_MAC_BUF(mac);
966 966
@@ -1136,7 +1136,7 @@ static void smc91c92_release(struct pcmcia_device *link)
1136#define MDIO_DATA_WRITE1 (MDIO_DIR_WRITE | MDIO_DATA_OUT) 1136#define MDIO_DATA_WRITE1 (MDIO_DIR_WRITE | MDIO_DATA_OUT)
1137#define MDIO_DATA_READ 0x02 1137#define MDIO_DATA_READ 0x02
1138 1138
1139static void mdio_sync(kio_addr_t addr) 1139static void mdio_sync(unsigned int addr)
1140{ 1140{
1141 int bits; 1141 int bits;
1142 for (bits = 0; bits < 32; bits++) { 1142 for (bits = 0; bits < 32; bits++) {
@@ -1147,7 +1147,7 @@ static void mdio_sync(kio_addr_t addr)
1147 1147
1148static int mdio_read(struct net_device *dev, int phy_id, int loc) 1148static int mdio_read(struct net_device *dev, int phy_id, int loc)
1149{ 1149{
1150 kio_addr_t addr = dev->base_addr + MGMT; 1150 unsigned int addr = dev->base_addr + MGMT;
1151 u_int cmd = (0x06<<10)|(phy_id<<5)|loc; 1151 u_int cmd = (0x06<<10)|(phy_id<<5)|loc;
1152 int i, retval = 0; 1152 int i, retval = 0;
1153 1153
@@ -1167,7 +1167,7 @@ static int mdio_read(struct net_device *dev, int phy_id, int loc)
1167 1167
1168static void mdio_write(struct net_device *dev, int phy_id, int loc, int value) 1168static void mdio_write(struct net_device *dev, int phy_id, int loc, int value)
1169{ 1169{
1170 kio_addr_t addr = dev->base_addr + MGMT; 1170 unsigned int addr = dev->base_addr + MGMT;
1171 u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value; 1171 u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value;
1172 int i; 1172 int i;
1173 1173
@@ -1193,7 +1193,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int loc, int value)
1193#ifdef PCMCIA_DEBUG 1193#ifdef PCMCIA_DEBUG
1194static void smc_dump(struct net_device *dev) 1194static void smc_dump(struct net_device *dev)
1195{ 1195{
1196 kio_addr_t ioaddr = dev->base_addr; 1196 unsigned int ioaddr = dev->base_addr;
1197 u_short i, w, save; 1197 u_short i, w, save;
1198 save = inw(ioaddr + BANK_SELECT); 1198 save = inw(ioaddr + BANK_SELECT);
1199 for (w = 0; w < 4; w++) { 1199 for (w = 0; w < 4; w++) {
@@ -1248,7 +1248,7 @@ static int smc_close(struct net_device *dev)
1248{ 1248{
1249 struct smc_private *smc = netdev_priv(dev); 1249 struct smc_private *smc = netdev_priv(dev);
1250 struct pcmcia_device *link = smc->p_dev; 1250 struct pcmcia_device *link = smc->p_dev;
1251 kio_addr_t ioaddr = dev->base_addr; 1251 unsigned int ioaddr = dev->base_addr;
1252 1252
1253 DEBUG(0, "%s: smc_close(), status %4.4x.\n", 1253 DEBUG(0, "%s: smc_close(), status %4.4x.\n",
1254 dev->name, inw(ioaddr + BANK_SELECT)); 1254 dev->name, inw(ioaddr + BANK_SELECT));
@@ -1285,7 +1285,7 @@ static void smc_hardware_send_packet(struct net_device * dev)
1285{ 1285{
1286 struct smc_private *smc = netdev_priv(dev); 1286 struct smc_private *smc = netdev_priv(dev);
1287 struct sk_buff *skb = smc->saved_skb; 1287 struct sk_buff *skb = smc->saved_skb;
1288 kio_addr_t ioaddr = dev->base_addr; 1288 unsigned int ioaddr = dev->base_addr;
1289 u_char packet_no; 1289 u_char packet_no;
1290 1290
1291 if (!skb) { 1291 if (!skb) {
@@ -1349,7 +1349,7 @@ static void smc_hardware_send_packet(struct net_device * dev)
1349static void smc_tx_timeout(struct net_device *dev) 1349static void smc_tx_timeout(struct net_device *dev)
1350{ 1350{
1351 struct smc_private *smc = netdev_priv(dev); 1351 struct smc_private *smc = netdev_priv(dev);
1352 kio_addr_t ioaddr = dev->base_addr; 1352 unsigned int ioaddr = dev->base_addr;
1353 1353
1354 printk(KERN_NOTICE "%s: SMC91c92 transmit timed out, " 1354 printk(KERN_NOTICE "%s: SMC91c92 transmit timed out, "
1355 "Tx_status %2.2x status %4.4x.\n", 1355 "Tx_status %2.2x status %4.4x.\n",
@@ -1364,7 +1364,7 @@ static void smc_tx_timeout(struct net_device *dev)
1364static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev) 1364static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev)
1365{ 1365{
1366 struct smc_private *smc = netdev_priv(dev); 1366 struct smc_private *smc = netdev_priv(dev);
1367 kio_addr_t ioaddr = dev->base_addr; 1367 unsigned int ioaddr = dev->base_addr;
1368 u_short num_pages; 1368 u_short num_pages;
1369 short time_out, ir; 1369 short time_out, ir;
1370 unsigned long flags; 1370 unsigned long flags;
@@ -1434,7 +1434,7 @@ static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev)
1434static void smc_tx_err(struct net_device * dev) 1434static void smc_tx_err(struct net_device * dev)
1435{ 1435{
1436 struct smc_private *smc = netdev_priv(dev); 1436 struct smc_private *smc = netdev_priv(dev);
1437 kio_addr_t ioaddr = dev->base_addr; 1437 unsigned int ioaddr = dev->base_addr;
1438 int saved_packet = inw(ioaddr + PNR_ARR) & 0xff; 1438 int saved_packet = inw(ioaddr + PNR_ARR) & 0xff;
1439 int packet_no = inw(ioaddr + FIFO_PORTS) & 0x7f; 1439 int packet_no = inw(ioaddr + FIFO_PORTS) & 0x7f;
1440 int tx_status; 1440 int tx_status;
@@ -1478,7 +1478,7 @@ static void smc_tx_err(struct net_device * dev)
1478static void smc_eph_irq(struct net_device *dev) 1478static void smc_eph_irq(struct net_device *dev)
1479{ 1479{
1480 struct smc_private *smc = netdev_priv(dev); 1480 struct smc_private *smc = netdev_priv(dev);
1481 kio_addr_t ioaddr = dev->base_addr; 1481 unsigned int ioaddr = dev->base_addr;
1482 u_short card_stats, ephs; 1482 u_short card_stats, ephs;
1483 1483
1484 SMC_SELECT_BANK(0); 1484 SMC_SELECT_BANK(0);
@@ -1513,7 +1513,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id)
1513{ 1513{
1514 struct net_device *dev = dev_id; 1514 struct net_device *dev = dev_id;
1515 struct smc_private *smc = netdev_priv(dev); 1515 struct smc_private *smc = netdev_priv(dev);
1516 kio_addr_t ioaddr; 1516 unsigned int ioaddr;
1517 u_short saved_bank, saved_pointer, mask, status; 1517 u_short saved_bank, saved_pointer, mask, status;
1518 unsigned int handled = 1; 1518 unsigned int handled = 1;
1519 char bogus_cnt = INTR_WORK; /* Work we are willing to do. */ 1519 char bogus_cnt = INTR_WORK; /* Work we are willing to do. */
@@ -1633,7 +1633,7 @@ irq_done:
1633static void smc_rx(struct net_device *dev) 1633static void smc_rx(struct net_device *dev)
1634{ 1634{
1635 struct smc_private *smc = netdev_priv(dev); 1635 struct smc_private *smc = netdev_priv(dev);
1636 kio_addr_t ioaddr = dev->base_addr; 1636 unsigned int ioaddr = dev->base_addr;
1637 int rx_status; 1637 int rx_status;
1638 int packet_length; /* Caution: not frame length, rather words 1638 int packet_length; /* Caution: not frame length, rather words
1639 to transfer from the chip. */ 1639 to transfer from the chip. */
@@ -1738,7 +1738,7 @@ static void fill_multicast_tbl(int count, struct dev_mc_list *addrs,
1738 1738
1739static void set_rx_mode(struct net_device *dev) 1739static void set_rx_mode(struct net_device *dev)
1740{ 1740{
1741 kio_addr_t ioaddr = dev->base_addr; 1741 unsigned int ioaddr = dev->base_addr;
1742 struct smc_private *smc = netdev_priv(dev); 1742 struct smc_private *smc = netdev_priv(dev);
1743 u_int multicast_table[ 2 ] = { 0, }; 1743 u_int multicast_table[ 2 ] = { 0, };
1744 unsigned long flags; 1744 unsigned long flags;
@@ -1804,7 +1804,7 @@ static int s9k_config(struct net_device *dev, struct ifmap *map)
1804static void smc_set_xcvr(struct net_device *dev, int if_port) 1804static void smc_set_xcvr(struct net_device *dev, int if_port)
1805{ 1805{
1806 struct smc_private *smc = netdev_priv(dev); 1806 struct smc_private *smc = netdev_priv(dev);
1807 kio_addr_t ioaddr = dev->base_addr; 1807 unsigned int ioaddr = dev->base_addr;
1808 u_short saved_bank; 1808 u_short saved_bank;
1809 1809
1810 saved_bank = inw(ioaddr + BANK_SELECT); 1810 saved_bank = inw(ioaddr + BANK_SELECT);
@@ -1827,7 +1827,7 @@ static void smc_set_xcvr(struct net_device *dev, int if_port)
1827 1827
1828static void smc_reset(struct net_device *dev) 1828static void smc_reset(struct net_device *dev)
1829{ 1829{
1830 kio_addr_t ioaddr = dev->base_addr; 1830 unsigned int ioaddr = dev->base_addr;
1831 struct smc_private *smc = netdev_priv(dev); 1831 struct smc_private *smc = netdev_priv(dev);
1832 int i; 1832 int i;
1833 1833
@@ -1904,7 +1904,7 @@ static void media_check(u_long arg)
1904{ 1904{
1905 struct net_device *dev = (struct net_device *) arg; 1905 struct net_device *dev = (struct net_device *) arg;
1906 struct smc_private *smc = netdev_priv(dev); 1906 struct smc_private *smc = netdev_priv(dev);
1907 kio_addr_t ioaddr = dev->base_addr; 1907 unsigned int ioaddr = dev->base_addr;
1908 u_short i, media, saved_bank; 1908 u_short i, media, saved_bank;
1909 u_short link; 1909 u_short link;
1910 unsigned long flags; 1910 unsigned long flags;
@@ -2021,7 +2021,7 @@ reschedule:
2021 2021
2022static int smc_link_ok(struct net_device *dev) 2022static int smc_link_ok(struct net_device *dev)
2023{ 2023{
2024 kio_addr_t ioaddr = dev->base_addr; 2024 unsigned int ioaddr = dev->base_addr;
2025 struct smc_private *smc = netdev_priv(dev); 2025 struct smc_private *smc = netdev_priv(dev);
2026 2026
2027 if (smc->cfg & CFG_MII_SELECT) { 2027 if (smc->cfg & CFG_MII_SELECT) {
@@ -2035,7 +2035,7 @@ static int smc_link_ok(struct net_device *dev)
2035static int smc_netdev_get_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd) 2035static int smc_netdev_get_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
2036{ 2036{
2037 u16 tmp; 2037 u16 tmp;
2038 kio_addr_t ioaddr = dev->base_addr; 2038 unsigned int ioaddr = dev->base_addr;
2039 2039
2040 ecmd->supported = (SUPPORTED_TP | SUPPORTED_AUI | 2040 ecmd->supported = (SUPPORTED_TP | SUPPORTED_AUI |
2041 SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full); 2041 SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full);
@@ -2057,7 +2057,7 @@ static int smc_netdev_get_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
2057static int smc_netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd) 2057static int smc_netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
2058{ 2058{
2059 u16 tmp; 2059 u16 tmp;
2060 kio_addr_t ioaddr = dev->base_addr; 2060 unsigned int ioaddr = dev->base_addr;
2061 2061
2062 if (ecmd->speed != SPEED_10) 2062 if (ecmd->speed != SPEED_10)
2063 return -EINVAL; 2063 return -EINVAL;
@@ -2100,7 +2100,7 @@ static void smc_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info
2100static int smc_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) 2100static int smc_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
2101{ 2101{
2102 struct smc_private *smc = netdev_priv(dev); 2102 struct smc_private *smc = netdev_priv(dev);
2103 kio_addr_t ioaddr = dev->base_addr; 2103 unsigned int ioaddr = dev->base_addr;
2104 u16 saved_bank = inw(ioaddr + BANK_SELECT); 2104 u16 saved_bank = inw(ioaddr + BANK_SELECT);
2105 int ret; 2105 int ret;
2106 2106
@@ -2118,7 +2118,7 @@ static int smc_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
2118static int smc_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) 2118static int smc_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
2119{ 2119{
2120 struct smc_private *smc = netdev_priv(dev); 2120 struct smc_private *smc = netdev_priv(dev);
2121 kio_addr_t ioaddr = dev->base_addr; 2121 unsigned int ioaddr = dev->base_addr;
2122 u16 saved_bank = inw(ioaddr + BANK_SELECT); 2122 u16 saved_bank = inw(ioaddr + BANK_SELECT);
2123 int ret; 2123 int ret;
2124 2124
@@ -2136,7 +2136,7 @@ static int smc_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
2136static u32 smc_get_link(struct net_device *dev) 2136static u32 smc_get_link(struct net_device *dev)
2137{ 2137{
2138 struct smc_private *smc = netdev_priv(dev); 2138 struct smc_private *smc = netdev_priv(dev);
2139 kio_addr_t ioaddr = dev->base_addr; 2139 unsigned int ioaddr = dev->base_addr;
2140 u16 saved_bank = inw(ioaddr + BANK_SELECT); 2140 u16 saved_bank = inw(ioaddr + BANK_SELECT);
2141 u32 ret; 2141 u32 ret;
2142 2142
@@ -2164,7 +2164,7 @@ static int smc_nway_reset(struct net_device *dev)
2164{ 2164{
2165 struct smc_private *smc = netdev_priv(dev); 2165 struct smc_private *smc = netdev_priv(dev);
2166 if (smc->cfg & CFG_MII_SELECT) { 2166 if (smc->cfg & CFG_MII_SELECT) {
2167 kio_addr_t ioaddr = dev->base_addr; 2167 unsigned int ioaddr = dev->base_addr;
2168 u16 saved_bank = inw(ioaddr + BANK_SELECT); 2168 u16 saved_bank = inw(ioaddr + BANK_SELECT);
2169 int res; 2169 int res;
2170 2170
@@ -2196,7 +2196,7 @@ static int smc_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
2196 struct mii_ioctl_data *mii = if_mii(rq); 2196 struct mii_ioctl_data *mii = if_mii(rq);
2197 int rc = 0; 2197 int rc = 0;
2198 u16 saved_bank; 2198 u16 saved_bank;
2199 kio_addr_t ioaddr = dev->base_addr; 2199 unsigned int ioaddr = dev->base_addr;
2200 2200
2201 if (!netif_running(dev)) 2201 if (!netif_running(dev))
2202 return -EINVAL; 2202 return -EINVAL;