ethtool: add compat for devlink info
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 31 Jan 2019 18:50:47 +0000 (10:50 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Feb 2019 23:30:31 +0000 (15:30 -0800)
commitddb6e99e2db14d4b3c22a0dbddc6a09234856bb7
tree1195e6f3629b6a30cd3ee4716e8de2a08a5a4c73
parent7c908f467d78b7924233e328b64677453744908c
ethtool: add compat for devlink info

If driver did not fill the fw_version field, try to call into
the new devlink get_info op and collect the versions that way.
We assume ethtool was always reporting running versions.

v4:
 - use IS_REACHABLE() to avoid problems with DEVLINK=m (kbuildbot).
v3 (Jiri):
 - do a dump and then parse it instead of special handling;
 - concatenate all versions (well, all that fit :)).

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/devlink.c
net/core/ethtool.c