Skip to content

Commit

Permalink
net/nfp: fix representor port link status update
Browse files Browse the repository at this point in the history
The link status of representor port is reported by the flower
firmware through control message and it already parsed and
stored in the 'link' field of representor port structure.

The original logic read link status from the control BAR again,
and use it rather then the 'link' field of the representor port
structure in the following logic wrongly.

Fix this by delete the read control BAR statement and use the
right link status value.

Fixes: c4de52e ("net/nfp: remove redundancy for representor port")
Cc: stable@dpdk.org

Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
  • Loading branch information
qinke-corigine authored and ferruhy committed Oct 4, 2024
1 parent 3ae1ac7 commit d2b7539
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/net/nfp/flower/nfp_flower_representor.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,13 @@ nfp_flower_repr_link_update(struct rte_eth_dev *dev,
__rte_unused int wait_to_complete)
{
int ret;
uint32_t nn_link_status;
struct nfp_net_hw *pf_hw;
struct rte_eth_link *link;
struct nfp_flower_representor *repr;

repr = dev->data->dev_private;
link = &repr->link;

pf_hw = repr->app_fw_flower->pf_hw;
nn_link_status = nn_cfg_readw(&pf_hw->super, NFP_NET_CFG_STS);

ret = nfp_net_link_update_common(dev, link, nn_link_status);
ret = nfp_net_link_update_common(dev, link, link->link_status);

return ret;
}
Expand Down

0 comments on commit d2b7539

Please sign in to comment.