All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH 6/6] fm10k: don't protect fm10k_queue_mac_request by fm10k_host_mbx_ready
Date: Thu, 12 Apr 2018 11:15:59 -0700	[thread overview]
Message-ID: <20180412181559.4343-6-jacob.e.keller@intel.com> (raw)
In-Reply-To: <20180412181559.4343-1-jacob.e.keller@intel.com>

We don't actually need to check if the host mbx is ready when queuing
MAC requests, because these are not handled by a special queue which
queues up requests until the mailbox is capable of handling them.

Pull these requests outside the fm10k_host_mbx_ready() check, as it is
not necessary.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
index 36200dec941d..11204fdbb484 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
@@ -1555,12 +1555,12 @@ static void *fm10k_dfwd_add_station(struct net_device *dev,
 
 	glort = l2_accel->dglort + 1 + i;
 
-	if (fm10k_host_mbx_ready(interface)) {
+	if (fm10k_host_mbx_ready(interface))
 		hw->mac.ops.update_xcast_mode(hw, glort,
 					      FM10K_XCAST_MODE_NONE);
-		fm10k_queue_mac_request(interface, glort, sdev->dev_addr,
-					hw->mac.default_vid, true);
-	}
+
+	fm10k_queue_mac_request(interface, glort, sdev->dev_addr,
+				hw->mac.default_vid, true);
 
 	for (vid = fm10k_find_next_vlan(interface, 0);
 	     vid < VLAN_N_VID;
@@ -1601,12 +1601,12 @@ static void fm10k_dfwd_del_station(struct net_device *dev, void *priv)
 
 	glort = l2_accel->dglort + 1 + i;
 
-	if (fm10k_host_mbx_ready(interface)) {
+	if (fm10k_host_mbx_ready(interface))
 		hw->mac.ops.update_xcast_mode(hw, glort,
 					      FM10K_XCAST_MODE_NONE);
-		fm10k_queue_mac_request(interface, glort, sdev->dev_addr,
-					hw->mac.default_vid, false);
-	}
+
+	fm10k_queue_mac_request(interface, glort, sdev->dev_addr,
+				hw->mac.default_vid, false);
 
 	for (vid = fm10k_find_next_vlan(interface, 0);
 	     vid < VLAN_N_VID;
-- 
2.15.1.478.ga1e07cd25f8b


  parent reply	other threads:[~2018-04-12 18:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 18:15 [Intel-wired-lan] [PATCH 1/6] fm10k: setup VLANs for l2 accelerated macvlan interfaces Jacob Keller
2018-04-12 18:15 ` [Intel-wired-lan] [PATCH 2/6] fm10k: reduce duplicate fm10k_stat macro code Jacob Keller
2018-05-01 21:23   ` Singh, Krishneil K
2018-04-12 18:15 ` [Intel-wired-lan] [PATCH 3/6] fm10k: use variadic arguments to fm10k_add_stat_strings Jacob Keller
2018-05-01 21:24   ` Singh, Krishneil K
2018-04-12 18:15 ` [Intel-wired-lan] [PATCH 4/6] fm10k: use macro to avoid passing the array and size separately Jacob Keller
2018-05-01 21:24   ` Singh, Krishneil K
2018-04-12 18:15 ` [Intel-wired-lan] [PATCH 5/6] fm10k: warn if the stat size is unknown Jacob Keller
2018-05-01 21:25   ` Singh, Krishneil K
2018-04-12 18:15 ` Jacob Keller [this message]
2018-05-01 21:25   ` [Intel-wired-lan] [PATCH 6/6] fm10k: don't protect fm10k_queue_mac_request by fm10k_host_mbx_ready Singh, Krishneil K
2018-05-01 21:23 ` [Intel-wired-lan] [PATCH 1/6] fm10k: setup VLANs for l2 accelerated macvlan interfaces Singh, Krishneil K

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=20180412181559.4343-6-jacob.e.keller@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.