Commit c55ad8e5 authored by Amit Kumar Salecha's avatar Amit Kumar Salecha Committed by David S. Miller

qlcnic: fix default operating state of interface

Currently interface shows status as RUNNING, even if there is no link.
To fix this, netif_carrier_off should be called qlcnic_open().
Signed-off-by: default avatarAmit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: default avatarAnirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5f6ec29a
...@@ -1485,8 +1485,6 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter, ...@@ -1485,8 +1485,6 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter,
netdev->irq = adapter->msix_entries[0].vector; netdev->irq = adapter->msix_entries[0].vector;
netif_carrier_off(netdev);
err = register_netdev(netdev); err = register_netdev(netdev);
if (err) { if (err) {
dev_err(&pdev->dev, "failed to register net device\n"); dev_err(&pdev->dev, "failed to register net device\n");
...@@ -1816,6 +1814,8 @@ static int qlcnic_open(struct net_device *netdev) ...@@ -1816,6 +1814,8 @@ static int qlcnic_open(struct net_device *netdev)
struct qlcnic_adapter *adapter = netdev_priv(netdev); struct qlcnic_adapter *adapter = netdev_priv(netdev);
int err; int err;
netif_carrier_off(netdev);
err = qlcnic_attach(adapter); err = qlcnic_attach(adapter);
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment