aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/dpt_i2o.c
diff options
context:
space:
mode:
authorSalyzyn, Mark <mark_salyzyn@adaptec.com>2006-01-12 08:31:57 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-14 11:54:54 -0500
commit9638d89a75776abc614c29cdeece0cc874ea2a4c (patch)
tree5d7ac840f1c79e7d0fd48f5df1ba7db7567499f5 /drivers/scsi/dpt_i2o.c
parent560c26c8345509619c3575331b99b329b5de1054 (diff)
[SCSI] I2O: move pci_request_regions() just behind pci_enable_device()
The problem in dpt_i2o could be the pci config space accesses it triggers as it loads, dangerous to do if there is any I/O activity going on in the other driver (probable if a boot driver I guess). I approve this patch to dpt_i2o.c, and am applying it to the Adaptec branch of the driver. Thanks for the investigation Ryoji. --- In linux 2.6.15, data transfer does hang when both dpt_i2o and i2o_block drivers are loaded. It seems that location of pci_request_regions() are wrong. I moved it just behind pci_enable_device() like other drivers, and it becomes fine. Signed-off-by: Ryoji Kamei <kamei@miraclelinux.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r--drivers/scsi/dpt_i2o.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index cdeb30b0462e..6e6b293dcb28 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -899,6 +899,12 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
899 if(pci_enable_device(pDev)) { 899 if(pci_enable_device(pDev)) {
900 return -EINVAL; 900 return -EINVAL;
901 } 901 }
902
903 if (pci_request_regions(pDev, "dpt_i2o")) {
904 PERROR("dpti: adpt_config_hba: pci request region failed\n");
905 return -EINVAL;
906 }
907
902 pci_set_master(pDev); 908 pci_set_master(pDev);
903 if (pci_set_dma_mask(pDev, 0xffffffffffffffffULL) && 909 if (pci_set_dma_mask(pDev, 0xffffffffffffffffULL) &&
904 pci_set_dma_mask(pDev, 0xffffffffULL)) 910 pci_set_dma_mask(pDev, 0xffffffffULL))
@@ -924,10 +930,6 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
924 raptorFlag = TRUE; 930 raptorFlag = TRUE;
925 } 931 }
926 932
927 if (pci_request_regions(pDev, "dpt_i2o")) {
928 PERROR("dpti: adpt_config_hba: pci request region failed\n");
929 return -EINVAL;
930 }
931 base_addr_virt = ioremap(base_addr0_phys,hba_map0_area_size); 933 base_addr_virt = ioremap(base_addr0_phys,hba_map0_area_size);
932 if (!base_addr_virt) { 934 if (!base_addr_virt) {
933 pci_release_regions(pDev); 935 pci_release_regions(pDev);