nfp: ethtool: fix the display error of `ethtool -m DEVNAME`
The port flag isn't set to `NFP_PORT_CHANGED` when using `ethtool -m DEVNAME` before, so the port state (e.g. interface) cannot be updated. Therefore, it caused that `ethtool -m DEVNAME` sometimes cannot read the correct information. E.g. `ethtool -m DEVNAME` cannot work when load driver before plug in optical module, as the port interface is still NONE without port update. Now update the port state before sending info to NIC to ensure that port interface is correct (latest state). Fixes: 61f7c6f4 ("nfp: implement ethtool get module EEPROM") Reviewed-by: NLouis Peens <louis.peens@corigine.com> Signed-off-by: NYu Xiao <yu.xiao@corigine.com> Signed-off-by: NSimon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20220802093355.69065-1-simon.horman@corigine.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
Showing
想要评论请 注册 或 登录