diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-12-13 06:43:33 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-13 06:57:57 +0100 |
commit | f31a45d2f45a7667acd6e85ab6613b0910c55ea9 (patch) | |
tree | 0462d02420800b22af5291db8a210888da9e2683 /drivers/net/sfc/falcon.c | |
parent | sfc: Don't count RX checksum errors during loopback self-test (diff) | |
download | linux-f31a45d2f45a7667acd6e85ab6613b0910c55ea9.tar.xz linux-f31a45d2f45a7667acd6e85ab6613b0910c55ea9.zip |
sfc: Remove MII extension cruft
Replace efx_nic::link_options bitfield with link_speed (speed in
Mbit/s) and link_fd (full duplex flag).
Remove broken auto-negotiation functions.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r-- | drivers/net/sfc/falcon.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 97cc037a10c5..448bba9eed09 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c @@ -15,11 +15,11 @@ #include <linux/seq_file.h> #include <linux/i2c.h> #include <linux/i2c-algo-bit.h> +#include <linux/mii.h> #include "net_driver.h" #include "bitfield.h" #include "efx.h" #include "mac.h" -#include "gmii.h" #include "spi.h" #include "falcon.h" #include "falcon_hwdefs.h" @@ -1915,14 +1915,12 @@ void falcon_reconfigure_mac_wrapper(struct efx_nic *efx) int link_speed; bool tx_fc; - if (efx->link_options & GM_LPA_10000) - link_speed = 0x3; - else if (efx->link_options & GM_LPA_1000) - link_speed = 0x2; - else if (efx->link_options & GM_LPA_100) - link_speed = 0x1; - else - link_speed = 0x0; + switch (efx->link_speed) { + case 10000: link_speed = 3; break; + case 1000: link_speed = 2; break; + case 100: link_speed = 1; break; + default: link_speed = 0; break; + } /* MAC_LINK_STATUS controls MAC backpressure but doesn't work * as advertised. Disable to ensure packets are not * indefinitely held and TX queue can be flushed at any point |