diff options
author | Salyzyn, Mark <mark_salyzyn@adaptec.com> | 2006-01-12 08:31:57 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2006-01-14 11:54:54 -0500 |
commit | 9638d89a75776abc614c29cdeece0cc874ea2a4c (patch) | |
tree | 5d7ac840f1c79e7d0fd48f5df1ba7db7567499f5 /drivers/message | |
parent | 560c26c8345509619c3575331b99b329b5de1054 (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/message')
-rw-r--r-- | drivers/message/i2o/pci.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c index c5b656cdea7c..f23aeea43f62 100644 --- a/drivers/message/i2o/pci.c +++ b/drivers/message/i2o/pci.c | |||
@@ -88,11 +88,6 @@ static int __devinit i2o_pci_alloc(struct i2o_controller *c) | |||
88 | struct device *dev = &pdev->dev; | 88 | struct device *dev = &pdev->dev; |
89 | int i; | 89 | int i; |
90 | 90 | ||
91 | if (pci_request_regions(pdev, OSM_DESCRIPTION)) { | ||
92 | printk(KERN_ERR "%s: device already claimed\n", c->name); | ||
93 | return -ENODEV; | ||
94 | } | ||
95 | |||
96 | for (i = 0; i < 6; i++) { | 91 | for (i = 0; i < 6; i++) { |
97 | /* Skip I/O spaces */ | 92 | /* Skip I/O spaces */ |
98 | if (!(pci_resource_flags(pdev, i) & IORESOURCE_IO)) { | 93 | if (!(pci_resource_flags(pdev, i) & IORESOURCE_IO)) { |
@@ -319,6 +314,11 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev, | |||
319 | return rc; | 314 | return rc; |
320 | } | 315 | } |
321 | 316 | ||
317 | if (pci_request_regions(pdev, OSM_DESCRIPTION)) { | ||
318 | printk(KERN_ERR "i2o: device already claimed\n", c->name); | ||
319 | return -ENODEV; | ||
320 | } | ||
321 | |||
322 | if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { | 322 | if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { |
323 | printk(KERN_WARNING "i2o: no suitable DMA found for %s\n", | 323 | printk(KERN_WARNING "i2o: no suitable DMA found for %s\n", |
324 | pci_name(pdev)); | 324 | pci_name(pdev)); |