diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-08-17 09:37:55 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-08-17 09:37:55 -0400 |
commit | 327b6b08d6ab3bf5488120ba02ed2fe06b09efe6 (patch) | |
tree | 592b0ebc2f5f18dac0bdc0fd6ba87d2c8b07b232 /drivers/scsi/dpt_i2o.c | |
parent | c973b112c76c9d8fd042991128f218a738cc8d0a (diff) | |
parent | 2ad56496627630ebc99f06af5f81ca23e17e014e (diff) |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index e2370529c632..7235f94f1191 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -907,9 +907,13 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev | |||
907 | raptorFlag = TRUE; | 907 | raptorFlag = TRUE; |
908 | } | 908 | } |
909 | 909 | ||
910 | 910 | if (pci_request_regions(pDev, "dpt_i2o")) { | |
911 | PERROR("dpti: adpt_config_hba: pci request region failed\n"); | ||
912 | return -EINVAL; | ||
913 | } | ||
911 | base_addr_virt = ioremap(base_addr0_phys,hba_map0_area_size); | 914 | base_addr_virt = ioremap(base_addr0_phys,hba_map0_area_size); |
912 | if (!base_addr_virt) { | 915 | if (!base_addr_virt) { |
916 | pci_release_regions(pDev); | ||
913 | PERROR("dpti: adpt_config_hba: io remap failed\n"); | 917 | PERROR("dpti: adpt_config_hba: io remap failed\n"); |
914 | return -EINVAL; | 918 | return -EINVAL; |
915 | } | 919 | } |
@@ -919,6 +923,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev | |||
919 | if (!msg_addr_virt) { | 923 | if (!msg_addr_virt) { |
920 | PERROR("dpti: adpt_config_hba: io remap failed on BAR1\n"); | 924 | PERROR("dpti: adpt_config_hba: io remap failed on BAR1\n"); |
921 | iounmap(base_addr_virt); | 925 | iounmap(base_addr_virt); |
926 | pci_release_regions(pDev); | ||
922 | return -EINVAL; | 927 | return -EINVAL; |
923 | } | 928 | } |
924 | } else { | 929 | } else { |
@@ -932,6 +937,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev | |||
932 | iounmap(msg_addr_virt); | 937 | iounmap(msg_addr_virt); |
933 | } | 938 | } |
934 | iounmap(base_addr_virt); | 939 | iounmap(base_addr_virt); |
940 | pci_release_regions(pDev); | ||
935 | return -ENOMEM; | 941 | return -ENOMEM; |
936 | } | 942 | } |
937 | memset(pHba, 0, sizeof(adpt_hba)); | 943 | memset(pHba, 0, sizeof(adpt_hba)); |
@@ -1027,6 +1033,7 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba) | |||
1027 | up(&adpt_configuration_lock); | 1033 | up(&adpt_configuration_lock); |
1028 | 1034 | ||
1029 | iounmap(pHba->base_addr_virt); | 1035 | iounmap(pHba->base_addr_virt); |
1036 | pci_release_regions(pHba->pDev); | ||
1030 | if(pHba->msg_addr_virt != pHba->base_addr_virt){ | 1037 | if(pHba->msg_addr_virt != pHba->base_addr_virt){ |
1031 | iounmap(pHba->msg_addr_virt); | 1038 | iounmap(pHba->msg_addr_virt); |
1032 | } | 1039 | } |