From: Yotam Gigi <yot...@mellanox.com> Date: Thu, 1 Jun 2017 16:26:46 +0300
> Add callback to the ethtool flash_device op. This callback uses 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, release the rtnl lock at the > beginning of the flash process and take it again before leaving the > callback. This way, the rtnl is not held during the process. To make sure > the device does not get deleted during the flash process, take a reference > to it before releasing the rtnl lock. > > Signed-off-by: Yotam Gigi <yot...@mellanox.com> > Reviewed-by: Ido Schimmel <ido...@mellanox.com> You're going to have to implement some kind of sleeping synchronization then, in order to prevent another thread coming in and starting another flash at the same time. Nevermind, I see you have to take the FSM lock to start the flash operation so it should be fine. Applied, thanks.