Skip to content

Commit 819e784

Browse files
qinke-corigineferruhy
authored andcommitted
net/nfp: fix representor port link status update
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: [email protected] Signed-off-by: Qin Ke <[email protected]> Reviewed-by: Chaoyong He <[email protected]> Reviewed-by: Long Wu <[email protected]> Reviewed-by: Peng Zhang <[email protected]>
1 parent e30ed00 commit 819e784

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/net/nfp/flower/nfp_flower_representor.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,13 @@ nfp_flower_repr_link_update(struct rte_eth_dev *dev,
2929
__rte_unused int wait_to_complete)
3030
{
3131
int ret;
32-
uint32_t nn_link_status;
33-
struct nfp_net_hw *pf_hw;
3432
struct rte_eth_link *link;
3533
struct nfp_flower_representor *repr;
3634

3735
repr = dev->data->dev_private;
3836
link = &repr->link;
3937

40-
pf_hw = repr->app_fw_flower->pf_hw;
41-
nn_link_status = nn_cfg_readw(&pf_hw->super, NFP_NET_CFG_STS);
42-
43-
ret = nfp_net_link_update_common(dev, link, nn_link_status);
38+
ret = nfp_net_link_update_common(dev, link, link->link_status);
4439

4540
return ret;
4641
}

0 commit comments

Comments
 (0)