linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sunil.kovvuri@gmail.com (sunil.kovvuri at gmail.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 15/15] net: thunderx: Don't set mac address for secondary Qset VFs
Date: Mon, 11 Jul 2016 15:31:57 +0530	[thread overview]
Message-ID: <1468231317-24023-16-git-send-email-sunil.kovvuri@gmail.com> (raw)
In-Reply-To: <1468231317-24023-1-git-send-email-sunil.kovvuri@gmail.com>

From: Sunil Goutham <sgoutham@cavium.com>

Set MAC addresses only for primary VF's and don't for
secondary VFs.

Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
---
 drivers/net/ethernet/cavium/thunder/nic_main.c   | 2 +-
 drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net/ethernet/cavium/thunder/nic_main.c
index 6524cfc..69e329e 100644
--- a/drivers/net/ethernet/cavium/thunder/nic_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nic_main.c
@@ -174,7 +174,7 @@ static void nic_mbx_send_ready(struct nicpf *nic, int vf)
 
 	mbx.nic_cfg.tns_mode = NIC_TNS_BYPASS_MODE;
 
-	if (vf < MAX_LMAC) {
+	if (vf < nic->num_vf_en) {
 		bgx_idx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]);
 		lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]);
 
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
index 300416a..4a084ab 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
@@ -1209,7 +1209,7 @@ int nicvf_open(struct net_device *netdev)
 	}
 
 	/* Check if we got MAC address from PF or else generate a radom MAC */
-	if (is_zero_ether_addr(netdev->dev_addr)) {
+	if (!nic->sqs_mode && is_zero_ether_addr(netdev->dev_addr)) {
 		eth_hw_addr_random(netdev);
 		nicvf_hw_set_mac_addr(nic, netdev);
 	}
-- 
2.7.4

      parent reply	other threads:[~2016-07-11 10:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11 10:01 [PATCH 00/15] net: thunderx: Add support for 81xx and 83xx sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 01/15] net: thunderx: Moved HW capability info from macros to structure sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 02/15] net: thunderx: Add VNIC's PCI devid on future chips sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 03/15] net: thunderx: Add support for 81xx and 83xx chips sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 04/15] net: thunderx: Set queue count based on number of CPUs sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 05/15] net: thunderx: Enable CQE_RX desc's extension fields sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 06/15] net: thunderx: Enable mailbox interrupts on 81xx/83xx sunil.kovvuri at gmail.com
2016-07-11 11:41   ` kbuild test robot
2016-07-11 10:01 ` [PATCH 07/15] net: thunderx: Support for different LMAC types within BGX sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 08/15] net: thunderx: Add 81xx support to BGX driver sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 09/15] net: thunderx: Add QSGMII interface type support sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 10/15] net: thunderx: Add RGMII " sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 11/15] net: thunderx: Use netdev's name for naming VF's interrupts sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 12/15] net: thunderx: Use skb_add_rx_frag() for split buffer Rx pkts sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 13/15] net: thunderx: Improvement for MBX interface debug messages sunil.kovvuri at gmail.com
2016-07-11 10:01 ` [PATCH 14/15] net: thunderx: Reset RXQ HW stats when interface is brought down sunil.kovvuri at gmail.com
2016-07-11 10:01 ` sunil.kovvuri at gmail.com [this message]

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=1468231317-24023-16-git-send-email-sunil.kovvuri@gmail.com \
    --to=sunil.kovvuri@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).