Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202616
b: refs/heads/master
c: 901d3fe
h: refs/heads/master
v: v3
  • Loading branch information
Steve Hodgson authored and David S. Miller committed Jun 2, 2010
1 parent 138107c commit ea7a83c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cffe9d4cdafdffa840abeb55c50fd2df2d7b0cdb
refs/heads/master: 901d3fe848d8c34988699592c9f4b98c2ce10a8b
10 changes: 7 additions & 3 deletions trunk/drivers/net/sfc/selftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ efx_test_loopback(struct efx_tx_queue *tx_queue,
static int efx_wait_for_link(struct efx_nic *efx)
{
struct efx_link_state *link_state = &efx->link_state;
int count;
int count, link_up_count = 0;
bool link_up;

for (count = 0; count < 40; count++) {
Expand All @@ -567,8 +567,12 @@ static int efx_wait_for_link(struct efx_nic *efx)
link_up = !efx->mac_op->check_fault(efx);
mutex_unlock(&efx->mac_lock);

if (link_up)
return 0;
if (link_up) {
if (++link_up_count == 2)
return 0;
} else {
link_up_count = 0;
}
}

return -ETIMEDOUT;
Expand Down

0 comments on commit ea7a83c

Please sign in to comment.