Skip to content

Commit 0d672e9

Browse files
Ivan Veceradavem330
authored andcommitted
drivers/net: Call netif_carrier_off at the end of the probe
Without calling of netif_carrier_off at the end of the probe the operstate is unknown when the device is initially opened. By default the carrier is on so when the device is opened and netif_carrier_on is called the link watch event is not fired and operstate remains zero (unknown). This patch fixes this behavior in forcedeth and r8169. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c600636 commit 0d672e9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/net/forcedeth.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5645,6 +5645,8 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
56455645
goto out_error;
56465646
}
56475647

5648+
netif_carrier_off(dev);
5649+
56485650
dev_info(&pci_dev->dev, "ifname %s, PHY OUI 0x%x @ %d, addr %pM\n",
56495651
dev->name, np->phy_oui, np->phyaddr, dev->dev_addr);
56505652

drivers/net/r8169.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3190,6 +3190,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
31903190
if (pci_dev_run_wake(pdev))
31913191
pm_runtime_put_noidle(&pdev->dev);
31923192

3193+
netif_carrier_off(dev);
3194+
31933195
out:
31943196
return rc;
31953197

0 commit comments

Comments
 (0)