From: Edward Cree <ecree@solarflare•com>
To: David Miller <davem@davemloft•net>
Cc: <netdev@vger•kernel.org>, <linux-net-drivers@solarflare•com>
Subject: [PATCH net-next 5/9] sfc: warn if other functions have been reset by MCFW
Date: Tue, 21 Jul 2015 15:10:02 +0100 [thread overview]
Message-ID: <55AE52BA.7060001@solarflare.com> (raw)
In-Reply-To: <55AE5230.3040605@solarflare.com>
From: Daniel Pieczko <dpieczko@solarflare•com>
When enabling the workaround for cascaded multicast filters, the MC
can reset other functions if they have already inserted filters.
In that case, the workaround has been enabled, but print an info
message in the log recording that other functions had to be reset.
As other functions were reset, the MC will have incremented its boot
count, so also increment the warm_boot_count on the function which
enabled the workaround, as that function won't have received an MC
reboot event and does not need to reset.
Signed-off-by: Edward Cree <ecree@solarflare•com>
---
drivers/net/ethernet/sfc/ef10.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 2b93f63..18d6388 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -2291,13 +2291,24 @@ static int efx_ef10_ev_init(struct efx_channel *channel)
if (implemented & MC_CMD_GET_WORKAROUNDS_OUT_BUG26807 &&
!nic_data->workaround_26807) {
+ unsigned int flags;
+
rc = efx_mcdi_set_workaround(efx,
MC_CMD_WORKAROUND_BUG26807,
- true, NULL);
- if (!rc)
+ true, &flags);
+
+ if (!rc) {
+ if (flags &
+ 1 << MC_CMD_WORKAROUND_EXT_OUT_FLR_DONE_LBN) {
+ netif_info(efx, drv, efx->net_dev,
+ "other functions on NIC have been reset\n");
+ /* MC's boot count has incremented */
+ ++nic_data->warm_boot_count;
+ }
nic_data->workaround_26807 = true;
- else if (rc == -EPERM)
+ } else if (rc == -EPERM) {
rc = 0;
+ }
}
}
next prev parent reply other threads:[~2015-07-21 14:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 14:07 [PATCH net-next 0/9] sfc: support for cascaded multicast filtering Edward Cree
2015-07-21 14:08 ` [PATCH net-next 1/9] sfc: update MCDI protocol definitions Edward Cree
2015-07-21 14:09 ` [PATCH net-next 2/9] sfc: enable cascaded multicast filters in MCFW Edward Cree
2015-07-21 14:09 ` [PATCH net-next 3/9] sfc: cope with ENOSYS from efx_mcdi_get_workarounds() Edward Cree
2015-07-21 14:09 ` [PATCH net-next 4/9] sfc: add output flag decoding to efx_mcdi_set_workaround Edward Cree
2015-07-21 14:10 ` Edward Cree [this message]
2015-07-21 14:10 ` [PATCH net-next 6/9] sfc: Insert multicast filters as well as mismatch filters in promiscuous mode Edward Cree
2015-07-21 14:10 ` [PATCH net-next 7/9] sfc: re-factor efx_ef10_filter_sync_rx_mode() Edward Cree
2015-07-21 14:10 ` [PATCH net-next 8/9] sfc: support cascaded multicast filters Edward Cree
2015-07-21 14:11 ` [PATCH net-next 9/9] sfc: clean fallbacks between promisc/normal in efx_ef10_filter_sync_rx_mode Edward Cree
2015-07-22 5:21 ` [PATCH net-next 0/9] sfc: support for cascaded multicast filtering David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55AE52BA.7060001@solarflare.com \
--to=ecree@solarflare$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=linux-net-drivers@solarflare$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox