All of lore.kernel.org
 help / color / mirror / Atom feed
From: Domen Puncer <domen.puncer@telargo.com>
To: Dale Farnsworth <dale@farnsworth.org>
Cc: netdev@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH v4] FEC - fast ethernet controller for mpc52xx
Date: Thu, 25 Oct 2007 21:41:14 +0200	[thread overview]
Message-ID: <20071025194114.GH3369@nd47.coderock.org> (raw)
In-Reply-To: <20071025185706.29496.qmail@farnsworth.org>

On 25/10/07 11:57 -0700, Dale Farnsworth wrote:
> Domen wrote:
> > > use your platform's dma mapping functions, rather than virt_to_phys()
> > > 
> > > it might be the exact same implementation, inside the platform 
> > > internals, but drivers should not be using this directly.
> > 
> > I've replaced this with dma_map_single(), unmatched with
> > dma_unmap_single(), since bestcomm doesn't have a way to do that
> > and it's blank on ppc32 anyway.
> > 
> > Is this OK? PPC guys?
> 
> Even though dma_unmap_single() may be a no-op, calls to
> dma_map_single() must be matched with calls to dma_unmap_single().
> 
> Perhaps with the additions below:
> 
> > +static void mpc52xx_fec_free_rx_buffers(struct bcom_task *s)
> > +{
> > +	struct sk_buff *skb;
> > +
> > +	while (!bcom_queue_empty(s)) {
> > +		skb = bcom_retrieve_buffer(s, NULL, NULL);
> 
> 		dma_unmap_single(&skb->dev->dev, skb-data,
> 				 FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE);

It looks to me like dma_unmap_single takes the mapped address
(what dma_map_single returned), and not the address we're mapping
(skb->data).


	Domen

  reply	other threads:[~2007-10-25 19:41 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-14  7:55 [PATCH v3 0/4] FEC - fast ethernet controller for mpc52xx Domen Puncer
2007-10-14  7:55 ` Domen Puncer
2007-10-14  7:57 ` [PATCH v3 1/4] FEC mpc52xx: device tree changes Domen Puncer
2007-10-14  7:58 ` [PATCH v3 2/4] FEC mpc52xx: add some bestcomm flags Domen Puncer
2007-10-14  7:59 ` [PATCH v3 3/4] FEC mpc52xx: the driver Domen Puncer
2007-10-14 21:43   ` Grant Likely
2007-10-14 21:43     ` Grant Likely
2007-10-14  7:59 ` [PATCH v3 4/4] FEC mpc52xx: phy part of " Domen Puncer
2007-10-14 22:05   ` Grant Likely
2007-10-14 22:05     ` Grant Likely
2007-10-15 10:56     ` [PATCH v3 4/4] FEC mpc52xx: phy part of the driver\ Domen Puncer
2007-10-15 10:56       ` Domen Puncer
2007-10-15 14:30       ` Grant Likely
2007-10-15 14:30         ` Grant Likely
2007-10-15 19:06 ` [PATCH v3 0/4] FEC - fast ethernet controller for mpc52xx Jeff Garzik
2007-10-15 19:06   ` Jeff Garzik
2007-10-15 19:19   ` Grant Likely
2007-10-15 19:19     ` Grant Likely
2007-10-18 14:15   ` Grant Likely
2007-10-18 14:15     ` Grant Likely
2007-10-18 19:14     ` Jeff Garzik
2007-10-18 19:14       ` Jeff Garzik
2007-10-19 11:27       ` [PATCH v4] " Domen Puncer
2007-10-19 11:27         ` Domen Puncer
2007-10-21 18:32         ` Grant Likely
2007-10-21 18:32           ` Grant Likely
2007-10-25  9:29         ` Jeff Garzik
2007-10-25  9:29           ` Jeff Garzik
2007-10-25 14:10           ` Domen Puncer
2007-10-25 14:10             ` Domen Puncer
2007-10-25 18:57             ` Dale Farnsworth
2007-10-25 19:41               ` Domen Puncer [this message]
2007-10-25 20:29                 ` Dale Farnsworth
2007-10-25 22:46                   ` Jeff Garzik
2007-10-25 22:46                     ` Jeff Garzik
2007-10-25 23:50                   ` Stephen Hemminger
2007-10-25 23:50                     ` Stephen Hemminger
2007-10-26 11:59                   ` [PATCH v4.2] " Domen Puncer
2007-10-26 11:59                     ` Domen Puncer
2007-10-26 14:18                     ` Dale Farnsworth
2007-10-26 14:18                       ` Dale Farnsworth
2007-10-26 16:07                       ` [PATCH v4.3] " Domen Puncer
2007-10-26 16:07                         ` Domen Puncer
2007-10-29  9:59                         ` Jeff Garzik
2007-10-29  9:59                           ` Jeff Garzik
2007-10-29 15:37                           ` Grant Likely
2007-10-29 15:37                             ` Grant Likely
2007-11-01 11:31             ` [PATCH v4] " tnt

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=20071025194114.GH3369@nd47.coderock.org \
    --to=domen.puncer@telargo.com \
    --cc=dale@farnsworth.org \
    --cc=linuxppc-dev@ozlabs.org \
    --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.