All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evan Lavelle <sa212+lkml@cyconix.com>
To: linux-kernel@vger.kernel.org
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: Re: Driver: PCIe: 'pci_map_sg' returning invalid bus address?
Date: Wed, 04 Aug 2010 12:22:32 +0100	[thread overview]
Message-ID: <4C594D78.6090407@cyconix.com> (raw)
In-Reply-To: <20100804190808D.fujita.tomonori@lab.ntt.co.jp>

FUJITA Tomonori wrote:
>> Made some progress here. The problem is that this is 32-bit PAE kernel, 
>> so 'dma_addr_t' is 64-bit. However, I have a 32-bit PCIe card, so I need 
>> a 32-bit dma_addr_t. How do I do this? In other words, how do I handle 
>> 32-bit PCI cards on PAE or 64-bit systems? My code sets the DMA mask to 
>> 32 bits but this is *not* sufficient:
>>
>> pci_set_dma_mask(my_dev, DMA_32BIT_MASK)
> 
> It doesn't work on x86_32 kernel if your driver doesn't work with the
> block layer or the network subsystem.

Sorry, not sure that I understand this. Are you saying that I can't set 
a DMA mask on x86_32 unless I have a block or network driver?

> If your driver can't handle 64bit DMA, you need bounce buffer. 

The problem is not that I can't handle 64-bit DMA in the driver, but 
that the PCI card can't do 64-bit DMA. I tell the kernel this by calling 
'pci_set_dma_mask' with a 32-bit mask, but it appears to be ignoring my 
request and then giving me a 64-bit dma_addr_t for the 32-bit PCI card.

Thanks -

Evan

  reply	other threads:[~2010-08-04 11:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 10:13 Driver: PCIe: 'pci_map_sg' returning invalid bus address? Evan Lavelle
2010-08-04  9:26 ` Evan Lavelle
2010-08-04 10:08   ` FUJITA Tomonori
2010-08-04 11:22     ` Evan Lavelle [this message]
2010-08-04 12:03       ` FUJITA Tomonori
2010-08-04 14:51         ` Konrad Rzeszutek Wilk
2010-08-13  1:35           ` Yuhong Bao
2010-08-14 15:25 ` Evan Lavelle
2010-08-16  3:31   ` Robert Hancock

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=4C594D78.6090407@cyconix.com \
    --to=sa212+lkml@cyconix.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.