REGRESSION in 6.0-rc7 caused by patch "ARM/dma-mapping: use dma-direct unconditionally"

Marek Behún kabel at kernel.org
Tue Oct 4 05:36:42 PDT 2022


On Tue, 4 Oct 2022 10:08:15 +0100
"Russell King (Oracle)" <linux at armlinux.org.uk> wrote:

> On Tue, Oct 04, 2022 at 10:30:40AM +0200, Marcin Wojtas wrote:
> > Thanks for the explanation and I agree with your reasoning. Therefore
> > the below should be sufficient if we use HW BM and non-coherent
> > setting:
> > 
> > --- a/drivers/net/ethernet/marvell/mvneta_bm.c
> > +++ b/drivers/net/ethernet/marvell/mvneta_bm.c
> > @@ -103,7 +103,7 @@ int mvneta_bm_construct(struct hwbm_pool
> > *hwbm_pool, void *buf)
> >          */
> >         *(u32 *)buf = (u32)buf;
> >         phys_addr = dma_map_single(&priv->pdev->dev, buf, bm_pool->buf_size,
> > -                                  DMA_FROM_DEVICE);
> > +                                  DMA_BIDIRECTIONAL);
> >         if (unlikely(dma_mapping_error(&priv->pdev->dev, phys_addr)))
> >                 return -ENOMEM;
> > 
> > Marek - can you please confirm that?  
> 
> This is insufficient. Marek's patch is the correct version.
> 
> The DMA API requires that the direction argument is the same for
> mapping, unmapping and syncing a region.

And now I am wondering about whether this didn't also cause the buffer
manager not working on Armada 3720. Marvell just gave an erratum that
HWBM is broken on 3720, but maybe they didn't notice this and just gave
up.

Also mvneta works only with one CPU on 3720 (see usage of
pp->neta_armada3700 in mvneta.c), which I also still don't know why,
and maybe it is related to this.

Marek



More information about the linux-arm-kernel mailing list