linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Greg KH <greg@kroah.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Eric Valette <eric.valette@free.fr>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	"John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, Hin-Tak Leung <hintak.leung@gmail.com>
Subject: Re: DMA debug trace pointing to rtl8187
Date: Sat, 9 May 2009 22:19:39 +0200	[thread overview]
Message-ID: <200905092219.40216.mb@bu3sch.de> (raw)
In-Reply-To: <20090509192959.GA1842@kroah.com>

On Saturday 09 May 2009 21:29:59 Greg KH wrote:
> On Sat, May 09, 2009 at 12:29:27PM -0500, Larry Finger wrote:
> > I think there is a second problem that John's fix does not treat. Although the
> > buffer is removed from the stack, there is no assurance that the buffer obtained
> > with kmalloc() is reachable by DMA. This case will be triggered if the USB
> > adapter does 32-bit DMA and the system has more than 4 GB RAM.

In practice this does not hit, because such systems' kmalloc does not return
memory above 4G (i386) _or_ the DMA mapping functions take care of bounce buffering
or I/O-remapping (should be true for all other arches).
So if the device is able to do DMA with addresses >=32bit it should be fine, provided
it correctly sets the DMA mask.

> Memory returned by kmalloc will always be able to be DMAable.  If not,
> we have lots of problems :)

True for sane devices.
False for devices like Broadcom HND-DMA, which should only be used to slap thy hw engineers.

-- 
Greetings, Michael.

      reply	other threads:[~2009-05-09 20:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <49FDB9F8.3080400@free.fr>
     [not found] ` <20090506133131F.fujita.tomonori@lab.ntt.co.jp>
     [not found]   ` <4A012FC8.3020304@free.fr>
2009-05-06  6:45     ` DMA debug trace pointing to rtl8187 Greg KH
2009-05-06 18:02       ` [RFT] rtl8187: use DMA-aware buffers with usb_control_msg John W. Linville
2009-05-08 23:20         ` Hin-Tak Leung
2009-05-09  9:38           ` Eric Valette
2009-05-09 13:57             ` Greg KH
2009-05-09 15:50               ` John W. Linville
2009-05-09 16:35                 ` Greg KH
2009-05-09 21:24                 ` Larry Finger
2009-05-11 13:20                   ` John W. Linville
2009-05-11 22:23                     ` Hin-Tak Leung
2009-05-06 18:03       ` DMA debug trace pointing to rtl8187 John W. Linville
2009-05-09 17:29       ` Larry Finger
2009-05-09 17:46         ` Eric Valette
2009-05-09 19:22           ` Eric Valette
2009-05-09 19:29         ` Greg KH
2009-05-09 20:19           ` Michael Buesch [this message]

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=200905092219.40216.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=Larry.Finger@lwfinger.net \
    --cc=eric.valette@free.fr \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=greg@kroah.com \
    --cc=hintak.leung@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).