Skip to content

Commit

Permalink
sfc: don't double-down() filters in ef100_reset()
Browse files Browse the repository at this point in the history
dev_close(), by way of ef100_net_stop(), already brings down the filter
 table, so there's no need to do it again (which just causes lots of
 WARN_ONs).
Similarly, don't bring it up ourselves, as dev_open() -> ef100_net_open()
 will do it, and will fail if it's already been brought up.

Fixes: a9dc3d5 ("sfc_ef100: RX filter table management and related gubbins")
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Edward Cree authored and Jakub Kicinski committed Sep 7, 2020
1 parent 30ebaf8 commit 7dcc9d8
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions drivers/net/ethernet/sfc/ef100_nic.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,24 +428,12 @@ static int ef100_reset(struct efx_nic *efx, enum reset_type reset_type)
__clear_bit(reset_type, &efx->reset_pending);
rc = dev_open(efx->net_dev, NULL);
} else if (reset_type == RESET_TYPE_ALL) {
/* A RESET_TYPE_ALL will cause filters to be removed, so we remove filters
* and reprobe after reset to avoid removing filters twice
*/
down_write(&efx->filter_sem);
ef100_filter_table_down(efx);
up_write(&efx->filter_sem);
rc = efx_mcdi_reset(efx, reset_type);
if (rc)
return rc;

netif_device_attach(efx->net_dev);

down_write(&efx->filter_sem);
rc = ef100_filter_table_up(efx);
up_write(&efx->filter_sem);
if (rc)
return rc;

rc = dev_open(efx->net_dev, NULL);
} else {
rc = 1; /* Leave the device closed */
Expand Down

0 comments on commit 7dcc9d8

Please sign in to comment.