Skip to content

Commit

Permalink
qlge: Fix carrier on condition.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ron Mercer authored and David S. Miller committed Jul 4, 2009
1 parent a5f59dc commit 8b007de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/qlge/qlge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8b007de

Please sign in to comment.