All of lore.kernel.org
 help / color / mirror / Atom feed
From: Serafeim Zanikolas <sez@debian.org>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	herton@mandriva.com.br, joe@perches.com, davem@davemloft.net,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: rtl818x: request DMA-able memory
Date: Mon, 25 Oct 2010 19:44:20 +0200	[thread overview]
Message-ID: <20101025174420.GA3425@mobee> (raw)
In-Reply-To: <20101025142232.GC2414@tuxdriver.com>

On Mon, Oct 25, 2010 at 10:22:32AM -0400, John W. Linville wrote:
> On Mon, Oct 25, 2010 at 03:11:22PM +0100, Hin-Tak Leung wrote:
> > 
> > 
> > Larry Finger wrote:
> > >On 10/24/2010 03:32 PM, Serafeim Zanikolas wrote:
> > >>Despite the indicated intention in comment, the kmalloc() call was not
> > >>explicitly requesting memory from ZONE_DMA.
> > >>
> > >>Signed-off-by: Serafeim Zanikolas <sez@debian.org>
> > >>---
> > >> drivers/net/wireless/rtl818x/rtl8187_dev.c |    3 ++-
> > >> 1 files changed, 2 insertions(+), 1 deletions(-)
> > >>
> > >>diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
> > >>index 38fa824..771794d 100644
> > >>--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
> > >>+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
> > >>@@ -1343,7 +1343,8 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
> > >> 	priv->is_rtl8187b = (id->driver_info == DEVICE_RTL8187B);
> > >> 	/* allocate "DMA aware" buffer for register accesses */
> > >>-	priv->io_dmabuf = kmalloc(sizeof(*priv->io_dmabuf), GFP_KERNEL);
> > >>+	priv->io_dmabuf = kmalloc(sizeof(*priv->io_dmabuf),
> > >>+				  GFP_DMA | GFP_KERNEL);
> > >> 	if (!priv->io_dmabuf) {
> > >> 		err = -ENOMEM;
> > >> 		goto err_free_dev;
> > >
> > >ACK.
> > >
> > >Larry
> > 
> > Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
> > 
> > I had a quick look for similiar constructs and AFAIK only the
> > b43/b43legacy drivers uses DMA buffers. Seems to be a rare practice.
> > Is that something we should or should not do?
> 
> It doesn't mean what you think it means.  It is a relic of the past,
> used to indicate memory below 16MB so that ISA devices could do DMA.

Right. Sorry for the noise.

-S

  parent reply	other threads:[~2010-10-25 17:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-24 20:32 [PATCH] drivers: rtl818x: request DMA-able memory Serafeim Zanikolas
2010-10-25 13:24 ` Larry Finger
2010-10-25 14:11   ` Hin-Tak Leung
2010-10-25 14:22     ` John W. Linville
2010-10-25 15:39       ` Hin-Tak Leung
2010-10-25 18:01         ` Larry Finger
2010-10-25 18:01           ` Larry Finger
2010-10-25 17:44       ` Serafeim Zanikolas [this message]
2010-10-25 14:23     ` Johannes Berg
2010-10-25 13:35 ` John W. Linville
  -- strict thread matches above, loose matches on Subject: below --
2010-10-24 20:32 Serafeim Zanikolas

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=20101025174420.GA3425@mobee \
    --to=sez@debian.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=davem@davemloft.net \
    --cc=herton@mandriva.com.br \
    --cc=htl10@users.sourceforge.net \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@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.