[PATCH RESEND v2 2/2] ixp4xx_eth: Setup coherent_dma_mask

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Mar 20 07:10:17 EDT 2014


On Tue, Mar 18, 2014 at 08:43:09AM +0100, Krzysztof Hałasa wrote:
> Simon Kågström <simon.kagstrom at netinsight.net> writes:
> 
> > +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
> > @@ -1426,6 +1426,10 @@ static int eth_init_one(struct platform_device *pdev)
> >  	port->netdev = dev;
> >  	port->id = pdev->id;
> >  
> > +	err = dma_set_coherent_mask(&dev->dev, DMA_BIT_MASK(32));
> > +	if (err < 0)
> > +		goto err_free;
> > +
> 
> Yeah. One could also set both masks with the new single call. The driver
> uses both streaming and coherent mapping.

The other issue with this patch set is (from DMA-API-HOWTO.txt):

  The coherent coherent mask will always be able to set the same or a
  smaller mask as the streaming mask.

and code in places assumes that's true.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.



More information about the linux-arm-kernel mailing list