All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: bcm43xx-dev@lists.berlios.de
Cc: John Linville <linville@tuxdriver.com>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] ssb, b43, b43legacy, b44: Rewrite SSB DMA API
Date: Fri, 20 Jun 2008 12:41:12 +0200	[thread overview]
Message-ID: <200806201241.12344.mb@bu3sch.de> (raw)
In-Reply-To: <200806201150.29497.mb@bu3sch.de>

On Friday 20 June 2008 11:50:29 Michael Buesch wrote:
> This is a rewrite of the DMA API for SSB devices.
> This is needed, because the old (non-existing) "API" made too many bad
> assumptions on the API of the host-bus (PCI).
> This introduces an almost complete SSB-DMA-API that maps to the lowlevel
> bus-API based on the bustype.
> 
> Signed-off-by: Michael Buesch <mb@bu3sch.de>
> 
> ---
> 
> John, please merge for 2.6.27
> This is one huge patch, because it's not really possible to split this
> without breaking bisect.

Note that this patch will slightly clash with another DMA update
that's going into linux-next.
This is trivial to resolve, however. wiggle will probably be able to
resolve most, if not all, of them.

>  static bool b43_dma_mapping_error(struct b43_dmaring *ring,
>  				  dma_addr_t addr,
>  				  size_t buffersize, bool dma_to_device)
>  {
> -	if (unlikely(dma_mapping_error(addr)))
> +	if (unlikely(ssb_dma_mapping_error(ring->dev->dev, addr)))
>  		return 1;


These calls will clash. The patch in linux-next introduced an additional
dev parameter to dma_mapping_error.
The fix is obvious. Remove the clashing line and add the ssb_dma_mapping_error
call exactly as shown above.

> +static inline int ssb_dma_mapping_error(struct ssb_device *dev, dma_addr_t addr)
> +{
> +	switch (dev->bus->bustype) {
> +	case SSB_BUSTYPE_PCI:
> +		return pci_dma_mapping_error(addr);
> +	case SSB_BUSTYPE_SSB:
> +		return dma_mapping_error(addr);
> +	default:
> +		__ssb_dma_not_implemented(dev);
> +	}
> +	return -ENOSYS;
> +}


The patch in linux-next will require a dev parameter to the lowlevel
functions. Simply do it this way:

pci_dma_mapping_error(dev->bus->host_pci, addr);

and

dma_mapping_error(dev->dev, addr);

-- 
Greetings Michael.

  reply	other threads:[~2008-06-20 10:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-20  9:50 [PATCH] ssb, b43, b43legacy, b44: Rewrite SSB DMA API Michael Buesch
2008-06-20 10:41 ` Michael Buesch [this message]
2008-06-21  0:05 ` Larry Finger
2008-06-21  9:30   ` Michael Buesch
2008-07-03 16:30 ` Felipe Maya
2008-07-03 20:52   ` Michael Buesch
2008-07-03 21:07     ` Michael Buesch
2008-07-08 15:58     ` Steve Brown
2008-07-08 17:04       ` Michael Buesch

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=200806201241.12344.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=bcm43xx-dev@lists.berlios.de \
    --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 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.