aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/siena.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sfc/siena.c')
-rw-r--r--drivers/net/sfc/siena.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c
index f8c6771e66d8..1619fb5a64f5 100644
--- a/drivers/net/sfc/siena.c
+++ b/drivers/net/sfc/siena.c
@@ -106,16 +106,11 @@ static int siena_probe_port(struct efx_nic *efx)
106 efx->mdio.mdio_read = siena_mdio_read; 106 efx->mdio.mdio_read = siena_mdio_read;
107 efx->mdio.mdio_write = siena_mdio_write; 107 efx->mdio.mdio_write = siena_mdio_write;
108 108
109 /* Fill out MDIO structure and loopback modes */ 109 /* Fill out MDIO structure, loopback modes, and initial link state */
110 rc = efx->phy_op->probe(efx); 110 rc = efx->phy_op->probe(efx);
111 if (rc != 0) 111 if (rc != 0)
112 return rc; 112 return rc;
113 113
114 /* Initial assumption */
115 efx->link_state.speed = 10000;
116 efx->link_state.fd = true;
117 efx->wanted_fc = EFX_FC_RX | EFX_FC_TX;
118
119 /* Allocate buffer for stats */ 114 /* Allocate buffer for stats */
120 rc = efx_nic_alloc_buffer(efx, &efx->stats_buffer, 115 rc = efx_nic_alloc_buffer(efx, &efx->stats_buffer,
121 MC_CMD_MAC_NSTATS * sizeof(u64)); 116 MC_CMD_MAC_NSTATS * sizeof(u64));
@@ -139,7 +134,7 @@ void siena_remove_port(struct efx_nic *efx)
139 134
140static const struct efx_nic_register_test siena_register_tests[] = { 135static const struct efx_nic_register_test siena_register_tests[] = {
141 { FR_AZ_ADR_REGION, 136 { FR_AZ_ADR_REGION,
142 EFX_OWORD32(0x0001FFFF, 0x0001FFFF, 0x0001FFFF, 0x0001FFFF) }, 137 EFX_OWORD32(0x0003FFFF, 0x0003FFFF, 0x0003FFFF, 0x0003FFFF) },
143 { FR_CZ_USR_EV_CFG, 138 { FR_CZ_USR_EV_CFG,
144 EFX_OWORD32(0x000103FF, 0x00000000, 0x00000000, 0x00000000) }, 139 EFX_OWORD32(0x000103FF, 0x00000000, 0x00000000, 0x00000000) },
145 { FR_AZ_RX_CFG, 140 { FR_AZ_RX_CFG,
@@ -181,6 +176,12 @@ static int siena_test_registers(struct efx_nic *efx)
181 176
182static int siena_reset_hw(struct efx_nic *efx, enum reset_type method) 177static int siena_reset_hw(struct efx_nic *efx, enum reset_type method)
183{ 178{
179 int rc;
180
181 /* Recover from a failed assertion pre-reset */
182 rc = efx_mcdi_handle_assertion(efx);
183 if (rc)
184 return rc;
184 185
185 if (method == RESET_TYPE_WORLD) 186 if (method == RESET_TYPE_WORLD)
186 return efx_mcdi_reset_mc(efx); 187 return efx_mcdi_reset_mc(efx);
@@ -582,6 +583,7 @@ struct efx_nic_type siena_a0_nic_type = {
582 .set_wol = siena_set_wol, 583 .set_wol = siena_set_wol,
583 .resume_wol = siena_init_wol, 584 .resume_wol = siena_init_wol,
584 .test_registers = siena_test_registers, 585 .test_registers = siena_test_registers,
586 .test_nvram = efx_mcdi_nvram_test_all,
585 .default_mac_ops = &efx_mcdi_mac_operations, 587 .default_mac_ops = &efx_mcdi_mac_operations,
586 588
587 .revision = EFX_REV_SIENA_A0, 589 .revision = EFX_REV_SIENA_A0,