This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / scsi / dpt_i2o.c
index c623c60..77cf39f 100644 (file)
@@ -872,8 +872,8 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
        ulong base_addr1_phys = 0;
        u32 hba_map0_area_size = 0;
        u32 hba_map1_area_size = 0;
-       void __iomem *base_addr_virt = NULL;
-       void __iomem *msg_addr_virt = NULL;
+       ulong base_addr_virt = 0;
+       ulong msg_addr_virt = 0;
 
        int raptorFlag = FALSE;
        int i;
@@ -907,17 +907,17 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
        }
 
 
-       base_addr_virt = ioremap(base_addr0_phys,hba_map0_area_size);
-       if (!base_addr_virt) {
+       base_addr_virt = (ulong)ioremap(base_addr0_phys,hba_map0_area_size);
+       if(base_addr_virt == 0) {
                PERROR("dpti: adpt_config_hba: io remap failed\n");
                return -EINVAL;
        }
 
         if(raptorFlag == TRUE) {
-               msg_addr_virt = ioremap(base_addr1_phys, hba_map1_area_size );
-               if (!msg_addr_virt) {
+               msg_addr_virt = (ulong)ioremap(base_addr1_phys, hba_map1_area_size );
+               if(msg_addr_virt == 0) {
                        PERROR("dpti: adpt_config_hba: io remap failed on BAR1\n");
-                       iounmap(base_addr_virt);
+                       iounmap((void*)base_addr_virt);
                        return -EINVAL;
                }
        } else {
@@ -928,9 +928,9 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
        pHba = kmalloc(sizeof(adpt_hba), GFP_KERNEL);
        if( pHba == NULL) {
                if(msg_addr_virt != base_addr_virt){
-                       iounmap(msg_addr_virt);
+                       iounmap((void*)msg_addr_virt);
                }
-               iounmap(base_addr_virt);
+               iounmap((void*)base_addr_virt);
                return -ENOMEM;
        }
        memset(pHba, 0, sizeof(adpt_hba));
@@ -961,10 +961,10 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
 
        // Set up the Virtual Base Address of the I2O Device
        pHba->base_addr_virt = base_addr_virt;
-       pHba->msg_addr_virt = msg_addr_virt;
-       pHba->irq_mask = base_addr_virt+0x30;
-       pHba->post_port = base_addr_virt+0x40;
-       pHba->reply_port = base_addr_virt+0x44;
+       pHba->msg_addr_virt = msg_addr_virt;  
+       pHba->irq_mask = (ulong)(base_addr_virt+0x30);
+       pHba->post_port = (ulong)(base_addr_virt+0x40);
+       pHba->reply_port = (ulong)(base_addr_virt+0x44);
 
        pHba->hrt = NULL;
        pHba->lct = NULL;
@@ -980,12 +980,12 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
        spin_lock_init(&adpt_post_wait_lock);
 
        if(raptorFlag == 0){
-               printk(KERN_INFO"Adaptec I2O RAID controller %d at %p size=%x irq=%d\n", 
+               printk(KERN_INFO"Adaptec I2O RAID controller %d at %lx size=%x irq=%d\n", 
                        hba_count-1, base_addr_virt, hba_map0_area_size, pDev->irq);
        } else {
                printk(KERN_INFO"Adaptec I2O RAID controller %d irq=%d\n",hba_count-1, pDev->irq);
-               printk(KERN_INFO"     BAR0 %p - size= %x\n",base_addr_virt,hba_map0_area_size);
-               printk(KERN_INFO"     BAR1 %p - size= %x\n",msg_addr_virt,hba_map1_area_size);
+               printk(KERN_INFO"     BAR0 %lx - size= %x\n",base_addr_virt,hba_map0_area_size);
+               printk(KERN_INFO"     BAR1 %lx - size= %x\n",msg_addr_virt,hba_map1_area_size);
        }
 
        if (request_irq (pDev->irq, adpt_isr, SA_SHIRQ, pHba->name, pHba)) {
@@ -1036,9 +1036,9 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba)
        hba_count--;
        up(&adpt_configuration_lock);
 
-       iounmap(pHba->base_addr_virt);
+       iounmap((void*)pHba->base_addr_virt);
        if(pHba->msg_addr_virt != pHba->base_addr_virt){
-               iounmap(pHba->msg_addr_virt);
+               iounmap((void*)pHba->msg_addr_virt);
        }
        if(pHba->hrt) {
                kfree(pHba->hrt);
@@ -1222,7 +1222,7 @@ static s32 adpt_i2o_post_this(adpt_hba* pHba, u32* data, int len)
 {
 
        u32 m = EMPTY_QUEUE;
-       u32 __iomem *msg;
+       u32 *msg;
        ulong timeout = jiffies + 30*HZ;
        do {
                rmb();
@@ -1238,7 +1238,7 @@ static s32 adpt_i2o_post_this(adpt_hba* pHba, u32* data, int len)
                schedule_timeout(1);
        } while(m == EMPTY_QUEUE);
                
-       msg = pHba->msg_addr_virt + m;
+       msg = (u32*) (pHba->msg_addr_virt + m);
        memcpy_toio(msg, data, len);
        wmb();
 
@@ -2638,7 +2638,7 @@ static int adpt_i2o_online_hba(adpt_hba* pHba)
 
 static s32 adpt_send_nop(adpt_hba*pHba,u32 m)
 {
-       u32 __iomem *msg;
+       u32 *msg;
        ulong timeout = jiffies + 5*HZ;
 
        while(m == EMPTY_QUEUE){
@@ -2654,7 +2654,7 @@ static s32 adpt_send_nop(adpt_hba*pHba,u32 m)
                set_current_state(TASK_UNINTERRUPTIBLE);
                schedule_timeout(1);
        }
-       msg = (u32 __iomem *)(pHba->msg_addr_virt + m);
+       msg = (u32*)(pHba->msg_addr_virt + m);
        writel( THREE_WORD_MSG_SIZE | SGL_OFFSET_0,&msg[0]);
        writel( I2O_CMD_UTIL_NOP << 24 | HOST_TID << 12 | 0,&msg[1]);
        writel( 0,&msg[2]);
@@ -2668,7 +2668,7 @@ static s32 adpt_send_nop(adpt_hba*pHba,u32 m)
 static s32 adpt_i2o_init_outbound_q(adpt_hba* pHba)
 {
        u8 *status;
-       u32 __iomem *msg = NULL;
+       u32 *msg = NULL;
        int i;
        ulong timeout = jiffies + TMOUT_INITOUTBOUND*HZ;
        u32* ptr;
@@ -2690,7 +2690,7 @@ static s32 adpt_i2o_init_outbound_q(adpt_hba* pHba)
                schedule_timeout(1);
        } while(m == EMPTY_QUEUE);
 
-       msg=(u32 __iomem *)(pHba->msg_addr_virt+m);
+       msg=(u32 *)(pHba->msg_addr_virt+m);
 
        status = kmalloc(4,GFP_KERNEL|ADDR32);
        if (status==NULL) {
@@ -2775,7 +2775,7 @@ static s32 adpt_i2o_status_get(adpt_hba* pHba)
 {
        ulong timeout;
        u32 m;
-       u32 __iomem *msg;
+       u32 *msg;
        u8 *status_block=NULL;
        ulong status_block_bus;
 
@@ -2809,7 +2809,7 @@ static s32 adpt_i2o_status_get(adpt_hba* pHba)
        } while(m==EMPTY_QUEUE);
 
        
-       msg=(u32 __iomem *)(pHba->msg_addr_virt+m);
+       msg=(u32*)(pHba->msg_addr_virt+m);
 
        writel(NINE_WORD_MSG_SIZE|SGL_OFFSET_0, &msg[0]);
        writel(I2O_CMD_STATUS_GET<<24|HOST_TID<<12|ADAPTER_TID, &msg[1]);