mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Bryan O'Sullivan" <bos@pathscale.com>
To: rdreier@cisco.com
Cc: openib-general@openib.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2 of 13] ipath - set up 32-bit DMA mask if 64-bit setup fails
Date: Mon, 24 Apr 2006 14:22:58 -0700	[thread overview]
Message-ID: <1906950392f7ef8c7d07.1145913778@eng-12.pathscale.com> (raw)
In-Reply-To: <patchbomb.1145913776@eng-12.pathscale.com>

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);

  parent reply	other threads:[~2006-04-24 21:29 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-24 21:22 [PATCH 0 of 13] ipath - various fixes and cleanups Bryan O'Sullivan
2006-04-24 21:22 ` [PATCH 1 of 13] ipath - fix race with exposing reset file Bryan O'Sullivan
2006-04-24 21:22 ` Bryan O'Sullivan [this message]
2006-05-01 18:47   ` [PATCH 2 of 13] ipath - set up 32-bit DMA mask if 64-bit setup fails Roland Dreier
2006-05-01 19:56     ` Segher Boessenkool
2006-05-01 21:41       ` Roland Dreier
2006-05-01 23:13         ` Segher Boessenkool
2006-05-01 23:27           ` [openib-general] " Roland Dreier
2006-05-02  0:13             ` Segher Boessenkool
2006-05-02  0:18               ` Roland Dreier
2006-04-24 21:22 ` [PATCH 3 of 13] ipath - iterate over correct number of ports during reset Bryan O'Sullivan
2006-04-24 21:23 ` [PATCH 4 of 13] ipath - change handling of PIO buffers Bryan O'Sullivan
2006-04-25  9:32   ` Segher Boessenkool
2006-04-24 21:23 ` [PATCH 5 of 13] ipath - use proper address translation routine Bryan O'Sullivan
2006-05-01 18:50   ` Roland Dreier
2006-05-01 18:54     ` Arjan van de Ven
2006-05-01 19:00       ` Roland Dreier
2006-05-01 19:20         ` Arjan van de Ven
2006-05-01 19:28           ` Roland Dreier
2006-05-02 13:35         ` Christoph Hellwig
2006-05-02 14:24           ` Roland Dreier
2006-05-02 14:27             ` Christoph Hellwig
2006-05-02 14:55             ` Alan Cox
2006-05-02 14:58               ` Roland Dreier
2006-05-01 19:03     ` Bryan O'Sullivan
2006-04-24 21:23 ` [PATCH 6 of 13] ipath - fix verbs registration Bryan O'Sullivan
2006-04-24 21:23 ` [PATCH 7 of 13] ipath - prevent hardware from being accessed during reset Bryan O'Sullivan
2006-04-24 21:23 ` [PATCH 8 of 13] ipath - fix a number of RC protocol bugs Bryan O'Sullivan
2006-04-25  7:56   ` Andrew Morton
2006-05-01 17:22     ` Roland Dreier
2006-05-01 17:34       ` Bryan O'Sullivan
2006-04-24 21:23 ` [PATCH 9 of 13] ipath - simplify RC send posting Bryan O'Sullivan
2006-04-24 21:23 ` [PATCH 10 of 13] ipath - simplify IB timer usage Bryan O'Sullivan
2006-04-24 21:23 ` [PATCH 11 of 13] ipath - improve sparse annotation Bryan O'Sullivan
2006-04-24 21:23 ` [PATCH 12 of 13] ipath - fix label name in interrupt handler Bryan O'Sullivan
2006-04-24 21:23 ` [PATCH 13 of 13] ipath - tidy up white space in a few files Bryan O'Sullivan
2006-05-01 19:17   ` Roland Dreier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1906950392f7ef8c7d07.1145913778@eng-12.pathscale.com \
    --to=bos@pathscale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openib-general@openib.org \
    --cc=rdreier@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome