[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170601.122555.1824969925686772266.davem@davemloft.net>
Date: Thu, 01 Jun 2017 12:25:55 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: yotamg@...lanox.com
Cc: netdev@...r.kernel.org, idosch@...lanox.com, eladr@...lanox.com,
ogerlitz@...lanox.com, ilant@...lanox.com, jiri@...lanox.com,
arkadis@...lanox.com
Subject: Re: [PATCH net-next] mlxsw: spectrum: Implement the ethtool
flash_device callback
From: Yotam Gigi <yotamg@...lanox.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 <yotamg@...lanox.com>
> Reviewed-by: Ido Schimmel <idosch@...lanox.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.
Powered by blists - more mailing lists