]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net/mlx5e: IPoIB, Support the flash device ethtool callback
authorOr Gerlitz <ogerlitz@mellanox.com>
Sun, 21 May 2017 15:25:46 +0000 (18:25 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 22 Jun 2017 11:30:14 +0000 (14:30 +0300)
This callback further invokes the mlxfw module to flash the new
firmware file to the device.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c

index bf686f0fde5d713ae9197a501e22aff31e9990fb..eb04e97d87659c80089c2cbcfd2185ae356ccafe 100644 (file)
@@ -121,6 +121,14 @@ static int mlx5i_get_ts_info(struct net_device *netdev,
        return mlx5e_ethtool_get_ts_info(priv, info);
 }
 
+static int mlx5i_flash_device(struct net_device *netdev,
+                             struct ethtool_flash *flash)
+{
+       struct mlx5e_priv *priv = mlx5i_epriv(netdev);
+
+       return mlx5e_ethtool_flash_device(priv, flash);
+}
+
 const struct ethtool_ops mlx5i_ethtool_ops = {
        .get_drvinfo       = mlx5i_get_drvinfo,
        .get_strings       = mlx5i_get_strings,
@@ -128,6 +136,7 @@ const struct ethtool_ops mlx5i_ethtool_ops = {
        .get_ethtool_stats = mlx5i_get_ethtool_stats,
        .get_ringparam     = mlx5i_get_ringparam,
        .set_ringparam     = mlx5i_set_ringparam,
+       .flash_device      = mlx5i_flash_device,
        .get_channels      = mlx5i_get_channels,
        .set_channels      = mlx5i_set_channels,
        .get_coalesce      = mlx5i_get_coalesce,