* [PATCH net-next 1/1] sfc: MC allocations must be restored following an entity reset
@ 2015-07-31 10:15 Shradha Shah
2015-07-31 22:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Shradha Shah @ 2015-07-31 10:15 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers
From: Daniel Pieczko <dpieczko@solarflare.com>
Signed-off-by: Shradha Shah <sshah@solarflare.com>
---
drivers/net/ethernet/sfc/ef10.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 7e2e206..06b8061 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -991,12 +991,24 @@ static int efx_ef10_init_nic(struct efx_nic *efx)
static void efx_ef10_reset_mc_allocations(struct efx_nic *efx)
{
struct efx_ef10_nic_data *nic_data = efx->nic_data;
+#ifdef CONFIG_SFC_SRIOV
+ unsigned int i;
+#endif
/* All our allocations have been reset */
nic_data->must_realloc_vis = true;
nic_data->must_restore_filters = true;
nic_data->must_restore_piobufs = true;
nic_data->rx_rss_context = EFX_EF10_RSS_CONTEXT_INVALID;
+
+ /* Driver-created vswitches and vports must be re-created */
+ nic_data->must_probe_vswitching = true;
+ nic_data->vport_id = EVB_PORT_ID_ASSIGNED;
+#ifdef CONFIG_SFC_SRIOV
+ if (nic_data->vf)
+ for (i = 0; i < efx->vf_count; i++)
+ nic_data->vf[i].vport_id = 0;
+#endif
}
static enum reset_type efx_ef10_map_reset_reason(enum reset_type reason)
@@ -1571,10 +1583,6 @@ static int efx_ef10_mcdi_poll_reboot(struct efx_nic *efx)
/* All our allocations have been reset */
efx_ef10_reset_mc_allocations(efx);
- /* Driver-created vswitches and vports must be re-created */
- nic_data->must_probe_vswitching = true;
- nic_data->vport_id = EVB_PORT_ID_ASSIGNED;
-
/* The datapath firmware might have been changed */
nic_data->must_check_datapath_caps = true;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next 1/1] sfc: MC allocations must be restored following an entity reset
2015-07-31 10:15 [PATCH net-next 1/1] sfc: MC allocations must be restored following an entity reset Shradha Shah
@ 2015-07-31 22:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-07-31 22:32 UTC (permalink / raw)
To: sshah; +Cc: netdev, linux-net-drivers
From: Shradha Shah <sshah@solarflare.com>
Date: Fri, 31 Jul 2015 11:15:22 +0100
> From: Daniel Pieczko <dpieczko@solarflare.com>
>
> Signed-off-by: Shradha Shah <sshah@solarflare.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-31 22:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-31 10:15 [PATCH net-next 1/1] sfc: MC allocations must be restored following an entity reset Shradha Shah
2015-07-31 22:32 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.