aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/dpt_i2o.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r--drivers/scsi/dpt_i2o.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 973f97dd474c..2fd728731d5e 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -690,7 +690,7 @@ static int adpt_device_reset(struct scsi_cmnd* cmd)
690 u32 msg[4]; 690 u32 msg[4];
691 u32 rcode; 691 u32 rcode;
692 int old_state; 692 int old_state;
693 struct adpt_device* d = (void*) cmd->device->hostdata; 693 struct adpt_device* d = cmd->device->hostdata;
694 694
695 pHba = (void*) cmd->device->host->hostdata[0]; 695 pHba = (void*) cmd->device->host->hostdata[0];
696 printk(KERN_INFO"%s: Trying to reset device\n",pHba->name); 696 printk(KERN_INFO"%s: Trying to reset device\n",pHba->name);
@@ -706,7 +706,7 @@ static int adpt_device_reset(struct scsi_cmnd* cmd)
706 706
707 old_state = d->state; 707 old_state = d->state;
708 d->state |= DPTI_DEV_RESET; 708 d->state |= DPTI_DEV_RESET;
709 if( (rcode = adpt_i2o_post_wait(pHba, (void*)msg,sizeof(msg), FOREVER)) ){ 709 if( (rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER)) ){
710 d->state = old_state; 710 d->state = old_state;
711 if(rcode == -EOPNOTSUPP ){ 711 if(rcode == -EOPNOTSUPP ){
712 printk(KERN_INFO"%s: Device reset not supported\n",pHba->name); 712 printk(KERN_INFO"%s: Device reset not supported\n",pHba->name);
@@ -736,7 +736,7 @@ static int adpt_bus_reset(struct scsi_cmnd* cmd)
736 msg[1] = (I2O_HBA_BUS_RESET<<24|HOST_TID<<12|pHba->channel[cmd->device->channel].tid); 736 msg[1] = (I2O_HBA_BUS_RESET<<24|HOST_TID<<12|pHba->channel[cmd->device->channel].tid);
737 msg[2] = 0; 737 msg[2] = 0;
738 msg[3] = 0; 738 msg[3] = 0;
739 if(adpt_i2o_post_wait(pHba, (void*)msg,sizeof(msg), FOREVER) ){ 739 if(adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER) ){
740 printk(KERN_WARNING"%s: Bus reset failed.\n",pHba->name); 740 printk(KERN_WARNING"%s: Bus reset failed.\n",pHba->name);
741 return FAILED; 741 return FAILED;
742 } else { 742 } else {
@@ -1436,7 +1436,7 @@ static int adpt_i2o_parse_lct(adpt_hba* pHba)
1436 return -ENOMEM; 1436 return -ENOMEM;
1437 } 1437 }
1438 1438
1439 d->controller = (void*)pHba; 1439 d->controller = pHba;
1440 d->next = NULL; 1440 d->next = NULL;
1441 1441
1442 memcpy(&d->lct_data, &lct->lct_entry[i], sizeof(i2o_lct_entry)); 1442 memcpy(&d->lct_data, &lct->lct_entry[i], sizeof(i2o_lct_entry));
@@ -1982,7 +1982,7 @@ static irqreturn_t adpt_isr(int irq, void *dev_id, struct pt_regs *regs)
1982 struct scsi_cmnd* cmd; 1982 struct scsi_cmnd* cmd;
1983 adpt_hba* pHba = dev_id; 1983 adpt_hba* pHba = dev_id;
1984 u32 m; 1984 u32 m;
1985 ulong reply; 1985 void __iomem *reply;
1986 u32 status=0; 1986 u32 status=0;
1987 u32 context; 1987 u32 context;
1988 ulong flags = 0; 1988 ulong flags = 0;
@@ -2007,11 +2007,11 @@ static irqreturn_t adpt_isr(int irq, void *dev_id, struct pt_regs *regs)
2007 goto out; 2007 goto out;
2008 } 2008 }
2009 } 2009 }
2010 reply = (ulong)bus_to_virt(m); 2010 reply = bus_to_virt(m);
2011 2011
2012 if (readl(reply) & MSG_FAIL) { 2012 if (readl(reply) & MSG_FAIL) {
2013 u32 old_m = readl(reply+28); 2013 u32 old_m = readl(reply+28);
2014 ulong msg; 2014 void __iomem *msg;
2015 u32 old_context; 2015 u32 old_context;
2016 PDEBUG("%s: Failed message\n",pHba->name); 2016 PDEBUG("%s: Failed message\n",pHba->name);
2017 if(old_m >= 0x100000){ 2017 if(old_m >= 0x100000){
@@ -2020,16 +2020,16 @@ static irqreturn_t adpt_isr(int irq, void *dev_id, struct pt_regs *regs)
2020 continue; 2020 continue;
2021 } 2021 }
2022 // Transaction context is 0 in failed reply frame 2022 // Transaction context is 0 in failed reply frame
2023 msg = (ulong)(pHba->msg_addr_virt + old_m); 2023 msg = pHba->msg_addr_virt + old_m;
2024 old_context = readl(msg+12); 2024 old_context = readl(msg+12);
2025 writel(old_context, reply+12); 2025 writel(old_context, reply+12);
2026 adpt_send_nop(pHba, old_m); 2026 adpt_send_nop(pHba, old_m);
2027 } 2027 }
2028 context = readl(reply+8); 2028 context = readl(reply+8);
2029 if(context & 0x40000000){ // IOCTL 2029 if(context & 0x40000000){ // IOCTL
2030 ulong p = (ulong)(readl(reply+12)); 2030 void *p = (void *)readl(reply+12);
2031 if( p != 0) { 2031 if( p != NULL) {
2032 memcpy((void*)p, (void*)reply, REPLY_FRAME_SIZE * 4); 2032 memcpy_fromio(p, reply, REPLY_FRAME_SIZE * 4);
2033 } 2033 }
2034 // All IOCTLs will also be post wait 2034 // All IOCTLs will also be post wait
2035 } 2035 }
@@ -2213,7 +2213,7 @@ static s32 adpt_scsi_register(adpt_hba* pHba,struct scsi_host_template * sht)
2213} 2213}
2214 2214
2215 2215
2216static s32 adpt_i2o_to_scsi(ulong reply, struct scsi_cmnd* cmd) 2216static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
2217{ 2217{
2218 adpt_hba* pHba; 2218 adpt_hba* pHba;
2219 u32 hba_status; 2219 u32 hba_status;
@@ -2305,7 +2305,7 @@ static s32 adpt_i2o_to_scsi(ulong reply, struct scsi_cmnd* cmd)
2305 u32 len = sizeof(cmd->sense_buffer); 2305 u32 len = sizeof(cmd->sense_buffer);
2306 len = (len > 40) ? 40 : len; 2306 len = (len > 40) ? 40 : len;
2307 // Copy over the sense data 2307 // Copy over the sense data
2308 memcpy(cmd->sense_buffer, (void*)(reply+28) , len); 2308 memcpy_fromio(cmd->sense_buffer, (reply+28) , len);
2309 if(cmd->sense_buffer[0] == 0x70 /* class 7 */ && 2309 if(cmd->sense_buffer[0] == 0x70 /* class 7 */ &&
2310 cmd->sense_buffer[2] == DATA_PROTECT ){ 2310 cmd->sense_buffer[2] == DATA_PROTECT ){
2311 /* This is to handle an array failed */ 2311 /* This is to handle an array failed */
@@ -2420,7 +2420,7 @@ static s32 adpt_i2o_reparse_lct(adpt_hba* pHba)
2420 return -ENOMEM; 2420 return -ENOMEM;
2421 } 2421 }
2422 2422
2423 d->controller = (void*)pHba; 2423 d->controller = pHba;
2424 d->next = NULL; 2424 d->next = NULL;
2425 2425
2426 memcpy(&d->lct_data, &lct->lct_entry[i], sizeof(i2o_lct_entry)); 2426 memcpy(&d->lct_data, &lct->lct_entry[i], sizeof(i2o_lct_entry));
@@ -2967,8 +2967,8 @@ static int adpt_i2o_build_sys_table(void)
2967 sys_tbl->iops[count].frame_size = pHba->status_block->inbound_frame_size; 2967 sys_tbl->iops[count].frame_size = pHba->status_block->inbound_frame_size;
2968 sys_tbl->iops[count].last_changed = sys_tbl_ind - 1; // ?? 2968 sys_tbl->iops[count].last_changed = sys_tbl_ind - 1; // ??
2969 sys_tbl->iops[count].iop_capabilities = pHba->status_block->iop_capabilities; 2969 sys_tbl->iops[count].iop_capabilities = pHba->status_block->iop_capabilities;
2970 sys_tbl->iops[count].inbound_low = (u32)virt_to_bus((void*)pHba->post_port); 2970 sys_tbl->iops[count].inbound_low = (u32)virt_to_bus(pHba->post_port);
2971 sys_tbl->iops[count].inbound_high = (u32)((u64)virt_to_bus((void*)pHba->post_port)>>32); 2971 sys_tbl->iops[count].inbound_high = (u32)((u64)virt_to_bus(pHba->post_port)>>32);
2972 2972
2973 count++; 2973 count++;
2974 } 2974 }