diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/cciss.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 4e5441baa49d..219c530c8da0 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -3265,12 +3265,21 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) | |||
3265 | */ | 3265 | */ |
3266 | cciss_interrupt_mode(c, pdev, board_id); | 3266 | cciss_interrupt_mode(c, pdev, board_id); |
3267 | 3267 | ||
3268 | /* | 3268 | /* find the memory BAR */ |
3269 | * Memory base addr is first addr , the second points to the config | 3269 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { |
3270 | * table | 3270 | if (pci_resource_flags(pdev, i) & IORESOURCE_MEM) |
3271 | */ | 3271 | break; |
3272 | } | ||
3273 | if (i == DEVICE_COUNT_RESOURCE) { | ||
3274 | printk(KERN_WARNING "cciss: No memory BAR found\n"); | ||
3275 | err = -ENODEV; | ||
3276 | goto err_out_free_res; | ||
3277 | } | ||
3278 | |||
3279 | c->paddr = pci_resource_start(pdev, i); /* addressing mode bits | ||
3280 | * already removed | ||
3281 | */ | ||
3272 | 3282 | ||
3273 | c->paddr = pci_resource_start(pdev, 0); /* addressing mode bits already removed */ | ||
3274 | #ifdef CCISS_DEBUG | 3283 | #ifdef CCISS_DEBUG |
3275 | printk("address 0 = %lx\n", c->paddr); | 3284 | printk("address 0 = %lx\n", c->paddr); |
3276 | #endif /* CCISS_DEBUG */ | 3285 | #endif /* CCISS_DEBUG */ |