* [PATCH net-2.6] cxgb4: fix reported state of interfaces without link
@ 2011-01-20 1:29 Dimitris Michailidis
2011-01-21 1:00 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dimitris Michailidis @ 2011-01-20 1:29 UTC (permalink / raw)
To: netdev
Currently tools like ip and ifconfig report incorrect state for cxgb4
interfaces that are up but do not have link and do so until first link
establishment. This is because the initial netif_carrier_off call is
before register_netdev and it needs to be after to be fully effective.
Fix this by moving netif_carrier_off into .ndo_open.
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
---
drivers/net/cxgb4/cxgb4_main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c
index 059c1ee..ec35d45 100644
--- a/drivers/net/cxgb4/cxgb4_main.c
+++ b/drivers/net/cxgb4/cxgb4_main.c
@@ -2710,6 +2710,8 @@ static int cxgb_open(struct net_device *dev)
struct port_info *pi = netdev_priv(dev);
struct adapter *adapter = pi->adapter;
+ netif_carrier_off(dev);
+
if (!(adapter->flags & FULL_INIT_DONE)) {
err = cxgb_up(adapter);
if (err < 0)
@@ -3661,7 +3663,6 @@ static int __devinit init_one(struct pci_dev *pdev,
pi->xact_addr_filt = -1;
pi->rx_offload = RX_CSO;
pi->port_id = i;
- netif_carrier_off(netdev);
netdev->irq = pdev->irq;
netdev->features |= NETIF_F_SG | TSO_FLAGS;
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-2.6] cxgb4: fix reported state of interfaces without link
2011-01-20 1:29 [PATCH net-2.6] cxgb4: fix reported state of interfaces without link Dimitris Michailidis
@ 2011-01-21 1:00 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-01-21 1:00 UTC (permalink / raw)
To: dm; +Cc: netdev
From: Dimitris Michailidis <dm@chelsio.com>
Date: Wed, 19 Jan 2011 17:29:05 -0800
> Currently tools like ip and ifconfig report incorrect state for cxgb4
> interfaces that are up but do not have link and do so until first link
> establishment. This is because the initial netif_carrier_off call is
> before register_netdev and it needs to be after to be fully effective.
> Fix this by moving netif_carrier_off into .ndo_open.
>
> Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-21 1:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-20 1:29 [PATCH net-2.6] cxgb4: fix reported state of interfaces without link Dimitris Michailidis
2011-01-21 1:00 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).