From: Dominik Brodowski From: Randy Dunlap PCMCIA: convert internal I/O port addresses to unsigned long (kio_addr_t). Dominik pointed out that some ioaddr_t data are exposed to userspace, so don't touch those structures. Linus said: But the right thing is definitely to make an IO port pointer be "unsigned int" or even "unsigned long". URL: http://lkml.org/lkml/2005/1/11/168 Signed-off-by: Randy Dunlap Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton --- 25-akpm/drivers/bluetooth/bt3c_cs.c | 2 25-akpm/drivers/bluetooth/btuart_cs.c | 2 25-akpm/drivers/net/pcmcia/3c574_cs.c | 50 ++++++++++++------------ 25-akpm/drivers/net/pcmcia/3c589_cs.c | 31 +++++++-------- 25-akpm/drivers/net/pcmcia/axnet_cs.c | 26 ++++++------ 25-akpm/drivers/net/pcmcia/fmvj18x_cs.c | 22 +++++----- 25-akpm/drivers/net/pcmcia/nmclan_cs.c | 24 +++++------ 25-akpm/drivers/net/pcmcia/pcnet_cs.c | 38 +++++++++--------- 25-akpm/drivers/net/pcmcia/smc91c92_cs.c | 62 +++++++++++++++--------------- 25-akpm/drivers/net/pcmcia/xirc2ps_cs.c | 50 ++++++++++++------------ 25-akpm/drivers/net/wireless/netwave_cs.c | 24 +++++------ 25-akpm/drivers/net/wireless/wavelan_cs.c | 56 +++++++++++++-------------- 25-akpm/drivers/pcmcia/au1000_generic.c | 4 - 25-akpm/drivers/pcmcia/cs.c | 6 +- 25-akpm/drivers/pcmcia/hd64465_ss.c | 2 25-akpm/drivers/pcmcia/i82092.c | 2 25-akpm/drivers/pcmcia/i82365.c | 28 ++++++------- 25-akpm/drivers/pcmcia/m32r_cfc.c | 10 ++-- 25-akpm/drivers/pcmcia/m32r_pcc.c | 8 +-- 25-akpm/drivers/pcmcia/rsrc_nonstatic.c | 14 +++--- 25-akpm/drivers/pcmcia/tcic.c | 16 +++---- 25-akpm/drivers/serial/serial_cs.c | 6 +- 25-akpm/include/pcmcia/cs_types.h | 2 25-akpm/include/pcmcia/ss.h | 8 +-- 24 files changed, 250 insertions(+), 243 deletions(-) diff -puN drivers/bluetooth/bt3c_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/bluetooth/bt3c_cs.c --- 25/drivers/bluetooth/bt3c_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/bluetooth/bt3c_cs.c Wed Jan 19 15:48:03 2005 @@ -771,7 +771,7 @@ static int next_tuple(client_handle_t ha static void bt3c_config(dev_link_t *link) { - static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; + static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; client_handle_t handle = link->handle; bt3c_info_t *info = link->priv; tuple_t tuple; diff -puN drivers/bluetooth/btuart_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/bluetooth/btuart_cs.c --- 25/drivers/bluetooth/btuart_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/bluetooth/btuart_cs.c Wed Jan 19 15:48:03 2005 @@ -690,7 +690,7 @@ static int next_tuple(client_handle_t ha static void btuart_config(dev_link_t *link) { - static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; + static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; client_handle_t handle = link->handle; btuart_info_t *info = link->priv; tuple_t tuple; diff -puN drivers/net/pcmcia/3c574_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/net/pcmcia/3c574_cs.c --- 25/drivers/net/pcmcia/3c574_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/net/pcmcia/3c574_cs.c Wed Jan 19 15:48:03 2005 @@ -231,10 +231,10 @@ static void tc574_release(dev_link_t *li static int tc574_event(event_t event, int priority, event_callback_args_t *args); -static void mdio_sync(ioaddr_t ioaddr, int bits); -static int mdio_read(ioaddr_t ioaddr, int phy_id, int location); -static void mdio_write(ioaddr_t ioaddr, int phy_id, int location, int value); -static unsigned short read_eeprom(ioaddr_t ioaddr, int index); +static void mdio_sync(kio_addr_t ioaddr, int bits); +static int mdio_read(kio_addr_t ioaddr, int phy_id, int location); +static void mdio_write(kio_addr_t ioaddr, int phy_id, int location, int value); +static unsigned short read_eeprom(kio_addr_t ioaddr, int index); static void tc574_wait_for_completion(struct net_device *dev, int cmd); static void tc574_reset(struct net_device *dev); @@ -385,7 +385,7 @@ static void tc574_config(dev_link_t *lin cisparse_t parse; unsigned short buf[32]; int last_fn, last_ret, i, j; - ioaddr_t ioaddr; + kio_addr_t ioaddr; u16 *phys_addr; char *cardname; union wn3_config config; @@ -606,7 +606,7 @@ static int tc574_event(event_t event, in static void dump_status(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; EL3WINDOW(1); printk(KERN_INFO " irq status %04x, rx status %04x, tx status " "%02x, tx free %04x\n", inw(ioaddr+EL3_STATUS), @@ -635,7 +635,7 @@ static void tc574_wait_for_completion(st /* Read a word from the EEPROM using the regular EEPROM access register. Assume that we are in register window zero. */ -static unsigned short read_eeprom(ioaddr_t ioaddr, int index) +static unsigned short read_eeprom(kio_addr_t ioaddr, int index) { int timer; outw(EEPROM_Read + index, ioaddr + Wn0EepromCmd); @@ -663,9 +663,9 @@ static unsigned short read_eeprom(ioaddr /* Generate the preamble required for initial synchronization and a few older transceivers. */ -static void mdio_sync(ioaddr_t ioaddr, int bits) +static void mdio_sync(kio_addr_t ioaddr, int bits) { - int mdio_addr = ioaddr + Wn4_PhysicalMgmt; + kio_addr_t mdio_addr = ioaddr + Wn4_PhysicalMgmt; /* Establish sync by sending at least 32 logic ones. */ while (-- bits >= 0) { @@ -674,12 +674,12 @@ static void mdio_sync(ioaddr_t ioaddr, i } } -static int mdio_read(ioaddr_t ioaddr, int phy_id, int location) +static int mdio_read(kio_addr_t ioaddr, int phy_id, int location) { int i; int read_cmd = (0xf6 << 10) | (phy_id << 5) | location; unsigned int retval = 0; - int mdio_addr = ioaddr + Wn4_PhysicalMgmt; + kio_addr_t mdio_addr = ioaddr + Wn4_PhysicalMgmt; if (mii_preamble_required) mdio_sync(ioaddr, 32); @@ -699,10 +699,10 @@ static int mdio_read(ioaddr_t ioaddr, in return (retval>>1) & 0xffff; } -static void mdio_write(ioaddr_t ioaddr, int phy_id, int location, int value) +static void mdio_write(kio_addr_t ioaddr, int phy_id, int location, int value) { int write_cmd = 0x50020000 | (phy_id << 23) | (location << 18) | value; - int mdio_addr = ioaddr + Wn4_PhysicalMgmt; + kio_addr_t mdio_addr = ioaddr + Wn4_PhysicalMgmt; int i; if (mii_preamble_required) @@ -727,7 +727,8 @@ static void mdio_write(ioaddr_t ioaddr, static void tc574_reset(struct net_device *dev) { struct el3_private *lp = netdev_priv(dev); - int i, ioaddr = dev->base_addr; + int i; + kio_addr_t ioaddr = dev->base_addr; unsigned long flags; tc574_wait_for_completion(dev, TotalReset|0x10); @@ -831,7 +832,7 @@ static int el3_open(struct net_device *d static void el3_tx_timeout(struct net_device *dev) { struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; printk(KERN_NOTICE "%s: Transmit timed out!\n", dev->name); dump_status(dev); @@ -846,7 +847,7 @@ static void el3_tx_timeout(struct net_de static void pop_tx_status(struct net_device *dev) { struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int i; /* Clear the Tx status stack. */ @@ -869,7 +870,7 @@ static void pop_tx_status(struct net_dev static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; struct el3_private *lp = netdev_priv(dev); unsigned long flags; @@ -903,7 +904,8 @@ static irqreturn_t el3_interrupt(int irq { struct net_device *dev = (struct net_device *) dev_id; struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr, status; + kio_addr_t ioaddr; + unsigned status; int work_budget = max_interrupt_work; int handled = 0; @@ -996,7 +998,7 @@ static void media_check(unsigned long ar { struct net_device *dev = (struct net_device *) arg; struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; unsigned long flags; unsigned short /* cable, */ media, partner; @@ -1085,7 +1087,7 @@ static struct net_device_stats *el3_get_ static void update_stats(struct net_device *dev) { struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u8 rx, tx, up; DEBUG(2, "%s: updating the statistics.\n", dev->name); @@ -1122,7 +1124,7 @@ static void update_stats(struct net_devi static int el3_rx(struct net_device *dev, int worklimit) { struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; short rx_status; DEBUG(3, "%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n", @@ -1184,7 +1186,7 @@ static struct ethtool_ops netdev_ethtool static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u16 *data = (u16 *)&rq->ifr_ifru; int phy = lp->phys & 0x1f; @@ -1238,7 +1240,7 @@ static int el3_ioctl(struct net_device * static void set_rx_mode(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; if (dev->flags & IFF_PROMISC) outw(SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm, @@ -1251,7 +1253,7 @@ static void set_rx_mode(struct net_devic static int el3_close(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; struct el3_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; diff -puN drivers/net/pcmcia/3c589_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/net/pcmcia/3c589_cs.c --- 25/drivers/net/pcmcia/3c589_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/net/pcmcia/3c589_cs.c Wed Jan 19 15:48:03 2005 @@ -147,7 +147,7 @@ static void tc589_release(dev_link_t *li static int tc589_event(event_t event, int priority, event_callback_args_t *args); -static u16 read_eeprom(ioaddr_t ioaddr, int index); +static u16 read_eeprom(kio_addr_t ioaddr, int index); static void tc589_reset(struct net_device *dev); static void media_check(unsigned long arg); static int el3_config(struct net_device *dev, struct ifmap *map); @@ -299,7 +299,7 @@ static void tc589_config(dev_link_t *lin cisparse_t parse; u16 buf[32], *phys_addr; int last_fn, last_ret, i, j, multi = 0, fifo; - ioaddr_t ioaddr; + kio_addr_t ioaddr; char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; DEBUG(0, "3c589_config(0x%p)\n", link); @@ -500,7 +500,7 @@ static void tc589_wait_for_completion(st Read a word from the EEPROM using the regular EEPROM access register. Assume that we are in register window zero. */ -static u16 read_eeprom(ioaddr_t ioaddr, int index) +static u16 read_eeprom(kio_addr_t ioaddr, int index) { int i; outw(EEPROM_READ + index, ioaddr + 10); @@ -518,7 +518,7 @@ static u16 read_eeprom(ioaddr_t ioaddr, static void tc589_set_xcvr(struct net_device *dev, int if_port) { struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; EL3WINDOW(0); switch (if_port) { @@ -540,7 +540,7 @@ static void tc589_set_xcvr(struct net_de static void dump_status(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; EL3WINDOW(1); printk(KERN_INFO " irq status %04x, rx status %04x, tx status " "%02x tx free %04x\n", inw(ioaddr+EL3_STATUS), @@ -556,7 +556,7 @@ static void dump_status(struct net_devic /* Reset and restore all of the 3c589 registers. */ static void tc589_reset(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int i; EL3WINDOW(0); @@ -664,7 +664,7 @@ static int el3_open(struct net_device *d static void el3_tx_timeout(struct net_device *dev) { struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; printk(KERN_WARNING "%s: Transmit timed out!\n", dev->name); dump_status(dev); @@ -679,7 +679,7 @@ static void el3_tx_timeout(struct net_de static void pop_tx_status(struct net_device *dev) { struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int i; /* Clear the Tx status stack. */ @@ -701,7 +701,7 @@ static void pop_tx_status(struct net_dev static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; struct el3_private *priv = netdev_priv(dev); DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " @@ -734,7 +734,8 @@ static irqreturn_t el3_interrupt(int irq { struct net_device *dev = (struct net_device *) dev_id; struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr, status; + kio_addr_t ioaddr; + __u16 status; int i = 0, handled = 1; if (!netif_device_present(dev)) @@ -819,7 +820,7 @@ static void media_check(unsigned long ar { struct net_device *dev = (struct net_device *)(arg); struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u16 media, errs; unsigned long flags; @@ -921,7 +922,7 @@ static struct net_device_stats *el3_get_ static void update_stats(struct net_device *dev) { struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; DEBUG(2, "%s: updating the statistics.\n", dev->name); /* Turn off statistics updates while reading. */ @@ -948,7 +949,7 @@ static void update_stats(struct net_devi static int el3_rx(struct net_device *dev) { struct el3_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int worklimit = 32; short rx_status; @@ -1003,7 +1004,7 @@ static void set_multicast_list(struct ne { struct el3_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u16 opts = SetRxFilter | RxStation | RxBroadcast; if (!(DEV_OK(link))) return; @@ -1018,7 +1019,7 @@ static int el3_close(struct net_device * { struct el3_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; DEBUG(1, "%s: shutting down ethercard.\n", dev->name); diff -puN drivers/net/pcmcia/axnet_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/net/pcmcia/axnet_cs.c --- 25/drivers/net/pcmcia/axnet_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/net/pcmcia/axnet_cs.c Wed Jan 19 15:48:03 2005 @@ -98,8 +98,8 @@ static irqreturn_t ei_irq_wrapper(int ir static void ei_watchdog(u_long arg); static void axnet_reset_8390(struct net_device *dev); -static int mdio_read(ioaddr_t addr, int phy_id, int loc); -static void mdio_write(ioaddr_t addr, int phy_id, int loc, int value); +static int mdio_read(kio_addr_t addr, int phy_id, int loc); +static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value); static void get_8390_hdr(struct net_device *, struct e8390_pkt_hdr *, int); @@ -243,7 +243,7 @@ static void axnet_detach(dev_link_t *lin static int get_prom(dev_link_t *link) { struct net_device *dev = link->priv; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int i, j; /* This is based on drivers/net/ne.c */ @@ -563,7 +563,7 @@ static int axnet_event(event_t event, in #define MDIO_MASK 0x0f #define MDIO_ENB_IN 0x02 -static void mdio_sync(ioaddr_t addr) +static void mdio_sync(kio_addr_t addr) { int bits; for (bits = 0; bits < 32; bits++) { @@ -572,7 +572,7 @@ static void mdio_sync(ioaddr_t addr) } } -static int mdio_read(ioaddr_t addr, int phy_id, int loc) +static int mdio_read(kio_addr_t addr, int phy_id, int loc) { u_int cmd = (0xf6<<10)|(phy_id<<5)|loc; int i, retval = 0; @@ -591,7 +591,7 @@ static int mdio_read(ioaddr_t addr, int return (retval>>1) & 0xffff; } -static void mdio_write(ioaddr_t addr, int phy_id, int loc, int value) +static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value) { u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value; int i; @@ -662,7 +662,7 @@ static int axnet_close(struct net_device static void axnet_reset_8390(struct net_device *dev) { - ioaddr_t nic_base = dev->base_addr; + kio_addr_t nic_base = dev->base_addr; int i; ei_status.txing = ei_status.dmaing = 0; @@ -697,8 +697,8 @@ static void ei_watchdog(u_long arg) { struct net_device *dev = (struct net_device *)(arg); axnet_dev_t *info = PRIV(dev); - ioaddr_t nic_base = dev->base_addr; - ioaddr_t mii_addr = nic_base + AXNET_MII_EEP; + kio_addr_t nic_base = dev->base_addr; + kio_addr_t mii_addr = nic_base + AXNET_MII_EEP; u_short link; if (!netif_device_present(dev)) goto reschedule; @@ -768,7 +768,7 @@ static int axnet_ioctl(struct net_device { axnet_dev_t *info = PRIV(dev); u16 *data = (u16 *)&rq->ifr_ifru; - ioaddr_t mii_addr = dev->base_addr + AXNET_MII_EEP; + kio_addr_t mii_addr = dev->base_addr + AXNET_MII_EEP; switch (cmd) { case SIOCGMIIPHY: data[0] = info->phy_id; @@ -790,7 +790,7 @@ static void get_8390_hdr(struct net_devi struct e8390_pkt_hdr *hdr, int ring_page) { - ioaddr_t nic_base = dev->base_addr; + kio_addr_t nic_base = dev->base_addr; outb_p(0, nic_base + EN0_RSARLO); /* On page boundary */ outb_p(ring_page, nic_base + EN0_RSARHI); @@ -808,7 +808,7 @@ static void get_8390_hdr(struct net_devi static void block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset) { - ioaddr_t nic_base = dev->base_addr; + kio_addr_t nic_base = dev->base_addr; int xfer_count = count; char *buf = skb->data; @@ -831,7 +831,7 @@ static void block_input(struct net_devic static void block_output(struct net_device *dev, int count, const u_char *buf, const int start_page) { - ioaddr_t nic_base = dev->base_addr; + kio_addr_t nic_base = dev->base_addr; #ifdef PCMCIA_DEBUG if (ei_debug > 4) diff -puN drivers/net/pcmcia/fmvj18x_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/net/pcmcia/fmvj18x_cs.c --- 25/drivers/net/pcmcia/fmvj18x_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/net/pcmcia/fmvj18x_cs.c Wed Jan 19 15:48:03 2005 @@ -343,7 +343,7 @@ do { last_fn = (fn); if ((last_ret = (re static int mfc_try_io_port(dev_link_t *link) { int i, ret; - static ioaddr_t serial_base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; + static kio_addr_t serial_base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; for (i = 0; i < 5; i++) { link->io.BasePort2 = serial_base[i]; @@ -361,7 +361,7 @@ static int mfc_try_io_port(dev_link_t *l static int ungermann_try_io_port(dev_link_t *link) { int ret; - ioaddr_t ioaddr; + kio_addr_t ioaddr; /* Ungermann-Bass Access/CARD accepts 0x300,0x320,0x340,0x360 0x380,0x3c0 only for ioport. @@ -388,7 +388,7 @@ static void fmvj18x_config(dev_link_t *l cisparse_t parse; u_short buf[32]; int i, last_fn, last_ret, ret; - ioaddr_t ioaddr; + kio_addr_t ioaddr; cardtype_t cardtype; char *card_name = "unknown"; u_char *node_id; @@ -668,7 +668,7 @@ static int fmvj18x_setup_mfc(dev_link_t u_char __iomem *base; int i, j; struct net_device *dev = link->priv; - ioaddr_t ioaddr; + kio_addr_t ioaddr; /* Allocate a small memory window */ req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE; @@ -793,7 +793,7 @@ static irqreturn_t fjn_interrupt(int irq { struct net_device *dev = dev_id; local_info_t *lp = netdev_priv(dev); - ioaddr_t ioaddr; + kio_addr_t ioaddr; unsigned short tx_stat, rx_stat; if (lp == NULL) { @@ -852,7 +852,7 @@ static irqreturn_t fjn_interrupt(int irq static void fjn_tx_timeout(struct net_device *dev) { struct local_info_t *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; printk(KERN_NOTICE "%s: transmit timed out with status %04x, %s?\n", dev->name, htons(inw(ioaddr + TX_STATUS)), @@ -882,7 +882,7 @@ static void fjn_tx_timeout(struct net_de static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct local_info_t *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; short length = skb->len; if (length < ETH_ZLEN) @@ -956,7 +956,7 @@ static int fjn_start_xmit(struct sk_buff static void fjn_reset(struct net_device *dev) { struct local_info_t *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int i; DEBUG(4, "fjn_reset(%s) called.\n",dev->name); @@ -1042,7 +1042,7 @@ static void fjn_reset(struct net_device static void fjn_rx(struct net_device *dev) { struct local_info_t *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int boguscount = 10; /* 5 -> 10: by agy 19940922 */ DEBUG(4, "%s: in rx_packet(), rx_status %02x.\n", @@ -1197,7 +1197,7 @@ static int fjn_close(struct net_device * { struct local_info_t *lp = netdev_priv(dev); dev_link_t *link = &lp->link; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; DEBUG(4, "fjn_close('%s').\n", dev->name); @@ -1240,7 +1240,7 @@ static struct net_device_stats *fjn_get_ static void set_rx_mode(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; struct local_info_t *lp = netdev_priv(dev); u_char mc_filter[8]; /* Multicast hash filter */ u_long flags; diff -puN drivers/net/pcmcia/nmclan_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/net/pcmcia/nmclan_cs.c --- 25/drivers/net/pcmcia/nmclan_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/net/pcmcia/nmclan_cs.c Wed Jan 19 15:48:03 2005 @@ -561,7 +561,7 @@ mace_read assuming that during normal operation, the MACE is always in bank 0. ---------------------------------------------------------------------------- */ -static int mace_read(mace_private *lp, ioaddr_t ioaddr, int reg) +static int mace_read(mace_private *lp, kio_addr_t ioaddr, int reg) { int data = 0xFF; unsigned long flags; @@ -588,7 +588,7 @@ mace_write are assuming that during normal operation, the MACE is always in bank 0. ---------------------------------------------------------------------------- */ -static void mace_write(mace_private *lp, ioaddr_t ioaddr, int reg, int data) +static void mace_write(mace_private *lp, kio_addr_t ioaddr, int reg, int data) { unsigned long flags; @@ -610,7 +610,7 @@ static void mace_write(mace_private *lp, mace_init Resets the MACE chip. ---------------------------------------------------------------------------- */ -static int mace_init(mace_private *lp, ioaddr_t ioaddr, char *enet_addr) +static int mace_init(mace_private *lp, kio_addr_t ioaddr, char *enet_addr) { int i; int ct = 0; @@ -702,7 +702,7 @@ static void nmclan_config(dev_link_t *li cisparse_t parse; u_char buf[64]; int i, last_ret, last_fn; - ioaddr_t ioaddr; + kio_addr_t ioaddr; DEBUG(0, "nmclan_config(0x%p)\n", link); @@ -935,7 +935,7 @@ mace_open ---------------------------------------------------------------------------- */ static int mace_open(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; mace_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; @@ -958,7 +958,7 @@ mace_close ---------------------------------------------------------------------------- */ static int mace_close(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; mace_private *lp = netdev_priv(dev); dev_link_t *link = &lp->link; @@ -1031,7 +1031,7 @@ static void mace_tx_timeout(struct net_d static int mace_start_xmit(struct sk_buff *skb, struct net_device *dev) { mace_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; netif_stop_queue(dev); @@ -1092,7 +1092,7 @@ static irqreturn_t mace_interrupt(int ir { struct net_device *dev = (struct net_device *) dev_id; mace_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int status; int IntrCnt = MACE_MAX_IR_ITERATIONS; @@ -1234,7 +1234,7 @@ mace_rx static int mace_rx(struct net_device *dev, unsigned char RxCnt) { mace_private *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; unsigned char rx_framecnt; unsigned short rx_status; @@ -1398,7 +1398,7 @@ update_stats card's SRAM fast enough. If this happens, something is seriously wrong with the hardware. ---------------------------------------------------------------------------- */ -static void update_stats(ioaddr_t ioaddr, struct net_device *dev) +static void update_stats(kio_addr_t ioaddr, struct net_device *dev) { mace_private *lp = netdev_priv(dev); @@ -1544,7 +1544,7 @@ static void restore_multicast_list(struc mace_private *lp = netdev_priv(dev); int num_addrs = lp->multicast_num_addrs; int *ladrf = lp->multicast_ladrf; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int i; DEBUG(2, "%s: restoring Rx mode to %d addresses.\n", @@ -1636,7 +1636,7 @@ static void set_multicast_list(struct ne static void restore_multicast_list(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; mace_private *lp = netdev_priv(dev); DEBUG(2, "%s: restoring Rx mode to %d addresses.\n", dev->name, diff -puN drivers/net/pcmcia/pcnet_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/net/pcmcia/pcnet_cs.c --- 25/drivers/net/pcmcia/pcnet_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/net/pcmcia/pcnet_cs.c Wed Jan 19 15:48:03 2005 @@ -388,7 +388,7 @@ static hw_info_t *get_hwinfo(dev_link_t static hw_info_t *get_prom(dev_link_t *link) { struct net_device *dev = link->priv; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u_char prom[32]; int i, j; @@ -464,7 +464,7 @@ static hw_info_t *get_dl10019(dev_link_t static hw_info_t *get_ax88190(dev_link_t *link) { struct net_device *dev = link->priv; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int i, j; /* Not much of a test, but the alternatives are messy */ @@ -852,7 +852,7 @@ static int pcnet_event(event_t event, in #define MDIO_DATA_READ 0x10 #define MDIO_MASK 0x0f -static void mdio_sync(ioaddr_t addr) +static void mdio_sync(kio_addr_t addr) { int bits, mask = inb(addr) & MDIO_MASK; for (bits = 0; bits < 32; bits++) { @@ -861,7 +861,7 @@ static void mdio_sync(ioaddr_t addr) } } -static int mdio_read(ioaddr_t addr, int phy_id, int loc) +static int mdio_read(kio_addr_t addr, int phy_id, int loc) { u_int cmd = (0x06<<10)|(phy_id<<5)|loc; int i, retval = 0, mask = inb(addr) & MDIO_MASK; @@ -880,7 +880,7 @@ static int mdio_read(ioaddr_t addr, int return (retval>>1) & 0xffff; } -static void mdio_write(ioaddr_t addr, int phy_id, int loc, int value) +static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value) { u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value; int i, mask = inb(addr) & MDIO_MASK; @@ -897,7 +897,7 @@ static void mdio_write(ioaddr_t addr, in } } -static void mdio_reset(ioaddr_t addr, int phy_id) +static void mdio_reset(kio_addr_t addr, int phy_id) { outb_p(0x08, addr); outb_p(0x0c, addr); @@ -923,10 +923,10 @@ static void mdio_reset(ioaddr_t addr, in #define DL19FDUPLX 0x0400 /* DL10019 Full duplex mode */ -static int read_eeprom(ioaddr_t ioaddr, int location) +static int read_eeprom(kio_addr_t ioaddr, int location) { int i, retval = 0; - ioaddr_t ee_addr = ioaddr + DLINK_EEPROM; + kio_addr_t ee_addr = ioaddr + DLINK_EEPROM; int read_cmd = location | (EE_READ_CMD << 8); outb(0, ee_addr); @@ -957,10 +957,10 @@ static int read_eeprom(ioaddr_t ioaddr, In ASIC mode, EE_ADOT is used to output the data to the ASIC. */ -static void write_asic(ioaddr_t ioaddr, int location, short asic_data) +static void write_asic(kio_addr_t ioaddr, int location, short asic_data) { int i; - ioaddr_t ee_addr = ioaddr + DLINK_EEPROM; + kio_addr_t ee_addr = ioaddr + DLINK_EEPROM; short dataval; int read_cmd = location | (EE_READ_CMD << 8); @@ -1002,7 +1002,7 @@ static void write_asic(ioaddr_t ioaddr, static void set_misc_reg(struct net_device *dev) { - ioaddr_t nic_base = dev->base_addr; + kio_addr_t nic_base = dev->base_addr; pcnet_dev_t *info = PRIV(dev); u_char tmp; @@ -1034,7 +1034,7 @@ static void set_misc_reg(struct net_devi static void mii_phy_probe(struct net_device *dev) { pcnet_dev_t *info = PRIV(dev); - ioaddr_t mii_addr = dev->base_addr + DLINK_GPIO; + kio_addr_t mii_addr = dev->base_addr + DLINK_GPIO; int i; u_int tmp, phyid; @@ -1109,7 +1109,7 @@ static int pcnet_close(struct net_device static void pcnet_reset_8390(struct net_device *dev) { - ioaddr_t nic_base = dev->base_addr; + kio_addr_t nic_base = dev->base_addr; int i; ei_status.txing = ei_status.dmaing = 0; @@ -1167,8 +1167,8 @@ static void ei_watchdog(u_long arg) { struct net_device *dev = (struct net_device *)arg; pcnet_dev_t *info = PRIV(dev); - ioaddr_t nic_base = dev->base_addr; - ioaddr_t mii_addr = nic_base + DLINK_GPIO; + kio_addr_t nic_base = dev->base_addr; + kio_addr_t mii_addr = nic_base + DLINK_GPIO; u_short link; if (!netif_device_present(dev)) goto reschedule; @@ -1271,7 +1271,7 @@ static int ei_ioctl(struct net_device *d { pcnet_dev_t *info = PRIV(dev); u16 *data = (u16 *)&rq->ifr_ifru; - ioaddr_t mii_addr = dev->base_addr + DLINK_GPIO; + kio_addr_t mii_addr = dev->base_addr + DLINK_GPIO; switch (cmd) { case SIOCGMIIPHY: data[0] = info->phy_id; @@ -1293,7 +1293,7 @@ static void dma_get_8390_hdr(struct net_ struct e8390_pkt_hdr *hdr, int ring_page) { - ioaddr_t nic_base = dev->base_addr; + kio_addr_t nic_base = dev->base_addr; if (ei_status.dmaing) { printk(KERN_NOTICE "%s: DMAing conflict in dma_block_input." @@ -1324,7 +1324,7 @@ static void dma_get_8390_hdr(struct net_ static void dma_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset) { - ioaddr_t nic_base = dev->base_addr; + kio_addr_t nic_base = dev->base_addr; int xfer_count = count; char *buf = skb->data; @@ -1379,7 +1379,7 @@ static void dma_block_input(struct net_d static void dma_block_output(struct net_device *dev, int count, const u_char *buf, const int start_page) { - ioaddr_t nic_base = dev->base_addr; + kio_addr_t nic_base = dev->base_addr; pcnet_dev_t *info = PRIV(dev); #ifdef PCMCIA_DEBUG int retries = 0; diff -puN drivers/net/pcmcia/smc91c92_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/net/pcmcia/smc91c92_cs.c --- 25/drivers/net/pcmcia/smc91c92_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/net/pcmcia/smc91c92_cs.c Wed Jan 19 15:48:03 2005 @@ -295,7 +295,7 @@ static int s9k_config(struct net_device static void smc_set_xcvr(struct net_device *dev, int if_port); static void smc_reset(struct net_device *dev); static void media_check(u_long arg); -static void mdio_sync(ioaddr_t addr); +static void mdio_sync(kio_addr_t addr); static int mdio_read(struct net_device *dev, int phy_id, int loc); static void mdio_write(struct net_device *dev, int phy_id, int loc, int value); static int smc_link_ok(struct net_device *dev); @@ -611,8 +611,8 @@ static void mot_config(dev_link_t *link) { struct net_device *dev = link->priv; struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; - ioaddr_t iouart = link->io.BasePort2; + kio_addr_t ioaddr = dev->base_addr; + kio_addr_t iouart = link->io.BasePort2; /* Set UART base address and force map with COR bit 1 */ writeb(iouart & 0xff, smc->base + MOT_UART + CISREG_IOBASE_0); @@ -631,7 +631,7 @@ static void mot_config(dev_link_t *link) static int mot_setup(dev_link_t *link) { struct net_device *dev = link->priv; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int i, wait, loop; u_int addr; @@ -739,7 +739,7 @@ static int smc_setup(dev_link_t *link) static int osi_config(dev_link_t *link) { struct net_device *dev = link->priv; - static ioaddr_t com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; + static kio_addr_t com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; int i, j; link->conf.Attributes |= CONF_ENABLE_SPKR; @@ -828,7 +828,7 @@ static int osi_setup(dev_link_t *link, u static int check_sig(dev_link_t *link) { struct net_device *dev = link->priv; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int width; u_short s; @@ -892,7 +892,7 @@ static void smc91c92_config(dev_link_t * u_short buf[32]; char *name; int i, j, rev; - ioaddr_t ioaddr; + kio_addr_t ioaddr; u_long mir; DEBUG(0, "smc91c92_config(0x%p)\n", link); @@ -1171,7 +1171,7 @@ static int smc91c92_event(event_t event, #define MDIO_DATA_WRITE1 (MDIO_DIR_WRITE | MDIO_DATA_OUT) #define MDIO_DATA_READ 0x02 -static void mdio_sync(ioaddr_t addr) +static void mdio_sync(kio_addr_t addr) { int bits; for (bits = 0; bits < 32; bits++) { @@ -1182,7 +1182,7 @@ static void mdio_sync(ioaddr_t addr) static int mdio_read(struct net_device *dev, int phy_id, int loc) { - ioaddr_t addr = dev->base_addr + MGMT; + kio_addr_t addr = dev->base_addr + MGMT; u_int cmd = (0x06<<10)|(phy_id<<5)|loc; int i, retval = 0; @@ -1202,7 +1202,7 @@ static int mdio_read(struct net_device * static void mdio_write(struct net_device *dev, int phy_id, int loc, int value) { - ioaddr_t addr = dev->base_addr + MGMT; + kio_addr_t addr = dev->base_addr + MGMT; u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value; int i; @@ -1228,7 +1228,7 @@ static void mdio_write(struct net_device #ifdef PCMCIA_DEBUG static void smc_dump(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u_short i, w, save; save = inw(ioaddr + BANK_SELECT); for (w = 0; w < 4; w++) { @@ -1283,7 +1283,7 @@ static int smc_close(struct net_device * { struct smc_private *smc = netdev_priv(dev); dev_link_t *link = &smc->link; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; DEBUG(0, "%s: smc_close(), status %4.4x.\n", dev->name, inw(ioaddr + BANK_SELECT)); @@ -1320,7 +1320,7 @@ static void smc_hardware_send_packet(str { struct smc_private *smc = netdev_priv(dev); struct sk_buff *skb = smc->saved_skb; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u_char packet_no; if (!skb) { @@ -1384,7 +1384,7 @@ static void smc_hardware_send_packet(str static void smc_tx_timeout(struct net_device *dev) { struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; printk(KERN_NOTICE "%s: SMC91c92 transmit timed out, " "Tx_status %2.2x status %4.4x.\n", @@ -1399,7 +1399,7 @@ static void smc_tx_timeout(struct net_de static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u_short num_pages; short time_out, ir; @@ -1465,7 +1465,7 @@ static int smc_start_xmit(struct sk_buff static void smc_tx_err(struct net_device * dev) { struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int saved_packet = inw(ioaddr + PNR_ARR) & 0xff; int packet_no = inw(ioaddr + FIFO_PORTS) & 0x7f; int tx_status; @@ -1509,7 +1509,7 @@ static void smc_tx_err(struct net_device static void smc_eph_irq(struct net_device *dev) { struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u_short card_stats, ephs; SMC_SELECT_BANK(0); @@ -1544,7 +1544,7 @@ static irqreturn_t smc_interrupt(int irq { struct net_device *dev = dev_id; struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr; + kio_addr_t ioaddr; u_short saved_bank, saved_pointer, mask, status; unsigned int handled = 1; char bogus_cnt = INTR_WORK; /* Work we are willing to do. */ @@ -1662,7 +1662,7 @@ irq_done: static void smc_rx(struct net_device *dev) { struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int rx_status; int packet_length; /* Caution: not frame length, rather words to transfer from the chip. */ @@ -1768,7 +1768,7 @@ static void fill_multicast_tbl(int count static void set_rx_mode(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; struct smc_private *smc = netdev_priv(dev); u_int multicast_table[ 2 ] = { 0, }; unsigned long flags; @@ -1835,7 +1835,7 @@ static int s9k_config(struct net_device static void smc_set_xcvr(struct net_device *dev, int if_port) { struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u_short saved_bank; saved_bank = inw(ioaddr + BANK_SELECT); @@ -1858,7 +1858,7 @@ static void smc_set_xcvr(struct net_devi static void smc_reset(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; struct smc_private *smc = netdev_priv(dev); int i; @@ -1935,7 +1935,7 @@ static void media_check(u_long arg) { struct net_device *dev = (struct net_device *) arg; struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u_short i, media, saved_bank; u_short link; @@ -2047,7 +2047,7 @@ reschedule: static int smc_link_ok(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; struct smc_private *smc = netdev_priv(dev); if (smc->cfg & CFG_MII_SELECT) { @@ -2061,7 +2061,7 @@ static int smc_link_ok(struct net_device static int smc_netdev_get_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd) { u16 tmp; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; ecmd->supported = (SUPPORTED_TP | SUPPORTED_AUI | SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full); @@ -2083,7 +2083,7 @@ static int smc_netdev_get_ecmd(struct ne static int smc_netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd) { u16 tmp; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; if (ecmd->speed != SPEED_10) return -EINVAL; @@ -2126,7 +2126,7 @@ static void smc_get_drvinfo(struct net_d static int smc_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) { struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u16 saved_bank = inw(ioaddr + BANK_SELECT); int ret; @@ -2144,7 +2144,7 @@ static int smc_get_settings(struct net_d static int smc_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) { struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u16 saved_bank = inw(ioaddr + BANK_SELECT); int ret; @@ -2162,7 +2162,7 @@ static int smc_set_settings(struct net_d static u32 smc_get_link(struct net_device *dev) { struct smc_private *smc = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u16 saved_bank = inw(ioaddr + BANK_SELECT); u32 ret; @@ -2190,7 +2190,7 @@ static int smc_nway_reset(struct net_dev { struct smc_private *smc = netdev_priv(dev); if (smc->cfg & CFG_MII_SELECT) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u16 saved_bank = inw(ioaddr + BANK_SELECT); int res; @@ -2222,7 +2222,7 @@ static int smc_ioctl (struct net_device struct mii_ioctl_data *mii = if_mii(rq); int rc = 0; u16 saved_bank; - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; if (!netif_running(dev)) return -EINVAL; diff -puN drivers/net/pcmcia/xirc2ps_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/net/pcmcia/xirc2ps_cs.c --- 25/drivers/net/pcmcia/xirc2ps_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/net/pcmcia/xirc2ps_cs.c Wed Jan 19 15:48:03 2005 @@ -274,12 +274,12 @@ INT_MODULE_PARM(lockup_hack, 0); /* ant static unsigned maxrx_bytes = 22000; /* MII management prototypes */ -static void mii_idle(ioaddr_t ioaddr); -static void mii_putbit(ioaddr_t ioaddr, unsigned data); -static int mii_getbit(ioaddr_t ioaddr); -static void mii_wbits(ioaddr_t ioaddr, unsigned data, int len); -static unsigned mii_rd(ioaddr_t ioaddr, u_char phyaddr, u_char phyreg); -static void mii_wr(ioaddr_t ioaddr, u_char phyaddr, u_char phyreg, +static void mii_idle(kio_addr_t ioaddr); +static void mii_putbit(kio_addr_t ioaddr, unsigned data); +static int mii_getbit(kio_addr_t ioaddr); +static void mii_wbits(kio_addr_t ioaddr, unsigned data, int len); +static unsigned mii_rd(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg); +static void mii_wr(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg, unsigned data, int len); /* @@ -420,7 +420,7 @@ next_tuple(client_handle_t handle, tuple static void PrintRegisters(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; if (pc_debug > 1) { int i, page; @@ -456,7 +456,7 @@ PrintRegisters(struct net_device *dev) * Turn around for read */ static void -mii_idle(ioaddr_t ioaddr) +mii_idle(kio_addr_t ioaddr) { PutByte(XIRCREG2_GPR2, 0x04|0); /* drive MDCK low */ udelay(1); @@ -468,7 +468,7 @@ mii_idle(ioaddr_t ioaddr) * Write a bit to MDI/O */ static void -mii_putbit(ioaddr_t ioaddr, unsigned data) +mii_putbit(kio_addr_t ioaddr, unsigned data) { #if 1 if (data) { @@ -501,7 +501,7 @@ mii_putbit(ioaddr_t ioaddr, unsigned dat * Get a bit from MDI/O */ static int -mii_getbit(ioaddr_t ioaddr) +mii_getbit(kio_addr_t ioaddr) { unsigned d; @@ -514,7 +514,7 @@ mii_getbit(ioaddr_t ioaddr) } static void -mii_wbits(ioaddr_t ioaddr, unsigned data, int len) +mii_wbits(kio_addr_t ioaddr, unsigned data, int len) { unsigned m = 1 << (len-1); for (; m; m >>= 1) @@ -522,7 +522,7 @@ mii_wbits(ioaddr_t ioaddr, unsigned data } static unsigned -mii_rd(ioaddr_t ioaddr, u_char phyaddr, u_char phyreg) +mii_rd(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg) { int i; unsigned data=0, m; @@ -544,7 +544,7 @@ mii_rd(ioaddr_t ioaddr, u_char phyaddr, } static void -mii_wr(ioaddr_t ioaddr, u_char phyaddr, u_char phyreg, unsigned data, int len) +mii_wr(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg, unsigned data, int len) { int i; @@ -800,7 +800,7 @@ xirc2ps_config(dev_link_t * link) local_info_t *local = netdev_priv(dev); tuple_t tuple; cisparse_t parse; - ioaddr_t ioaddr; + kio_addr_t ioaddr; int err, i; u_char buf[64]; cistpl_lan_node_id_t *node_id = (cistpl_lan_node_id_t*)parse.funce.data; @@ -1235,7 +1235,7 @@ xirc2ps_interrupt(int irq, void *dev_id, { struct net_device *dev = (struct net_device *)dev_id; local_info_t *lp = netdev_priv(dev); - ioaddr_t ioaddr; + kio_addr_t ioaddr; u_char saved_page; unsigned bytes_rcvd; unsigned int_status, eth_status, rx_status, tx_status; @@ -1340,7 +1340,7 @@ xirc2ps_interrupt(int irq, void *dev_id, unsigned i; u_long *p = skb_put(skb, pktlen); register u_long a; - ioaddr_t edpreg = ioaddr+XIRCREG_EDP-2; + kio_addr_t edpreg = ioaddr+XIRCREG_EDP-2; for (i=0; i < len ; i += 4, p++) { a = inl(edpreg); __asm__("rorl $16,%0\n\t" @@ -1469,7 +1469,7 @@ static int do_start_xmit(struct sk_buff *skb, struct net_device *dev) { local_info_t *lp = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; int okay; unsigned freespace; unsigned pktlen = skb? skb->len : 0; @@ -1539,7 +1539,7 @@ do_get_stats(struct net_device *dev) static void set_addresses(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; local_info_t *lp = netdev_priv(dev); struct dev_mc_list *dmi = dev->mc_list; char *addr; @@ -1581,7 +1581,7 @@ set_addresses(struct net_device *dev) static void set_multicast_list(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; SelectPage(0x42); if (dev->flags & IFF_PROMISC) { /* snoop */ @@ -1665,7 +1665,7 @@ static int do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { local_info_t *local = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; u16 *data = (u16 *)&rq->ifr_ifru; DEBUG(1, "%s: ioctl(%-.6s, %#04x) %04x %04x %04x %04x\n", @@ -1697,7 +1697,7 @@ static void hardreset(struct net_device *dev) { local_info_t *local = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; SelectPage(4); udelay(1); @@ -1714,7 +1714,7 @@ static void do_reset(struct net_device *dev, int full) { local_info_t *local = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; unsigned value; DEBUG(0, "%s: do_reset(%p,%d)\n", dev? dev->name:"eth?", dev, full); @@ -1875,7 +1875,7 @@ static int init_mii(struct net_device *dev) { local_info_t *local = netdev_priv(dev); - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; unsigned control, status, linkpartner; int i; @@ -1948,7 +1948,7 @@ static void do_powerdown(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; DEBUG(0, "do_powerdown(%p)\n", dev); @@ -1960,7 +1960,7 @@ do_powerdown(struct net_device *dev) static int do_stop(struct net_device *dev) { - ioaddr_t ioaddr = dev->base_addr; + kio_addr_t ioaddr = dev->base_addr; local_info_t *lp = netdev_priv(dev); dev_link_t *link = &lp->link; diff -puN drivers/net/wireless/netwave_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/net/wireless/netwave_cs.c --- 25/drivers/net/wireless/netwave_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/net/wireless/netwave_cs.c Wed Jan 19 15:48:03 2005 @@ -206,7 +206,7 @@ static dev_link_t *netwave_attach(void); static void netwave_detach(dev_link_t *); /* Destroy instance */ /* Hardware configuration */ -static void netwave_doreset(ioaddr_t iobase, u_char __iomem *ramBase); +static void netwave_doreset(kio_addr_t iobase, u_char __iomem *ramBase); static void netwave_reset(struct net_device *dev); /* Misc device stuff */ @@ -356,7 +356,7 @@ static inline void wait_WOC(unsigned int #ifdef WIRELESS_EXT static void netwave_snapshot(netwave_private *priv, u_char __iomem *ramBase, - ioaddr_t iobase) { + kio_addr_t iobase) { u_short resultBuffer; /* if time since last snapshot is > 1 sec. (100 jiffies?) then take @@ -389,7 +389,7 @@ static void netwave_snapshot(netwave_pri static struct iw_statistics *netwave_get_wireless_stats(struct net_device *dev) { unsigned long flags; - ioaddr_t iobase = dev->base_addr; + kio_addr_t iobase = dev->base_addr; netwave_private *priv = netdev_priv(dev); u_char __iomem *ramBase = priv->ramBase; struct iw_statistics* wstats; @@ -575,7 +575,7 @@ static int netwave_set_nwid(struct net_d char *extra) { unsigned long flags; - ioaddr_t iobase = dev->base_addr; + kio_addr_t iobase = dev->base_addr; netwave_private *priv = netdev_priv(dev); u_char __iomem *ramBase = priv->ramBase; @@ -633,7 +633,7 @@ static int netwave_set_scramble(struct n char *key) { unsigned long flags; - ioaddr_t iobase = dev->base_addr; + kio_addr_t iobase = dev->base_addr; netwave_private *priv = netdev_priv(dev); u_char __iomem *ramBase = priv->ramBase; @@ -749,7 +749,7 @@ static int netwave_get_snap(struct net_d char *extra) { unsigned long flags; - ioaddr_t iobase = dev->base_addr; + kio_addr_t iobase = dev->base_addr; netwave_private *priv = netdev_priv(dev); u_char __iomem *ramBase = priv->ramBase; @@ -1192,7 +1192,7 @@ static int netwave_event(event_t event, * * Proper hardware reset of the card. */ -static void netwave_doreset(ioaddr_t ioBase, u_char __iomem *ramBase) +static void netwave_doreset(kio_addr_t ioBase, u_char __iomem *ramBase) { /* Reset card */ wait_WOC(ioBase); @@ -1210,7 +1210,7 @@ static void netwave_reset(struct net_dev /* u_char state; */ netwave_private *priv = netdev_priv(dev); u_char __iomem *ramBase = priv->ramBase; - ioaddr_t iobase = dev->base_addr; + kio_addr_t iobase = dev->base_addr; DEBUG(0, "netwave_reset: Done with hardware reset\n"); @@ -1291,7 +1291,7 @@ static int netwave_hw_xmit(unsigned char netwave_private *priv = netdev_priv(dev); u_char __iomem * ramBase = priv->ramBase; - ioaddr_t iobase = dev->base_addr; + kio_addr_t iobase = dev->base_addr; /* Disable interrupts & save flags */ spin_lock_irqsave(&priv->spinlock, flags); @@ -1383,7 +1383,7 @@ static int netwave_start_xmit(struct sk_ */ static irqreturn_t netwave_interrupt(int irq, void* dev_id, struct pt_regs *regs) { - ioaddr_t iobase; + kio_addr_t iobase; u_char __iomem *ramBase; struct net_device *dev = (struct net_device *)dev_id; struct netwave_private *priv = netdev_priv(dev); @@ -1553,7 +1553,7 @@ static int netwave_rx(struct net_device { netwave_private *priv = netdev_priv(dev); u_char __iomem *ramBase = priv->ramBase; - ioaddr_t iobase = dev->base_addr; + kio_addr_t iobase = dev->base_addr; u_char rxStatus; struct sk_buff *skb = NULL; unsigned int curBuffer, @@ -1699,7 +1699,7 @@ module_exit(exit_netwave_cs); */ static void set_multicast_list(struct net_device *dev) { - ioaddr_t iobase = dev->base_addr; + kio_addr_t iobase = dev->base_addr; netwave_private *priv = netdev_priv(dev); u_char __iomem * ramBase = priv->ramBase; u_char rcvMode = 0; diff -puN drivers/net/wireless/wavelan_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/net/wireless/wavelan_cs.c --- 25/drivers/net/wireless/wavelan_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/net/wireless/wavelan_cs.c Wed Jan 19 15:48:03 2005 @@ -164,7 +164,7 @@ psa_write(struct net_device * dev, net_local *lp = netdev_priv(dev); u_char __iomem *ptr = lp->mem + PSA_ADDR + (o << 1); int count = 0; - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; /* As there seem to have no flag PSA_BUSY as in the ISA model, we are * oblige to verify this address to know when the PSA is ready... */ volatile u_char __iomem *verify = lp->mem + PSA_ADDR + @@ -725,7 +725,7 @@ void wl_update_history(wavepoint_history /* Perform a handover to a new WavePoint */ void wv_roam_handover(wavepoint_history *wavepoint, net_local *lp) { - ioaddr_t base = lp->dev->base_addr; + kio_addr_t base = lp->dev->base_addr; mm_t m; unsigned long flags; @@ -838,7 +838,7 @@ wv_82593_cmd(struct net_device * dev, int cmd, int result) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; int status; int wait_completed; long spin; @@ -970,7 +970,7 @@ read_ringbuf(struct net_device * dev, char * buf, int len) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; int ring_ptr = addr; int chunk_len; char * buf_ptr = buf; @@ -1136,7 +1136,7 @@ wv_psa_show(psa_t * p) static void wv_mmc_show(struct net_device * dev) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local * lp = netdev_priv(dev); mmr_t m; @@ -1316,7 +1316,7 @@ wv_packet_info(u_char * p, /* Packet t static inline void wv_init_info(struct net_device * dev) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; psa_t psa; int i; @@ -1335,7 +1335,7 @@ wv_init_info(struct net_device * dev) #ifdef DEBUG_BASIC_SHOW /* Now, let's go for the basic stuff */ - printk(KERN_NOTICE "%s: WaveLAN: port %#x, irq %d, hw_addr", + printk(KERN_NOTICE "%s: WaveLAN: port %#lx, irq %d, hw_addr", dev->name, base, dev->irq); for(i = 0; i < WAVELAN_ADDR_SIZE; i++) printk("%s%02X", (i == 0) ? " " : ":", dev->dev_addr[i]); @@ -1870,7 +1870,7 @@ static int wavelan_set_nwid(struct net_d union iwreq_data *wrqu, char *extra) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local *lp = netdev_priv(dev); psa_t psa; mm_t m; @@ -1960,7 +1960,7 @@ static int wavelan_set_freq(struct net_d union iwreq_data *wrqu, char *extra) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local *lp = netdev_priv(dev); unsigned long flags; int ret; @@ -1990,7 +1990,7 @@ static int wavelan_get_freq(struct net_d union iwreq_data *wrqu, char *extra) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local *lp = netdev_priv(dev); psa_t psa; unsigned long flags; @@ -2036,7 +2036,7 @@ static int wavelan_set_sens(struct net_d union iwreq_data *wrqu, char *extra) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local *lp = netdev_priv(dev); psa_t psa; unsigned long flags; @@ -2102,7 +2102,7 @@ static int wavelan_set_encode(struct net union iwreq_data *wrqu, char *extra) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local *lp = netdev_priv(dev); unsigned long flags; psa_t psa; @@ -2172,7 +2172,7 @@ static int wavelan_get_encode(struct net union iwreq_data *wrqu, char *extra) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local *lp = netdev_priv(dev); psa_t psa; unsigned long flags; @@ -2391,7 +2391,7 @@ static int wavelan_get_range(struct net_ union iwreq_data *wrqu, char *extra) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local *lp = netdev_priv(dev); struct iw_range *range = (struct iw_range *) extra; unsigned long flags; @@ -2467,7 +2467,7 @@ static int wavelan_set_qthr(struct net_d union iwreq_data *wrqu, char *extra) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local *lp = netdev_priv(dev); psa_t psa; unsigned long flags; @@ -2743,7 +2743,7 @@ static const struct iw_handler_def wavel static iw_stats * wavelan_get_wireless_stats(struct net_device * dev) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local * lp = netdev_priv(dev); mmr_t m; iw_stats * wstats; @@ -2807,7 +2807,7 @@ wv_start_of_frame(struct net_device * de int rfp, /* end of frame */ int wrap) /* start of buffer */ { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; int rp; int len; @@ -2970,7 +2970,7 @@ wv_packet_read(struct net_device * dev, static inline void wv_packet_rcv(struct net_device * dev) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local * lp = netdev_priv(dev); int newrfp; int rp; @@ -3107,7 +3107,7 @@ wv_packet_write(struct net_device * dev, short length) { net_local * lp = netdev_priv(dev); - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; unsigned long flags; int clen = length; register u_short xmtdata_base = TX_BASE; @@ -3231,7 +3231,7 @@ wavelan_packet_xmit(struct sk_buff * skb static inline int wv_mmc_init(struct net_device * dev) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; psa_t psa; mmw_t m; int configured; @@ -3425,7 +3425,7 @@ wv_mmc_init(struct net_device * dev) static int wv_ru_stop(struct net_device * dev) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local * lp = netdev_priv(dev); unsigned long flags; int status; @@ -3488,7 +3488,7 @@ wv_ru_stop(struct net_device * dev) static int wv_ru_start(struct net_device * dev) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local * lp = netdev_priv(dev); unsigned long flags; @@ -3576,7 +3576,7 @@ wv_ru_start(struct net_device * dev) static int wv_82593_config(struct net_device * dev) { - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; net_local * lp = netdev_priv(dev); struct i82593_conf_block cfblk; int ret = TRUE; @@ -3813,7 +3813,7 @@ static int wv_hw_config(struct net_device * dev) { net_local * lp = netdev_priv(dev); - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; unsigned long flags; int ret = FALSE; @@ -4144,7 +4144,7 @@ wavelan_interrupt(int irq, { struct net_device * dev; net_local * lp; - ioaddr_t base; + kio_addr_t base; int status0; u_int tx_status; @@ -4412,7 +4412,7 @@ static void wavelan_watchdog(struct net_device * dev) { net_local * lp = netdev_priv(dev); - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; unsigned long flags; int aborted = FALSE; @@ -4488,7 +4488,7 @@ wavelan_open(struct net_device * dev) { net_local * lp = netdev_priv(dev); dev_link_t * link = lp->link; - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; #ifdef DEBUG_CALLBACK_TRACE printk(KERN_DEBUG "%s: ->wavelan_open(dev=0x%x)\n", dev->name, @@ -4542,7 +4542,7 @@ static int wavelan_close(struct net_device * dev) { dev_link_t * link = ((net_local *)netdev_priv(dev))->link; - ioaddr_t base = dev->base_addr; + kio_addr_t base = dev->base_addr; #ifdef DEBUG_CALLBACK_TRACE printk(KERN_DEBUG "%s: ->wavelan_close(dev=0x%x)\n", dev->name, diff -puN drivers/pcmcia/au1000_generic.c~pcmcia-use-unsigned-long-for-io-port-address drivers/pcmcia/au1000_generic.c --- 25/drivers/pcmcia/au1000_generic.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/pcmcia/au1000_generic.c Wed Jan 19 15:48:03 2005 @@ -196,13 +196,13 @@ static int __init au1000_pcmcia_driver_i if (i == 0) { pcmcia_socket[i].virt_io = - (u32)ioremap((ioaddr_t)0xF00000000, 0x1000); + (u32)ioremap((kio_addr_t)0xF00000000, 0x1000); pcmcia_socket[i].phys_attr = (memaddr_t)0xF40000000; pcmcia_socket[i].phys_mem = (memaddr_t)0xF80000000; } else { pcmcia_socket[i].virt_io = - (u32)ioremap((ioaddr_t)0xF08000000, 0x1000); + (u32)ioremap((kio_addr_t)0xF08000000, 0x1000); pcmcia_socket[i].phys_attr = (memaddr_t)0xF48000000; pcmcia_socket[i].phys_mem = (memaddr_t)0xF88000000; } diff -puN drivers/pcmcia/cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/pcmcia/cs.c --- 25/drivers/pcmcia/cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/pcmcia/cs.c Wed Jan 19 15:48:03 2005 @@ -741,19 +741,19 @@ static int alloc_io_space(struct pcmcia_ ioaddr_t num, u_int lines) { int i; - ioaddr_t try, align; + kio_addr_t try, align; align = (*base) ? (lines ? 1<flags, io->speed, io->start, io->stop); if (map >= MAX_IO_WIN) return -EINVAL; diff -puN drivers/pcmcia/i82092.c~pcmcia-use-unsigned-long-for-io-port-address drivers/pcmcia/i82092.c --- 25/drivers/pcmcia/i82092.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/pcmcia/i82092.c Wed Jan 19 15:48:03 2005 @@ -81,7 +81,7 @@ struct socket_info { 1 = empty socket, 2 = card but not initialized, 3 = operational card */ - int io_base; /* base io address of the socket */ + kio_addr_t io_base; /* base io address of the socket */ struct pcmcia_socket socket; struct pci_dev *dev; /* The PCI device for the socket */ diff -puN drivers/pcmcia/i82365.c~pcmcia-use-unsigned-long-for-io-port-address drivers/pcmcia/i82365.c --- 25/drivers/pcmcia/i82365.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/pcmcia/i82365.c Wed Jan 19 15:48:03 2005 @@ -96,7 +96,7 @@ static inline int _check_irq(int irq, in /* Parameters that can be set with 'insmod' */ /* Default base address for i82365sl and other ISA chips */ -static int i365_base = 0x3e0; +static unsigned long i365_base = 0x3e0; /* Should we probe at 0x3e2 for an extra ISA controller? */ static int extra_sockets = 0; /* Specify a socket number to ignore */ @@ -130,7 +130,7 @@ static int async_clock = -1; static int cable_mode = -1; static int wakeup = 0; -module_param(i365_base, int, 0444); +module_param(i365_base, ulong, 0444); module_param(ignore, int, 0444); module_param(extra_sockets, int, 0444); module_param(irq_mask, int, 0444); @@ -167,7 +167,7 @@ struct i82365_socket { u_short type, flags; struct pcmcia_socket socket; unsigned int number; - ioaddr_t ioaddr; + kio_addr_t ioaddr; u_short psock; u_char cs_irq, intr; union { @@ -240,7 +240,7 @@ static u_char i365_get(u_short sock, u_s unsigned long flags; spin_lock_irqsave(&bus_lock,flags); { - ioaddr_t port = socket[sock].ioaddr; + kio_addr_t port = socket[sock].ioaddr; u_char val; reg = I365_REG(socket[sock].psock, reg); outb(reg, port); val = inb(port+1); @@ -254,7 +254,7 @@ static void i365_set(u_short sock, u_sho unsigned long flags; spin_lock_irqsave(&bus_lock,flags); { - ioaddr_t port = socket[sock].ioaddr; + kio_addr_t port = socket[sock].ioaddr; u_char val = I365_REG(socket[sock].psock, reg); outb(val, port); outb(data, port+1); spin_unlock_irqrestore(&bus_lock,flags); @@ -589,7 +589,7 @@ static int to_cycles(int ns) /*====================================================================*/ -static int __init identify(u_short port, u_short sock) +static int __init identify(kio_addr_t port, u_short sock) { u_char val; int type = -1; @@ -660,7 +660,7 @@ static int __init identify(u_short port, static int __init is_alive(u_short sock) { u_char stat; - u_short start, stop; + kio_addr_t start, stop; stat = i365_get(sock, I365_STATUS); start = i365_get_pair(sock, I365_IO(0)+I365_W_START); @@ -677,7 +677,7 @@ static int __init is_alive(u_short sock) /*====================================================================*/ -static void __init add_socket(u_short port, int psock, int type) +static void __init add_socket(kio_addr_t port, int psock, int type) { socket[sockets].ioaddr = port; socket[sockets].psock = psock; @@ -699,7 +699,7 @@ static void __init add_pcic(int ns, int if (base == 0) printk("\n"); printk(KERN_INFO " %s", pcic[type].name); - printk(" ISA-to-PCMCIA at port %#x ofs 0x%02x", + printk(" ISA-to-PCMCIA at port %#lx ofs 0x%02x", t->ioaddr, t->psock*0x40); printk(", %d socket%s\n", ns, ((ns > 1) ? "s" : "")); @@ -773,7 +773,7 @@ static struct pnp_dev *i82365_pnpdev; static void __init isa_probe(void) { int i, j, sock, k, ns, id; - ioaddr_t port; + kio_addr_t port; #ifdef CONFIG_PNP struct isapnp_device_id *devid; struct pnp_dev *dev; @@ -804,7 +804,7 @@ static void __init isa_probe(void) if (check_region(i365_base, 2) != 0) { if (sockets == 0) - printk("port conflict at %#x\n", i365_base); + printk("port conflict at %#lx\n", i365_base); return; } @@ -1127,7 +1127,7 @@ static int i365_set_io_map(u_short sock, u_char map, ioctl; debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, " - "%#4.4x-%#4.4x)\n", sock, io->map, io->flags, + "%#lx-%#lx)\n", sock, io->map, io->flags, io->speed, io->start, io->stop); map = io->map; if ((map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || @@ -1156,8 +1156,8 @@ static int i365_set_mem_map(u_short sock u_short base, i; u_char map; - debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, %#5.5lx-%#5.5" - "lx, %#5.5x)\n", sock, mem->map, mem->flags, mem->speed, + debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, %#lx-%#lx, " + "%#x)\n", sock, mem->map, mem->flags, mem->speed, mem->res->start, mem->res->end, mem->card_start); map = mem->map; diff -puN drivers/pcmcia/m32r_cfc.c~pcmcia-use-unsigned-long-for-io-port-address drivers/pcmcia/m32r_cfc.c --- 25/drivers/pcmcia/m32r_cfc.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/pcmcia/m32r_cfc.c Wed Jan 19 15:48:03 2005 @@ -61,7 +61,7 @@ typedef struct pcc_socket { u_short type, flags; struct pcmcia_socket socket; unsigned int number; - ioaddr_t ioaddr; + kio_addr_t ioaddr; u_long mapaddr; u_long base; /* PCC register base */ u_char cs_irq1, cs_irq2, intr; @@ -300,7 +300,7 @@ static int __init is_alive(u_short sock) return 0; } -static void add_pcc_socket(ulong base, int irq, ulong mapaddr, ioaddr_t ioaddr) +static void add_pcc_socket(ulong base, int irq, ulong mapaddr, kio_addr_t ioaddr) { pcc_socket_t *t = &socket[pcc_sockets]; @@ -568,7 +568,7 @@ static int _pcc_set_io_map(u_short sock, u_char map; debug(3, "m32r_cfc: SetIOMap(%d, %d, %#2.2x, %d ns, " - "%#4.4x-%#4.4x)\n", sock, io->map, io->flags, + "%#lx-%#lx)\n", sock, io->map, io->flags, io->speed, io->start, io->stop); map = io->map; @@ -585,7 +585,7 @@ static int _pcc_set_mem_map(u_short sock pcc_socket_t *t = &socket[sock]; debug(3, "m32r_cfc: SetMemMap(%d, %d, %#2.2x, %d ns, " - "%#5.5lx, %#5.5x)\n", sock, map, mem->flags, + "%#lx, %#x)\n", sock, map, mem->flags, mem->speed, mem->static_start, mem->card_start); /* @@ -807,7 +807,7 @@ static int __init init_m32r_pcc(void) #else /* CONFIG_PLAT_USRV */ { ulong base, mapaddr; - ioaddr_t ioaddr; + kio_addr_t ioaddr; for (i = 0 ; i < M32R_MAX_PCC ; i++) { base = (ulong)PLD_CFRSTCR; diff -puN drivers/pcmcia/m32r_pcc.c~pcmcia-use-unsigned-long-for-io-port-address drivers/pcmcia/m32r_pcc.c --- 25/drivers/pcmcia/m32r_pcc.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/pcmcia/m32r_pcc.c Wed Jan 19 15:48:03 2005 @@ -68,7 +68,7 @@ typedef struct pcc_socket { u_short type, flags; struct pcmcia_socket socket; unsigned int number; - ioaddr_t ioaddr; + kio_addr_t ioaddr; u_long mapaddr; u_long base; /* PCC register base */ u_char cs_irq, intr; @@ -312,7 +312,7 @@ static int __init is_alive(u_short sock) return 0; } -static void add_pcc_socket(ulong base, int irq, ulong mapaddr, ioaddr_t ioaddr) +static void add_pcc_socket(ulong base, int irq, ulong mapaddr, kio_addr_t ioaddr) { pcc_socket_t *t = &socket[pcc_sockets]; @@ -503,7 +503,7 @@ static int _pcc_set_io_map(u_short sock, u_char map; debug(3, "m32r-pcc: SetIOMap(%d, %d, %#2.2x, %d ns, " - "%#4.4x-%#4.4x)\n", sock, io->map, io->flags, + "%#lx-%#lx)\n", sock, io->map, io->flags, io->speed, io->start, io->stop); map = io->map; @@ -526,7 +526,7 @@ static int _pcc_set_mem_map(u_short sock #endif debug(3, "m32r-pcc: SetMemMap(%d, %d, %#2.2x, %d ns, " - "%#5.5lx, %#5.5x)\n", sock, map, mem->flags, + "%#lx, %#x)\n", sock, map, mem->flags, mem->speed, mem->static_start, mem->card_start); /* diff -puN drivers/pcmcia/rsrc_nonstatic.c~pcmcia-use-unsigned-long-for-io-port-address drivers/pcmcia/rsrc_nonstatic.c --- 25/drivers/pcmcia/rsrc_nonstatic.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/pcmcia/rsrc_nonstatic.c Wed Jan 19 15:48:03 2005 @@ -186,14 +186,15 @@ static int sub_interval(struct resource_ ======================================================================*/ #ifdef CONFIG_PCMCIA_PROBE -static void do_io_probe(struct pcmcia_socket *s, ioaddr_t base, ioaddr_t num) +static void do_io_probe(struct pcmcia_socket *s, kio_addr_t base, kio_addr_t num) { struct resource *res; struct socket_data *s_data = s->resource_data; - ioaddr_t i, j, bad, any; + kio_addr_t i, j, bad; + int any; u_char *b, hole, most; - printk(KERN_INFO "cs: IO port probe 0x%04x-0x%04x:", + printk(KERN_INFO "cs: IO port probe %#lx-%#lx:", base, base+num-1); /* First, what does a floating port look like? */ @@ -233,7 +234,7 @@ static void do_io_probe(struct pcmcia_so } else { if (bad) { sub_interval(&s_data->io_db, bad, i-bad); - printk(" %#04x-%#04x", bad, i-1); + printk(" %#lx-%#lx", bad, i-1); bad = 0; } } @@ -244,7 +245,7 @@ static void do_io_probe(struct pcmcia_so return; } else { sub_interval(&s_data->io_db, bad, i-bad); - printk(" %#04x-%#04x", bad, i-1); + printk(" %#lx-%#lx", bad, i-1); } } @@ -725,7 +726,8 @@ static int adjust_memory(struct pcmcia_s static int adjust_io(struct pcmcia_socket *s, adjust_t *adj) { struct socket_data *data = s->resource_data; - int base, num, ret = CS_SUCCESS; + kio_addr_t base, num; + int ret = CS_SUCCESS; base = adj->resource.io.BasePort; num = adj->resource.io.NumPorts; diff -puN drivers/pcmcia/tcic.c~pcmcia-use-unsigned-long-for-io-port-address drivers/pcmcia/tcic.c --- 25/drivers/pcmcia/tcic.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/pcmcia/tcic.c Wed Jan 19 15:48:03 2005 @@ -80,7 +80,7 @@ MODULE_LICENSE("Dual MPL/GPL"); /* Parameters that can be set with 'insmod' */ /* The base port address of the TCIC-2 chip */ -static int tcic_base = TCIC_BASE; +static unsigned long tcic_base = TCIC_BASE; /* Specify a socket number to ignore */ static int ignore = -1; @@ -105,7 +105,7 @@ static int poll_quick = HZ/20; /* CCLK external clock time, in nanoseconds. 70 ns = 14.31818 MHz */ static int cycle_time = 70; -module_param(tcic_base, int, 0444); +module_param(tcic_base, ulong, 0444); module_param(ignore, int, 0444); module_param(do_scan, int, 0444); module_param(irq_mask, int, 0444); @@ -144,26 +144,26 @@ static struct tcic_socket socket_table[2 static u_char tcic_getb(u_char reg) { u_char val = inb(tcic_base+reg); - printk(KERN_DEBUG "tcic_getb(%#x) = %#x\n", tcic_base+reg, val); + printk(KERN_DEBUG "tcic_getb(%#lx) = %#x\n", tcic_base+reg, val); return val; } static u_short tcic_getw(u_char reg) { u_short val = inw(tcic_base+reg); - printk(KERN_DEBUG "tcic_getw(%#x) = %#x\n", tcic_base+reg, val); + printk(KERN_DEBUG "tcic_getw(%#lx) = %#x\n", tcic_base+reg, val); return val; } static void tcic_setb(u_char reg, u_char data) { - printk(KERN_DEBUG "tcic_setb(%#x, %#x)\n", tcic_base+reg, data); + printk(KERN_DEBUG "tcic_setb(%#lx, %#x)\n", tcic_base+reg, data); outb(data, tcic_base+reg); } static void tcic_setw(u_char reg, u_short data) { - printk(KERN_DEBUG "tcic_setw(%#x, %#x)\n", tcic_base+reg, data); + printk(KERN_DEBUG "tcic_setw(%#lx, %#x)\n", tcic_base+reg, data); outw(data, tcic_base+reg); } #else @@ -796,7 +796,7 @@ static int tcic_set_io_map(struct pcmcia u_short base, len, ioctl; debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, " - "%#4.4x-%#4.4x)\n", psock, io->map, io->flags, + "%#lx-%#lx)\n", psock, io->map, io->flags, io->speed, io->start, io->stop); if ((io->map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || (io->stop < io->start)) return -EINVAL; @@ -833,7 +833,7 @@ static int tcic_set_mem_map(struct pcmci u_long base, len, mmap; debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, " - "%#5.5lx-%#5.5lx, %#5.5x)\n", psock, mem->map, mem->flags, + "%#lx-%#lx, %#x)\n", psock, mem->map, mem->flags, mem->speed, mem->res->start, mem->res->end, mem->card_start); if ((mem->map > 3) || (mem->card_start > 0x3ffffff) || (mem->res->start > 0xffffff) || (mem->res->end > 0xffffff) || diff -puN drivers/serial/serial_cs.c~pcmcia-use-unsigned-long-for-io-port-address drivers/serial/serial_cs.c --- 25/drivers/serial/serial_cs.c~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/drivers/serial/serial_cs.c Wed Jan 19 15:48:03 2005 @@ -289,7 +289,7 @@ static void serial_detach(dev_link_t * l /*====================================================================*/ -static int setup_serial(struct serial_info * info, ioaddr_t iobase, int irq) +static int setup_serial(struct serial_info * info, kio_addr_t iobase, int irq) { struct uart_port port; int line; @@ -351,7 +351,7 @@ next_tuple(client_handle_t handle, tuple static int simple_config(dev_link_t *link) { - static ioaddr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; + static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; static int size_table[2] = { 8, 16 }; client_handle_t handle = link->handle; struct serial_info *info = link->priv; @@ -366,7 +366,7 @@ static int simple_config(dev_link_t *lin /* If the card is already configured, look up the port and irq */ i = pcmcia_get_configuration_info(handle, &config); if ((i == CS_SUCCESS) && (config.Attributes & CONF_VALID_CLIENT)) { - ioaddr_t port = 0; + kio_addr_t port = 0; if ((config.BasePort2 != 0) && (config.NumPorts2 == 8)) { port = config.BasePort2; info->slave = 1; diff -puN include/pcmcia/cs_types.h~pcmcia-use-unsigned-long-for-io-port-address include/pcmcia/cs_types.h --- 25/include/pcmcia/cs_types.h~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/include/pcmcia/cs_types.h Wed Jan 19 15:48:03 2005 @@ -22,10 +22,12 @@ #endif #if defined(__arm__) || defined(__mips__) +/* This (ioaddr_t) is exposed to userspace & hence cannot be changed. */ typedef u_int ioaddr_t; #else typedef u_short ioaddr_t; #endif +typedef unsigned long kio_addr_t; typedef u_short socket_t; typedef u_int event_t; diff -puN include/pcmcia/ss.h~pcmcia-use-unsigned-long-for-io-port-address include/pcmcia/ss.h --- 25/include/pcmcia/ss.h~pcmcia-use-unsigned-long-for-io-port-address Wed Jan 19 15:48:03 2005 +++ 25-akpm/include/pcmcia/ss.h Wed Jan 19 15:48:03 2005 @@ -81,7 +81,7 @@ typedef struct pccard_io_map { u_char map; u_char flags; u_short speed; - ioaddr_t start, stop; + kio_addr_t start, stop; } pccard_io_map; typedef struct pccard_mem_map { @@ -144,8 +144,8 @@ struct pcmcia_socket; typedef struct io_window_t { u_int Attributes; - ioaddr_t BasePort, NumPorts; - ioaddr_t InUse, Config; + kio_addr_t BasePort, NumPorts; + kio_addr_t InUse, Config; struct resource *res; } io_window_t; @@ -199,7 +199,7 @@ struct pcmcia_socket { u_int features; u_int irq_mask; u_int map_size; - ioaddr_t io_offset; + kio_addr_t io_offset; u_char pci_irq; struct pci_dev * cb_dev; _