aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/efx.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-28 22:42:41 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-29 19:46:28 -0500
commitd3245b28ef2a45ec4e115062a38100bd06229289 (patch)
tree036133fdf01a20f36086d5eb8606728859c056de /drivers/net/sfc/efx.h
parentef2b90ee4dba7a3d9001f1f0003b860b39a4aaae (diff)
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/efx.h')
-rw-r--r--drivers/net/sfc/efx.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/sfc/efx.h b/drivers/net/sfc/efx.h
index 15edda2a2242..c78500321586 100644
--- a/drivers/net/sfc/efx.h
+++ b/drivers/net/sfc/efx.h
@@ -60,8 +60,8 @@ extern void efx_process_channel_now(struct efx_channel *channel);
60#define EFX_EVQ_MASK (EFX_EVQ_SIZE - 1) 60#define EFX_EVQ_MASK (EFX_EVQ_SIZE - 1)
61 61
62/* Ports */ 62/* Ports */
63extern void efx_reconfigure_port(struct efx_nic *efx); 63extern int efx_reconfigure_port(struct efx_nic *efx);
64extern void __efx_reconfigure_port(struct efx_nic *efx); 64extern int __efx_reconfigure_port(struct efx_nic *efx);
65 65
66/* Ethtool support */ 66/* Ethtool support */
67extern int efx_ethtool_get_settings(struct net_device *net_dev, 67extern int efx_ethtool_get_settings(struct net_device *net_dev,
@@ -71,10 +71,8 @@ extern int efx_ethtool_set_settings(struct net_device *net_dev,
71extern const struct ethtool_ops efx_ethtool_ops; 71extern const struct ethtool_ops efx_ethtool_ops;
72 72
73/* Reset handling */ 73/* Reset handling */
74extern void efx_reset_down(struct efx_nic *efx, enum reset_type method, 74extern void efx_reset_down(struct efx_nic *efx, enum reset_type method);
75 struct ethtool_cmd *ecmd); 75extern int efx_reset_up(struct efx_nic *efx, enum reset_type method, bool ok);
76extern int efx_reset_up(struct efx_nic *efx, enum reset_type method,
77 struct ethtool_cmd *ecmd, bool ok);
78 76
79/* Global */ 77/* Global */
80extern void efx_schedule_reset(struct efx_nic *efx, enum reset_type type); 78extern void efx_schedule_reset(struct efx_nic *efx, enum reset_type type);
@@ -115,5 +113,7 @@ static inline void efx_schedule_channel(struct efx_channel *channel)
115} 113}
116 114
117extern void efx_link_status_changed(struct efx_nic *efx); 115extern void efx_link_status_changed(struct efx_nic *efx);
116extern void efx_link_set_advertising(struct efx_nic *efx, u32);
117extern void efx_link_set_wanted_fc(struct efx_nic *efx, enum efx_fc_type);
118 118
119#endif /* EFX_EFX_H */ 119#endif /* EFX_EFX_H */