bnxt_en: Fix VF virtual link state.
If the physical link is down and the VF virtual link is set to "enable", the current code does not always work. If the link is down but the cable is attached, the firmware returns LINK_SIGNAL instead of NO_LINK. The current code is treating LINK_SIGNAL as link up. The fix is to treat link as down when the link_status != LINK. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3ffb6a39b7
commit
73b9bad63a
|
@ -774,8 +774,8 @@ static int bnxt_vf_set_link(struct bnxt *bp, struct bnxt_vf_info *vf)
|
|||
|
||||
if (vf->flags & BNXT_VF_LINK_UP) {
|
||||
/* if physical link is down, force link up on VF */
|
||||
if (phy_qcfg_resp.link ==
|
||||
PORT_PHY_QCFG_RESP_LINK_NO_LINK) {
|
||||
if (phy_qcfg_resp.link !=
|
||||
PORT_PHY_QCFG_RESP_LINK_LINK) {
|
||||
phy_qcfg_resp.link =
|
||||
PORT_PHY_QCFG_RESP_LINK_LINK;
|
||||
phy_qcfg_resp.link_speed = cpu_to_le16(
|
||||
|
|
Loading…
Reference in New Issue