diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-04-03 14:24:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-04 17:42:36 -0700 |
commit | 1b15c90270c5051799fe5a557684d66dbc95d7b4 (patch) | |
tree | ff01b735ddb7a68505c15de233578c6f4657408f /drivers/net/ethernet/netronome/nfp/nfp_devlink.c | |
parent | 56d9f4e8f70e6f47ad4da7640753cf95ae51a356 (diff) | |
download | linux-stable-1b15c90270c5051799fe5a557684d66dbc95d7b4.tar.gz linux-stable-1b15c90270c5051799fe5a557684d66dbc95d7b4.tar.bz2 linux-stable-1b15c90270c5051799fe5a557684d66dbc95d7b4.zip |
nfp: pass switch ID through devlink_port_attrs_set()
Pass the switch ID down the to devlink through devlink_port_attrs_set()
so it can be used by devlink_compat_switch_id_get().
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_devlink.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c index 15c4d2e0c86e..8e7591241e7c 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c @@ -354,6 +354,8 @@ int nfp_devlink_port_register(struct nfp_app *app, struct nfp_port *port) { struct nfp_eth_table_port eth_port; struct devlink *devlink; + const u8 *serial; + int serial_len; int ret; rtnl_lock(); @@ -362,9 +364,10 @@ int nfp_devlink_port_register(struct nfp_app *app, struct nfp_port *port) if (ret) return ret; + serial_len = nfp_cpp_serial(port->app->cpp, &serial); devlink_port_attrs_set(&port->dl_port, DEVLINK_PORT_FLAVOUR_PHYSICAL, eth_port.label_port, eth_port.is_split, - eth_port.label_subport, NULL, 0); + eth_port.label_subport, serial, serial_len); devlink = priv_to_devlink(app->pf); |