]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: publish params only after driver init is done
authorJiri Pirko <jiri@mellanox.com>
Thu, 7 Feb 2019 11:22:45 +0000 (11:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Feb 2019 23:02:49 +0000 (15:02 -0800)
commit2265de84911e9c70adf92af5937c7802f42906ae
treef8b7cfe74d56911de4dac8fd91af25308938c7ec
parentf76acb84897ff4503f8205762209fcad7bc6f1e7
devlink: publish params only after driver init is done

Currently, user can do dump or get of param values right after the
devlink params are registered. However the driver may not be initialized
which is an issue. The same problem happens during notification
upon param registration. Allow driver to publish devlink params
whenever it is ready to handle get() ops. Note that this cannot
be resolved by init reordering, as the "driverinit" params have
to be available before the driver is initialized (it needs the param
values there).

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Cc: Michael Chan <michael.chan@broadcom.com>
Cc: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlxsw/core.c
include/net/devlink.h
net/core/devlink.c