lkml.org 
[lkml]   [2006]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 2 of 13] ipath - set up 32-bit DMA mask if 64-bit setup fails
    Date
    From
    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>

    diff -r 61819d2519e0 -r 1906950392f7 drivers/infiniband/hw/ipath/ipath_driver.c
    --- a/drivers/infiniband/hw/ipath/ipath_driver.c Wed Apr 19 15:24:36 2006 -0700
    +++ b/drivers/infiniband/hw/ipath/ipath_driver.c Wed Apr 19 15:24:36 2006 -0700
    @@ -418,9 +418,19 @@ static int __devinit ipath_init_one(stru

    ret = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
    if (ret) {
    - dev_info(&pdev->dev, "pci_set_dma_mask unit %u "
    - "fails: %d\n", dd->ipath_unit, ret);
    - goto bail_regions;
    + /*
    + * if the 64 bit setup fails, try 32 bit. Some systems
    + * do not setup 64 bit maps on systems with 2GB or less
    + * memory installed.
    + */
    + ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
    + if (ret) {
    + dev_info(&pdev->dev, "pci_set_dma_mask unit %u "
    + "fails: %d\n", dd->ipath_unit, ret);
    + goto bail_regions;
    + }
    + else
    + ipath_dbg("No 64bit DMA mask, used 32 bit mask\n");
    }

    pci_set_master(pdev);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2006-04-24 23:32    [W:4.117 / U:0.128 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site