diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2006-04-24 17:22:58 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-05-01 15:14:12 -0400 |
commit | 68dd43a162b43218d2e5ac1d139c1d53da965f54 (patch) | |
tree | 5c21df89d9b154b287cc340a5ac4be97d1a61e3f /drivers | |
parent | 755e4ca4a9885b79a14169ab5b615920eb38a32a (diff) |
IB/ipath: set up 32-bit DMA mask if 64-bit setup fails
Some systems do not set up 64-bit maps on systems with 2GB or less of
memory installed, so we have to fall back to trying a 32-bit setup.
Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_driver.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index e7617c3982ea..7ff95b72d1fc 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -418,9 +418,19 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
418 | 418 | ||
419 | ret = pci_set_dma_mask(pdev, DMA_64BIT_MASK); | 419 | ret = pci_set_dma_mask(pdev, DMA_64BIT_MASK); |
420 | if (ret) { | 420 | if (ret) { |
421 | dev_info(&pdev->dev, "pci_set_dma_mask unit %u " | 421 | /* |
422 | "fails: %d\n", dd->ipath_unit, ret); | 422 | * if the 64 bit setup fails, try 32 bit. Some systems |
423 | goto bail_regions; | 423 | * do not setup 64 bit maps on systems with 2GB or less |
424 | * memory installed. | ||
425 | */ | ||
426 | ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | ||
427 | if (ret) { | ||
428 | dev_info(&pdev->dev, "pci_set_dma_mask unit %u " | ||
429 | "fails: %d\n", dd->ipath_unit, ret); | ||
430 | goto bail_regions; | ||
431 | } | ||
432 | else | ||
433 | ipath_dbg("No 64bit DMA mask, used 32 bit mask\n"); | ||
424 | } | 434 | } |
425 | 435 | ||
426 | pci_set_master(pdev); | 436 | pci_set_master(pdev); |