Subject: Re: [RFC 0/7] Fixing dma mask setting in various network drivers

From: Jesse Brandeburg <[email-masked]>
Date: Tue, 11 Jun 2013 16:50:44 -0700

On Tue, 11 Jun 2013 13:35:05 -0700
Russell King - ARM Linux <[email-masked]> wrote:
> As part of my review of all this stuff, I'm wondering whether a helper
> to set both masks makes sense.  Something like:
> 
> static inline int dma_set_masks(struct device *dev, u64 mask)

it doesn't need to be inline, it is never called in hotpath.

> {
> 	int ret = dma_set_mask(dev, mask);
> 	if (ret == 0)
> 		dma_set_coherent_mask(dev, mask);
> 	return ret;
> }
> 
> "dma_set_masks()" is a little too close to dma_set_mask() though; and

how about dma_set_mask_and_coherent(...)

> such a function looks like it would be usable for 20 odd drivers
> currently.  The plus point is that it may help to prevent this kind
> of issue in the future...
> 
> Thoughts?

I really like the idea of consolidating this in the kernel with a
global helper.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
E1000-devel mailing list
[email-masked]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired