From patchwork Mon Jul 11 10:01:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kovvuri X-Patchwork-Id: 9223171 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0638660760 for ; Mon, 11 Jul 2016 10:07:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA4D622B1F for ; Mon, 11 Jul 2016 10:07:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEE8C2793B; Mon, 11 Jul 2016 10:07:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9FEE222B1F for ; Mon, 11 Jul 2016 10:07:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bMY5f-0007AM-5z; Mon, 11 Jul 2016 10:05:27 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bMY3d-0003Hf-WD for linux-arm-kernel@lists.infradead.org; Mon, 11 Jul 2016 10:03:27 +0000 Received: by mail-pf0-x243.google.com with SMTP id c74so13265644pfb.0 for ; Mon, 11 Jul 2016 03:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9gG9zQW4n/T/fDOo8I3UGft6Bx4VSk4YjHPfUygXTU8=; b=AmrQl/bW9OMuJIod1K3YpJmQMqdakxbMFBTQyDUslkr7mwOsD6TkQdIC6rb8k1606t gI81tbXVK1lfjINvMq1V4zvpQ5oYHg6566/OHa2oNWMPfQey5akj2vreH9+BychLPdqV YcKBxKEWY1dR1Q8a87boYYP3250CXn/8JWNKU0BN+Sq7cIRx4intfS+H2RrEdlGR7omp CQJrDrg9342XOwrc5Zvhaafl6mV2kNPK3EEnKCsoAOYD+bpP7UXyq4xSmamIGS9qKwuV 2f+ASfMJcwfh/ylkT9gcEjjer12ghtUEmTKP2bjLz8HAfFcWX31Y2wrrJrBIX92hEC2q 6HKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9gG9zQW4n/T/fDOo8I3UGft6Bx4VSk4YjHPfUygXTU8=; b=cmLyf5nYAOloxHj3eo/dIkPjuIThzTbGLcC9Ile+T8igIxyfi5E3Lb8dNBYNY0rtVs SpwWCIjGDy/+E0BydXCt9lZU3BEGt/FMihX/v9gQl2Ekqv55Zx3COOixAP0aKpgdN3rD Bmo1ALZiQyswanDpw+O1/gciEL5HcENpyvt1pWuGSmDDa5KkGxWmX03wf5hez8t8O3xG /pWyqIbfzu4L9hiR8RY8Wky1JoitZTzmJKK2qJIjxFqi53dXGOQhcunZvvhDD1zfyX+/ HOkNdtzNUzpLWQhS844fFRXk5TekiU1oLAIneVBtfFzWiNumxV4KLRBEQUMpJTL4b28t dM5Q== X-Gm-Message-State: ALyK8tLTajfspIyyHwuPMh35CsS8DBZ2dGwXU/R109bDIFQRzurDQPXxmSS3v2FCGcaLVQ== X-Received: by 10.98.95.5 with SMTP id t5mr33408554pfb.103.1468231386111; Mon, 11 Jul 2016 03:03:06 -0700 (PDT) Received: from machine421.in.caveonetworks.com ([14.140.2.178]) by smtp.googlemail.com with ESMTPSA id 15sm3602884pfz.36.2016.07.11.03.03.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jul 2016 03:03:05 -0700 (PDT) From: sunil.kovvuri@gmail.com To: linux-kernel@vger.kernel.org, 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 Message-Id: <1468231317-24023-16-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468231317-24023-1-git-send-email-sunil.kovvuri@gmail.com> References: <1468231317-24023-1-git-send-email-sunil.kovvuri@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160711_030322_225153_7ABCE23B X-CRM114-Status: GOOD ( 12.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sunil Goutham MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sunil Goutham Set MAC addresses only for primary VF's and don't for secondary VFs. Signed-off-by: Sunil Goutham --- 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); }