public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Shradha Shah <sshah@solarflare•com>
To: David Miller <davem@davemloft•net>
Cc: <netdev@vger•kernel.org>, <linux-net-drivers@solarflare•com>
Subject: [PATCH net-next v3 03/16] sfc: MC_CMD_SET_MAC can only be called by the link control Function
Date: Wed, 20 May 2015 11:08:56 +0100	[thread overview]
Message-ID: <555C5D38.5030907@solarflare.com> (raw)
In-Reply-To: <555C5C91.4000004@solarflare.com>

MC_CMD_SET_MAC is privileged and can only by called by the link
control function.

This patch adds efx_ef10_mac_reconfigure_vf which avoids the call
to MC_CMD_SET_MAC by the Virtual function

Signed-off-by: Shradha Shah <sshah@solarflare•com>
---
 drivers/net/ethernet/sfc/ef10.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 882117a..70cbad3 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -3480,6 +3480,13 @@ static int efx_ef10_mac_reconfigure(struct efx_nic *efx)
 	return efx_mcdi_set_mac(efx);
 }
 
+static int efx_ef10_mac_reconfigure_vf(struct efx_nic *efx)
+{
+	efx_ef10_filter_sync_rx_mode(efx);
+
+	return 0;
+}
+
 static int efx_ef10_start_bist(struct efx_nic *efx, u32 bist_type)
 {
 	MCDI_DECLARE_BUF(inbuf, MC_CMD_START_BIST_IN_LEN);
@@ -3833,7 +3840,7 @@ const struct efx_nic_type efx_hunt_a0_vf_nic_type = {
 	.stop_stats = efx_port_dummy_op_void,
 	.set_id_led = efx_mcdi_set_id_led,
 	.push_irq_moderation = efx_ef10_push_irq_moderation,
-	.reconfigure_mac = efx_ef10_mac_reconfigure,
+	.reconfigure_mac = efx_ef10_mac_reconfigure_vf,
 	.check_mac_fault = efx_mcdi_mac_check_fault,
 	.reconfigure_port = efx_mcdi_port_reconfigure,
 	.get_wol = efx_ef10_get_wol_vf,

  parent reply	other threads:[~2015-05-20 10:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 10:06 [PATCH net-next v3 00/16] sfc: Get/Set MAC address and ndo_[set/get]_vf_* entrypoint functions Shradha Shah
2015-05-20 10:08 ` [PATCH net-next v3 01/16] sfc: Add permissions to MCDI commands Shradha Shah
2015-05-20 10:08 ` [PATCH net-next v3 02/16] sfc: change definition of MC_CMD_VADAPTOR_ALLOC Shradha Shah
2015-05-20 10:08 ` Shradha Shah [this message]
2015-05-20 10:09 ` [PATCH net-next v3 04/16] sfc: Store vf_index in nic_data for Ef10 Shradha Shah
2015-05-20 10:09 ` [PATCH net-next v3 05/16] sfc: save old MAC address in case sriov_mac_address_changed fails Shradha Shah
2015-05-20 10:09 ` [PATCH net-next v3 06/16] sfc: Store the efx_nic struct of the current VF in the VF data struct Shradha Shah
2015-05-20 10:10 ` [PATCH net-next v3 07/16] sfc: protect filter table against use-after-free Shradha Shah
2015-05-20 10:10 ` [PATCH net-next v3 08/16] sfc: Enable a VF to get its own MAC address Shradha Shah
2015-05-20 10:10 ` [PATCH net-next v3 09/16] sfc: Initialise MCDI buffers to 0 on declaration Shradha Shah
2015-05-20 10:11 ` [PATCH net-next v3 10/16] sfc: add ndo_set_vf_mac() function for EF10 Shradha Shah
2015-05-20 10:11 ` [PATCH net-next v3 11/16] sfc: Add ndo_get_vf_config() " Shradha Shah
2015-05-20 10:11 ` [PATCH net-next v3 12/16] sfc: Change entity reset on MC reboot to a new datapath-only reset Shradha Shah
2015-05-20 10:11 ` [PATCH net-next v3 13/16] sfc: add ndo_set_vf_vlan() function for EF10 Shradha Shah
2015-05-20 10:12 ` [PATCH net-next v3 14/16] sfc: add ndo_set_vf_link_state() " Shradha Shah
2015-05-20 10:12 ` [PATCH net-next v3 15/16] sfc: Implement dummy disable of VF spoof check " Shradha Shah
2015-05-20 10:12 ` [PATCH net-next v3 16/16] sfc: set the MAC address using MC_CMD_VADAPTOR_SET_MAC Shradha Shah
2015-05-21 22:44 ` [PATCH net-next v3 00/16] sfc: Get/Set MAC address and ndo_[set/get]_vf_* entrypoint functions 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=555C5D38.5030907@solarflare.com \
    --to=sshah@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