diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-07-02 10:06:08 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-04 06:10:26 +0400 |
commit | 8b007de19026e91991ae70ca0def31c42435e008 (patch) | |
tree | 90826a6d96f9a2321e6089532a4522bbde131693 /drivers/net/qlge | |
parent | a5f59dc926844bf95be2261c1bb0a24597b7a8c5 (diff) | |
download | linux-8b007de19026e91991ae70ca0def31c42435e008.tar.xz |
qlge: Fix carrier on condition.
We were turning on the carrier without verifying the link was up.
This adds link up to the link initialize check before turning carrier
on.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 1da831e99422..c226257dc432 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -3343,7 +3343,11 @@ static int ql_adapter_up(struct ql_adapter *qdev) } set_bit(QL_ADAPTER_UP, &qdev->flags); ql_alloc_rx_buffers(qdev); - if ((ql_read32(qdev, STS) & qdev->port_init)) + /* If the port is initialized and the + * link is up the turn on the carrier. + */ + if ((ql_read32(qdev, STS) & qdev->port_init) && + (ql_read32(qdev, STS) & qdev->port_link_up)) netif_carrier_on(qdev->ndev); ql_enable_interrupts(qdev); ql_enable_all_completion_interrupts(qdev); |