Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130538
b: refs/heads/master
c: 0cc1283
h: refs/heads/master
v: v3
  • Loading branch information
Steve Hodgson authored and David S. Miller committed Jan 30, 2009
1 parent 4ed269f commit 84df356
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: 2f08575389ac37ece5922094777442d8fdd8c00a
refs/heads/master: 0cc128387969753ae037401eb49e4bbb474186ea
15 changes: 8 additions & 7 deletions trunk/drivers/net/sfc/falcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2283,16 +2283,12 @@ int falcon_switch_mac(struct efx_nic *efx)
efx->link_fd = true;
}

WARN_ON(!mutex_is_locked(&efx->mac_lock));
efx->mac_op = (EFX_IS10G(efx) ?
&falcon_xmac_operations : &falcon_gmac_operations);
if (old_mac_op == efx->mac_op)
return 0;

WARN_ON(!mutex_is_locked(&efx->mac_lock));

/* Not all macs support a mac-level link state */
efx->mac_up = true;

/* Always push the NIC_STAT_REG setting even if the mac hasn't
* changed, because this function is run post online reset */
falcon_read(efx, &nic_stat, NIC_STAT_REG);
strap_val = EFX_IS10G(efx) ? 5 : 3;
if (falcon_rev(efx) >= FALCON_REV_B0) {
Expand All @@ -2305,8 +2301,13 @@ int falcon_switch_mac(struct efx_nic *efx)
BUG_ON(EFX_OWORD_FIELD(nic_stat, STRAP_PINS) != strap_val);
}

if (old_mac_op == efx->mac_op)
return 0;

EFX_LOG(efx, "selected %cMAC\n", EFX_IS10G(efx) ? 'X' : 'G');
/* Not all macs support a mac-level link state */
efx->mac_up = true;

return falcon_reset_macs(efx);
}

Expand Down

0 comments on commit 84df356

Please sign in to comment.