Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-14 20:01:16 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-14 20:01:16 +0200
commita68debba890aef6aa3e3c03becce0c2aa01b6440 (patch)
treecdbdae403af794d968d7655618dd1dd40b0cecf6
parent38fc00dd9a70b553989de26fa6d6389695bcb27d (diff)
parente97127cad61c967959e46ba029edcdc921ea9d23 (diff)
Merge branch 'users/msuchanek/SLE15/for-next' into SLE15
Pull ibmvnic fix from Michal Suchanek suse-commit: 23069a7739ec0e9a343c595bef2a29039e75c4f1
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index b5d1c3299cca..0d17d5b6e744 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1114,7 +1114,6 @@ static int ibmvnic_open(struct net_device *netdev)
}
rc = __ibmvnic_open(netdev);
- netif_carrier_on(netdev);
return rc;
}
@@ -1867,8 +1866,6 @@ static int do_reset(struct ibmvnic_adapter *adapter,
adapter->reset_reason != VNIC_RESET_CHANGE_PARAM)
call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);
- netif_carrier_on(netdev);
-
return 0;
}
@@ -1938,8 +1935,6 @@ static int do_hard_reset(struct ibmvnic_adapter *adapter,
return 0;
}
- netif_carrier_on(netdev);
-
return 0;
}
@@ -4481,6 +4476,10 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq,
crq->link_state_indication.phys_link_state;
adapter->logical_link_state =
crq->link_state_indication.logical_link_state;
+ if (adapter->phys_link_state && adapter->logical_link_state)
+ netif_carrier_on(netdev);
+ else
+ netif_carrier_off(netdev);
break;
case CHANGE_MAC_ADDR_RSP:
netdev_dbg(netdev, "Got MAC address change Response\n");