mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
Merge branch 'nfp-fixes-for-v6-1'
Simon Horman says:
====================
nfp: fixes for v6.1
- Ensure that information displayed by "devlink port show"
reflects the number of lanes available to be split.
- Avoid NULL dereference in ethtool test code.
====================
Link: https://lore.kernel.org/r/20221117153744.688595-1-simon.horman@corigine.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
6295cf7bed
|
|
@ -341,7 +341,7 @@ int nfp_devlink_port_register(struct nfp_app *app, struct nfp_port *port)
|
|||
return ret;
|
||||
|
||||
attrs.split = eth_port.is_split;
|
||||
attrs.splittable = !attrs.split;
|
||||
attrs.splittable = eth_port.port_lanes > 1 && !attrs.split;
|
||||
attrs.lanes = eth_port.port_lanes;
|
||||
attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
|
||||
attrs.phys.port_number = eth_port.label_port;
|
||||
|
|
|
|||
|
|
@ -1432,6 +1432,9 @@ nfp_port_get_module_info(struct net_device *netdev,
|
|||
u8 data;
|
||||
|
||||
port = nfp_port_from_netdev(netdev);
|
||||
if (!port)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* update port state to get latest interface */
|
||||
set_bit(NFP_PORT_CHANGED, &port->flags);
|
||||
eth_port = nfp_port_get_eth_port(port);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user