linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] net: extend eth_platform_get_mac_address()
@ 2018-07-18 16:10 Bartosz Golaszewski
  2018-07-18 16:10 ` [PATCH 1/5] net: visually shrink eth_platform_get_mac_address() Bartosz Golaszewski
                   ` (4 more replies)
  0 siblings, 5 replies; 29+ messages in thread
From: Bartosz Golaszewski @ 2018-07-18 16:10 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Grygorii Strashko,
	David S . Miller, Srinivas Kandagatla, Lukas Wunner, Rob Herring,
	Florian Fainelli, Dan Carpenter, Ivan Khoronzhuk, David Lechner,
	Greg Kroah-Hartman, Andrew Lunn
  Cc: linux-arm-kernel, linux-kernel, linux-omap, netdev, Bartosz Golaszewski

This is a follow-up to a series I posted a while ago the goal of which
was to replace the at24 platform data with device properties. To do so
we need to somehow remove reading the MAC address from relevant board
files.

In my patches I used nvmem and MTD to read the MAC address from within
the davinci emac driver. It was suggested that we generalize it further
but since MTD doesn't support nvmem yet, the best we can do is to move
this code over to net core code.

The following patches modify the eth_platform_get_mac_address()
function which seems to be the best candidate for this code.

The first patch only visually shrinks the code because this routine
will grow significantly in the next patches.

The second patch adds an info message on success so that we keep
getting notifications from users who already are verbose.

The third patch calls is_valid_ether_addr() on the read address so
that we're sure it's correct.

The last two patches add nvmem and MTD support to the function. In
order to stay compatible with existing users, nvmem and MTD will be
tried last - after device tree and arch-specific callback.

If this series gets accepted I will modify my previous patches to
use it instead of handcoding the same operations in davinci_emac.

Bartosz Golaszewski (5):
  net: visually shrink eth_platform_get_mac_address()
  net: add an info message to eth_platform_get_mac_address()
  net: fortify eth_platform_get_mac_address()
  net: add support for nvmem to eth_platform_get_mac_address()
  net: add MTD support to eth_platform_get_mac_address()

 net/ethernet/eth.c | 77 ++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 65 insertions(+), 12 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2018-07-20 14:16 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18 16:10 [PATCH 0/5] net: extend eth_platform_get_mac_address() Bartosz Golaszewski
2018-07-18 16:10 ` [PATCH 1/5] net: visually shrink eth_platform_get_mac_address() Bartosz Golaszewski
2018-07-18 16:28   ` Andrew Lunn
2018-07-18 16:31     ` Bartosz Golaszewski
2018-07-18 23:10   ` David Miller
2018-07-18 16:10 ` [PATCH 2/5] net: add an info message to eth_platform_get_mac_address() Bartosz Golaszewski
2018-07-18 16:31   ` Andrew Lunn
2018-07-18 16:33     ` Bartosz Golaszewski
2018-07-18 23:13   ` David Miller
2018-07-18 16:10 ` [PATCH 3/5] net: fortify eth_platform_get_mac_address() Bartosz Golaszewski
2018-07-18 16:35   ` Andrew Lunn
2018-07-18 16:10 ` [PATCH 4/5] net: add support for nvmem to eth_platform_get_mac_address() Bartosz Golaszewski
2018-07-18 16:42   ` Andrew Lunn
2018-07-19 15:22   ` Andrew Lunn
2018-07-19 15:25     ` Bartosz Golaszewski
2018-07-19 17:47   ` Russell King - ARM Linux
2018-07-19 21:24     ` Bartosz Golaszewski
2018-07-19 21:48       ` Andrew Lunn
2018-07-18 16:10 ` [PATCH 5/5] net: add MTD support " Bartosz Golaszewski
2018-07-18 16:47   ` Andrew Lunn
2018-07-18 16:54     ` Bartosz Golaszewski
2018-07-18 17:03       ` Andrew Lunn
2018-07-19  8:14         ` Bartosz Golaszewski
2018-07-19 15:01           ` Andrew Lunn
2018-07-19 15:07             ` Bartosz Golaszewski
2018-07-19 15:27               ` Andrew Lunn
2018-07-19 15:35                 ` Bartosz Golaszewski
2018-07-20  5:17                   ` Sekhar Nori
2018-07-20 14:15                     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).