aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon_gmac.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-29 03:42:41 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-29 16:46:28 -0800
commitd3245b28ef2a45ec4e115062a38100bd06229289 (patch)
tree036133fdf01a20f36086d5eb8606728859c056de /drivers/net/sfc/falcon_gmac.c
parentef2b90ee4dba7a3d9001f1f0003b860b39a4aaae (diff)
downloadkernel_samsung_smdk4412-d3245b28ef2a45ec4e115062a38100bd06229289.zip
kernel_samsung_smdk4412-d3245b28ef2a45ec4e115062a38100bd06229289.tar.gz
kernel_samsung_smdk4412-d3245b28ef2a45ec4e115062a38100bd06229289.tar.bz2
sfc: Refactor link configuration
Refactor PHY, MAC and NIC configuration operations so that the existing link configuration can be re-pushed with: efx->phy_op->reconfigure(efx); efx->mac_op->reconfigure(efx); and a new configuration with: efx->nic_op->reconfigure_port(efx); (plus locking and error-checking). We have not held the link settings in software (aside from flow control), and have relied on asking the hardware what they are. This is a problem because in some cases the hardware may no longer be in a state to tell us. In particular, if an entire multi-port board is reset through one port, the driver bindings to other ports have no chance to save settings before recovering. We only actually need to keep track of the autonegotiation settings, so add an ethtool advertising mask to struct efx_nic, initialise it in PHY init and update it as necessary. Remove now-unneeded uses of efx_phy_op::{get,set}_settings() and struct ethtool_cmd. Much of this was done by Steve Hodgson <shodgson@solarflare.com>. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon_gmac.c')
-rw-r--r--drivers/net/sfc/falcon_gmac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/sfc/falcon_gmac.c b/drivers/net/sfc/falcon_gmac.c
index 66d499c..19dd3ac 100644
--- a/drivers/net/sfc/falcon_gmac.c
+++ b/drivers/net/sfc/falcon_gmac.c
@@ -22,7 +22,7 @@
*
*************************************************************************/
-static void falcon_reconfigure_gmac(struct efx_nic *efx)
+static int falcon_reconfigure_gmac(struct efx_nic *efx)
{
struct efx_link_state *link_state = &efx->link_state;
bool loopback, tx_fc, rx_fc, bytemode;
@@ -123,6 +123,8 @@ static void falcon_reconfigure_gmac(struct efx_nic *efx)
udelay(10);
falcon_reconfigure_mac_wrapper(efx);
+
+ return 0;
}
static void falcon_update_stats_gmac(struct efx_nic *efx)