From b895d73e9836fccc402e48a8f63e6805d2edc87b Mon Sep 17 00:00:00 2001 From: Steve Hodgson Date: Sat, 28 Nov 2009 05:35:00 +0000 Subject: sfc: Always start Falcon using the XMAC The strap bits are only important on Falcon A and all production boards using it have fixed-speed 10G PHYs. Replace dummy MAC operations with default MAC operations. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- drivers/net/sfc/falcon.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'drivers/net/sfc/falcon.c') diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 372dbbc72404..9c4f8985aa71 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c @@ -2291,6 +2291,10 @@ int falcon_probe_port(struct efx_nic *efx) efx->mdio.mdio_read = falcon_mdio_read; efx->mdio.mdio_write = falcon_mdio_write; + /* Initial assumption */ + efx->link_state.speed = 10000; + efx->link_state.fd = true; + /* Hardware flow ctrl. FalconA RX FIFO too small for pause generation */ if (falcon_rev(efx) >= FALCON_REV_B0) efx->wanted_fc = EFX_FC_RX | EFX_FC_TX; @@ -2809,6 +2813,10 @@ static int falcon_probe_nic_variant(struct efx_nic *efx) return -ENODEV; case FALCON_REV_A1: + if (EFX_OWORD_FIELD(nic_stat, FRF_AB_STRAP_10G) == 0) { + EFX_ERR(efx, "Falcon rev A1 1G not supported\n"); + return -ENODEV; + } if (EFX_OWORD_FIELD(nic_stat, FRF_AA_STRAP_PCIE) == 0) { EFX_ERR(efx, "Falcon rev A1 PCI-X not supported\n"); return -ENODEV; @@ -2823,9 +2831,6 @@ static int falcon_probe_nic_variant(struct efx_nic *efx) return -ENODEV; } - /* Initial assumed speed */ - efx->link_state.speed = EFX_OWORD_FIELD(nic_stat, FRF_AB_STRAP_10G) ? 10000 : 1000; - return 0; } @@ -3238,6 +3243,8 @@ void falcon_stop_nic_stats(struct efx_nic *efx) */ struct efx_nic_type falcon_a_nic_type = { + .default_mac_ops = &falcon_xmac_operations, + .mem_map_size = 0x20000, .txd_ptr_tbl_base = FR_AA_TX_DESC_PTR_TBL_KER, .rxd_ptr_tbl_base = FR_AA_RX_DESC_PTR_TBL_KER, @@ -3251,6 +3258,8 @@ struct efx_nic_type falcon_a_nic_type = { }; struct efx_nic_type falcon_b_nic_type = { + .default_mac_ops = &falcon_xmac_operations, + /* Map everything up to and including the RSS indirection * table. Don't map MSI-X table, MSI-X PBA since Linux * requires that they not be mapped. */ -- cgit v1.2.2