[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150628.202512.1928117925744597073.davem@davemloft.net>
Date: Sun, 28 Jun 2015 20:25:12 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: mschmidt@...hat.com
Cc: netdev@...r.kernel.org, krisman@...ux.vnet.ibm.com,
Yuval.Mintz@...gic.com, Ariel.Elior@...gic.com
Subject: Re: [PATCH net] bnx2x: fix DMA API usage
From: Michal Schmidt <mschmidt@...hat.com>
Date: Fri, 26 Jun 2015 17:50:00 +0200
> With CONFIG_DMA_API_DEBUG=y bnx2x triggers the error "DMA-API: device
> driver frees DMA memory with wrong function".
> On archs where PAGE_SIZE > SGE_PAGE_SIZE it also triggers "DMA-API:
> device driver frees DMA memory with different size".
>
> Fix this by making the mapping and unmapping symmetric:
> - Do not map the whole pool page at once. Instead map the
> SGE_PAGE_SIZE-sized pieces individually, so they can be unmapped in
> the same manner.
> - What's mapped using dma_map_page() must be unmapped using
> dma_unmap_page().
>
> Tested on ppc64.
>
> Fixes: 4cace675d687 ("bnx2x: Alloc 4k fragment for each rx ring buffer element")
> Signed-off-by: Michal Schmidt <mschmidt@...hat.com>
Applied, thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists