From: David Brownell <david-b@pacbell.net>
To: mru@users.sourceforge.net, Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: USB and DMA on Alpha with 2.6.0-test7
Date: Fri, 10 Oct 2003 12:43:24 -0700 [thread overview]
Message-ID: <3F870BDC.8090806@pacbell.net> (raw)
In-Reply-To: <3F86E9D7.9020104@pacbell.net>
[-- Attachment #1: Type: text/plain, Size: 469 bytes --]
David Brownell wrote:
> The BUG_ON at include/asm-generic/dma-mapping.h:19 is a
> bug in that "generic DMA" code ... and I've seen the
> same BUG reported from PPC folk too.
Something like this should be correct even on x86, but
there may be some cases where a platform_dma_supported()
is necessary.
IMO this needs an all-architectures patch. Not many
will need a platform_dma_supported() ... but almost
every implementation of that simple call is broken.
- Dave
[-- Attachment #2: Diff.dma --]
[-- Type: text/plain, Size: 589 bytes --]
--- 1.4/include/asm-generic/dma-mapping.h Mon Jan 13 14:37:47 2003
+++ edited/include/asm-generic/dma-mapping.h Fri Oct 10 10:53:25 2003
@@ -13,12 +13,13 @@
/* need struct page definitions */
#include <linux/mm.h>
+/* FIXME use this everywhere there's no platform_dma_supported() */
static inline int
dma_supported(struct device *dev, u64 mask)
{
- BUG_ON(dev->bus != &pci_bus_type);
-
- return pci_dma_supported(to_pci_dev(dev), mask);
+ /* device can dma, using those address bits */
+ return dev->dma_mask
+ && (mask & *dev->dma_mask) == *dev->dma_mask;
}
static inline int
next prev parent reply other threads:[~2003-10-10 19:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-10 17:18 USB and DMA on Alpha with 2.6.0-test7 David Brownell
2003-10-10 18:19 ` Ivan Kokshaysky
2003-10-10 18:45 ` Måns Rullgård
2003-10-10 18:59 ` Ivan Kokshaysky
2003-10-10 20:15 ` David Brownell
2003-10-10 19:43 ` David Brownell [this message]
2003-10-11 13:27 ` Ivan Kokshaysky
2003-10-11 16:26 ` David Brownell
2003-10-11 23:03 ` David Brownell
-- strict thread matches above, loose matches on Subject: below --
2003-10-10 9:22 Måns Rullgård
2003-10-10 10:47 ` Ivan Kokshaysky
2003-10-10 11:38 ` Måns Rullgård
2003-10-10 13:31 ` Jamie Lokier
2003-10-10 13:41 ` Ivan Kokshaysky
2003-10-10 16:41 ` Måns Rullgård
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=3F870BDC.8090806@pacbell.net \
--to=david-b@pacbell.net \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mru@users.sourceforge.net \
/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.