]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Support the flash device ethtool callback
authorOr Gerlitz <ogerlitz@mellanox.com>
Tue, 18 Apr 2017 14:48:46 +0000 (17:48 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 22 Jun 2017 11:30:13 +0000 (14:30 +0300)
commita10b1856addabc2a8e6eb5613e95428042b9beb2
tree676b3e56b4ceafd42937f3fd26717f8d1a6ef66f
parentb5f5e042d76d1771d5889f4b299703ce812b568d
net/mlx5e: Support the flash device ethtool callback

This callback further invokes the mlxfw module to flash the new
firmware file to the device.

As the firmware flash process takes about 20 seconds and ethtool
takes the rtnl lock during the flash_device callback, we release
the rtnl lock at the beginning of the flash process and take it
again before leaving the callback.

This way, rtnl is not held during the process. To make sure the
device does not get deleted while being flashed, we take a
reference to it before releasing rtnl lock.

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/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c