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.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index bbe346bd3cb8..7235f94f1191 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -382,7 +382,6 @@ static int adpt_queue(struct scsi_cmnd * cmd, void (*done) (struct scsi_cmnd *))
382{ 382{
383 adpt_hba* pHba = NULL; 383 adpt_hba* pHba = NULL;
384 struct adpt_device* pDev = NULL; /* dpt per device information */ 384 struct adpt_device* pDev = NULL; /* dpt per device information */
385 ulong timeout = jiffies + (TMOUT_SCSI*HZ);
386 385
387 cmd->scsi_done = done; 386 cmd->scsi_done = done;
388 /* 387 /*
@@ -418,11 +417,6 @@ static int adpt_queue(struct scsi_cmnd * cmd, void (*done) (struct scsi_cmnd *))
418 return 1; 417 return 1;
419 } 418 }
420 419
421 if(cmd->eh_state != SCSI_STATE_QUEUED){
422 // If we are not doing error recovery
423 mod_timer(&cmd->eh_timeout, timeout);
424 }
425
426 // TODO if the cmd->device if offline then I may need to issue a bus rescan 420 // TODO if the cmd->device if offline then I may need to issue a bus rescan
427 // followed by a get_lct to see if the device is there anymore 421 // followed by a get_lct to see if the device is there anymore
428 if((pDev = (struct adpt_device*) (cmd->device->hostdata)) == NULL) { 422 if((pDev = (struct adpt_device*) (cmd->device->hostdata)) == NULL) {
@@ -913,9 +907,13 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
913 raptorFlag = TRUE; 907 raptorFlag = TRUE;
914 } 908 }
915 909
916 910 if (pci_request_regions(pDev, "dpt_i2o")) {
911 PERROR("dpti: adpt_config_hba: pci request region failed\n");
912 return -EINVAL;
913 }
917 base_addr_virt = ioremap(base_addr0_phys,hba_map0_area_size); 914 base_addr_virt = ioremap(base_addr0_phys,hba_map0_area_size);
918 if (!base_addr_virt) { 915 if (!base_addr_virt) {
916 pci_release_regions(pDev);
919 PERROR("dpti: adpt_config_hba: io remap failed\n"); 917 PERROR("dpti: adpt_config_hba: io remap failed\n");
920 return -EINVAL; 918 return -EINVAL;
921 } 919 }
@@ -925,6 +923,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
925 if (!msg_addr_virt) { 923 if (!msg_addr_virt) {
926 PERROR("dpti: adpt_config_hba: io remap failed on BAR1\n"); 924 PERROR("dpti: adpt_config_hba: io remap failed on BAR1\n");
927 iounmap(base_addr_virt); 925 iounmap(base_addr_virt);
926 pci_release_regions(pDev);
928 return -EINVAL; 927 return -EINVAL;
929 } 928 }
930 } else { 929 } else {
@@ -938,6 +937,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
938 iounmap(msg_addr_virt); 937 iounmap(msg_addr_virt);
939 } 938 }
940 iounmap(base_addr_virt); 939 iounmap(base_addr_virt);
940 pci_release_regions(pDev);
941 return -ENOMEM; 941 return -ENOMEM;
942 } 942 }
943 memset(pHba, 0, sizeof(adpt_hba)); 943 memset(pHba, 0, sizeof(adpt_hba));
@@ -1033,6 +1033,7 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba)
1033 up(&adpt_configuration_lock); 1033 up(&adpt_configuration_lock);
1034 1034
1035 iounmap(pHba->base_addr_virt); 1035 iounmap(pHba->base_addr_virt);
1036 pci_release_regions(pHba->pDev);
1036 if(pHba->msg_addr_virt != pHba->base_addr_virt){ 1037 if(pHba->msg_addr_virt != pHba->base_addr_virt){
1037 iounmap(pHba->msg_addr_virt); 1038 iounmap(pHba->msg_addr_virt);
1038 } 1039 }