bnxt: set devlink port attrs properly

Set the attrs properly so delink has enough info to generate physical
port names.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko 2019-03-24 11:14:27 +01:00 committed by David S. Miller
parent 402f99e550
commit a0e18132ec

View File

@ -229,6 +229,8 @@ int bnxt_dl_register(struct bnxt *bp)
goto err_dl_unreg; goto err_dl_unreg;
} }
devlink_port_attrs_set(&bp->dl_port, DEVLINK_PORT_FLAVOUR_PHYSICAL,
bp->pf.port_id, false, 0);
rc = devlink_port_register(dl, &bp->dl_port, bp->pf.port_id); rc = devlink_port_register(dl, &bp->dl_port, bp->pf.port_id);
if (rc) { if (rc) {
netdev_err(bp->dev, "devlink_port_register failed"); netdev_err(bp->dev, "devlink_port_register failed");