[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180819.195505.1988137313680465320.davem@davemloft.net>
Date: Sun, 19 Aug 2018 19:55:05 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: brian.brooks@...aro.org
Cc: antoine.tenart@...tlin.com, maxime.chevallier@...tlin.com,
ymarkman@...vell.com, stefanc@...vell.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, bjorn.topel@...el.com,
brian.brooks@....com
Subject: Re: [PATCH] net: mvpp2: avoid bouncing buffers
From: Brian Brooks <brian.brooks@...aro.org>
Date: Sun, 19 Aug 2018 21:47:30 -0500
> @@ -5126,6 +5126,12 @@ static int mvpp2_probe(struct platform_device *pdev)
> }
>
> if (priv->hw_version == MVPP22) {
> + /* Platform code may have set dev->dma_mask to point
> + * to dev->coherent_dma_mask, but we want to ensure
> + * they take different values due to comment below.
> + */
> + pdev->dev.dma_mask = &priv->dma_mask;
The platform code might be doing this exactly because it cannot support
different coherent and streaming DMA masks.
Well, in any case, the platform code is doing it for a reason and
overriding this in a "driver" of all places seems totally
inappropriate and at best a layering violation.
I would rather you fix this in a way that involves well defined APIs
that set the DMA masks or whatever to the values that you need, rather
than going behind the platform code's back and changing the DMA mask
pointer like this.
Thanks.
Powered by blists - more mailing lists