public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: default values for pci dma_mask and coherent_dma_mask
Date: Sun, 31 Jul 2005 12:36:07 +0200	[thread overview]
Message-ID: <42ECA997.8020908@colorfullife.com> (raw)

Hi,

 From Documentation/DMA-mapping.txt:

> pci_alloc_consistent() by default will return 32-bit DMA addresses.
> PCI-X specification requires PCI-X devices to support 64-bit
> addressing (DAC) for all transactions. And at least one platform (SGI
> SN2) requires 64-bit consistent allocations to operate correctly when
> the IO bus is in PCI-X mode. Therefore, like with pci_set_dma_mask(),
> it's good practice to call pci_set_consistent_dma_mask() to set the
> appropriate mask even if your device only supports 32-bit DMA
> (default) and especially if it's a PCI-X device.

What does "good practice" mean? Is the default 32-bit on all archs or not?
Recent nForce nics support 32-bit for the (coherent) ring buffer and 
40-bit for the rx/tx data buffers. I intend to add these lines to the 
driver:

+    if (pci_set_dma_mask(pci_dev, 0x0000007fffffffffULL)) {
+         printk(KERN_INFO "forcedeth: 64-bit DMA failed, using 32-bit 
addressing for device %s.\n",
+                            pci_name(pci_dev));
+   }

Is this sufficient, or is it mandatory to add 
pci_set_dma_mask(,DMA_32BIT_MASK) and pci_set_consistent_dma_mask (with 
error handling - IMHO 10 useless lines).

--
    Manfred


             reply	other threads:[~2005-07-31 10:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-31 10:36 Manfred Spraul [this message]
2005-07-31 18:37 ` default values for pci dma_mask and coherent_dma_mask Lee Revell

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=42ECA997.8020908@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=linux-kernel@vger.kernel.org \
    /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