Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195551
b: refs/heads/master
c: fc19317
h: refs/heads/master
i:
  195549: 5b99db8
  195547: 24ba4da
  195543: 97887d2
  195535: e3e6e81
  195519: 45faa97
v: v3
  • Loading branch information
Richard A Lary authored and James Bottomley committed Apr 11, 2010
1 parent 7bed77b commit a788fbc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4644efabde172808c0a8b6e3f17e4c204a4e52e7
refs/heads/master: fc193172e63af2c749e198816a1ee694dd6395e6
23 changes: 13 additions & 10 deletions trunk/drivers/scsi/mpt2sas/mpt2sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,23 +1253,26 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc)
}

for (i = 0, memap_sz = 0, pio_sz = 0 ; i < DEVICE_COUNT_RESOURCE; i++) {
if (pci_resource_flags(pdev, i) & PCI_BASE_ADDRESS_SPACE_IO) {
if (pci_resource_flags(pdev, i) & IORESOURCE_IO) {
if (pio_sz)
continue;
pio_chip = (u64)pci_resource_start(pdev, i);
pio_sz = pci_resource_len(pdev, i);
} else {
if (memap_sz)
continue;
ioc->chip_phys = pci_resource_start(pdev, i);
chip_phys = (u64)ioc->chip_phys;
memap_sz = pci_resource_len(pdev, i);
ioc->chip = ioremap(ioc->chip_phys, memap_sz);
if (ioc->chip == NULL) {
printk(MPT2SAS_ERR_FMT "unable to map adapter "
"memory!\n", ioc->name);
r = -EINVAL;
goto out_fail;
/* verify memory resource is valid before using */
if (pci_resource_flags(pdev, i) & IORESOURCE_MEM) {
ioc->chip_phys = pci_resource_start(pdev, i);
chip_phys = (u64)ioc->chip_phys;
memap_sz = pci_resource_len(pdev, i);
ioc->chip = ioremap(ioc->chip_phys, memap_sz);
if (ioc->chip == NULL) {
printk(MPT2SAS_ERR_FMT "unable to map "
"adapter memory!\n", ioc->name);
r = -EINVAL;
goto out_fail;
}
}
}
}
Expand Down

0 comments on commit a788fbc

Please sign in to comment.