net: e1000: do not attempt to set hwaddr for i210 without FLASH
authorTim Harvey <tharvey@gateworks.com>
Fri, 16 Apr 2021 20:25:09 +0000 (13:25 -0700)
committerRamon Fried <rfried.dev@gmail.com>
Fri, 18 Jun 2021 08:29:17 +0000 (11:29 +0300)
commit70018635969987c1224b27f62c851ac70264f272
treec5be2372461210548500ff87ff09664ab6977b54
parent3e1848778c068bddd442855792d478eb2f038665
net: e1000: do not attempt to set hwaddr for i210 without FLASH

commit f1bcad22dd19 ("net: e1000: add support for writing to EEPROM")
adds support for storing hwaddr in EEPROM however i210 devices do not
support this and thus results in errors such as:
Warning: e1000#0 failed to set MAC address'

Check if a flash device is present and if not return -ENOSYS indicating
this is not supported.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/e1000.c
drivers/net/e1000.h