Skip to contentSkip to conversation

bnxt: update for net-next.

PATCH Superseded Michael Chan 4 participants 23 messages Sep 19, 2016 – Sep 20, 2016

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Michael Chan

author maintainer
#0 lore raw

cover bnxt: update for net-next.

Misc. changes and minor bug fixes for net-next. Please review.

Deepak Khungar (1):
bnxt_en: Support for "ethtool -r" command

Eddie Wai (1):
bnxt_en: Fixed the VF link status after a link state change

Michael Chan (7):
bnxt_en: Use RSS flags defined in the bnxt_hsi.h file.
bnxt_en: Simplify PCI device names and add additinal PCI IDs.
bnxt_en: Update to firmware interface spec 1.5.1.
bnxt_en: Fix ethtool -l|-L inconsistent channel counts.
bnxt_en: Re-arrange bnxt_hwrm_func_qcaps().
bnxt_en: Call firmware to approve the random VF MAC address.
bnxt_en: Pad TX packets below 52 bytes.

Rob Swindell (1):
bnxt_en: Added support for Secure Firmware Update

 drivers/net/ethernet/broadcom/bnxt/bnxt.c         |  131 ++-
 drivers/net/ethernet/broadcom/bnxt/bnxt.h         |   22 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  187 ++-
 drivers/net/ethernet/broadcom/bnxt/bnxt_fw_hdr.h  |   16 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h     | 1251 ++++++++++++---------
 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c   |   84 +-
 6 files changed, 1069 insertions(+), 622 deletions(-)
Signature · 1 line
1.8.3.1
author maintainer
#1 lore raw

PATCH 1/10 bnxt_en: Use RSS flags defined in the bnxt_hsi.h file.

And remove redundant definitions of the same flags.

---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++----
 drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 -----
 2 files changed, 4 insertions(+), 9 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +4 -4
index 228c964..cee0e8d 100644
@@ -3419,10 +3419,10 @@ static int bnxt_hwrm_vnic_set_rss(struct bnxt *bp, u16 vnic_id, bool set_rss)
 
 	bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_RSS_CFG, -1, -1);
 	if (set_rss) {
-		vnic->hash_type = BNXT_RSS_HASH_TYPE_FLAG_IPV4 |
-				 BNXT_RSS_HASH_TYPE_FLAG_TCP_IPV4 |
-				 BNXT_RSS_HASH_TYPE_FLAG_IPV6 |
-				 BNXT_RSS_HASH_TYPE_FLAG_TCP_IPV6;
+		vnic->hash_type = VNIC_RSS_CFG_REQ_HASH_TYPE_IPV4 |
+				  VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV4 |
+				  VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6 |
+				  VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV6;
 
 		req.hash_type = cpu_to_le32(vnic->hash_type);
 
drivers/net/ethernet/broadcom/bnxt/bnxt.h +0 -5
index 23e04a6..db4814e 100644
@@ -389,11 +389,6 @@ struct rx_tpa_end_cmp_ext {
 
 #define INVALID_HW_RING_ID	((u16)-1)
 
-#define BNXT_RSS_HASH_TYPE_FLAG_IPV4		0x01
-#define BNXT_RSS_HASH_TYPE_FLAG_TCP_IPV4	0x02
-#define BNXT_RSS_HASH_TYPE_FLAG_IPV6		0x04
-#define BNXT_RSS_HASH_TYPE_FLAG_TCP_IPV6	0x08
-
 /* The hardware supports certain page sizes.  Use the supported page sizes
  * to allocate the rings.
  */
Signature · 1 line
1.8.3.1
author maintainer
#2 lore raw

PATCH 2/10 bnxt_en: Simplify PCI device names and add additinal PCI IDs.

In reply to Michael Chan

Remove "Single-port/Dual-port" from the device names. Dual-port devices will appear as 2 separate devices, so no need to call each a dual-port device. Use a more generic name for VF devices belonging to the same chip fanmily. Add some remaining NPAR device IDs.

---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 68 ++++++++++++++++---------------
 1 file changed, 36 insertions(+), 32 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +36 -32
index cee0e8d..d9b4cd1 100644
@@ -93,50 +93,49 @@ enum board_idx {
 	BCM57404_NPAR,
 	BCM57406_NPAR,
 	BCM57407_SFP,
+	BCM57407_NPAR,
 	BCM57414_NPAR,
 	BCM57416_NPAR,
-	BCM57304_VF,
-	BCM57404_VF,
-	BCM57414_VF,
-	BCM57314_VF,
+	NETXTREME_E_VF,
+	NETXTREME_C_VF,
 };
 
 /* indexed by enum above */
 static const struct {
 	char *name;
 } board_info[] = {
-	{ "Broadcom BCM57301 NetXtreme-C Single-port 10Gb Ethernet" },
-	{ "Broadcom BCM57302 NetXtreme-C Dual-port 10Gb/25Gb Ethernet" },
-	{ "Broadcom BCM57304 NetXtreme-C Dual-port 10Gb/25Gb/40Gb/50Gb Ethernet" },
+	{ "Broadcom BCM57301 NetXtreme-C 10Gb Ethernet" },
+	{ "Broadcom BCM57302 NetXtreme-C 10Gb/25Gb Ethernet" },
+	{ "Broadcom BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet" },
 	{ "Broadcom BCM57417 NetXtreme-E Ethernet Partition" },
-	{ "Broadcom BCM58700 Nitro 4-port 1Gb/2.5Gb/10Gb Ethernet" },
-	{ "Broadcom BCM57311 NetXtreme-C Single-port 10Gb Ethernet" },
-	{ "Broadcom BCM57312 NetXtreme-C Dual-port 10Gb/25Gb Ethernet" },
-	{ "Broadcom BCM57402 NetXtreme-E Dual-port 10Gb Ethernet" },
-	{ "Broadcom BCM57404 NetXtreme-E Dual-port 10Gb/25Gb Ethernet" },
-	{ "Broadcom BCM57406 NetXtreme-E Dual-port 10GBase-T Ethernet" },
+	{ "Broadcom BCM58700 Nitro 1Gb/2.5Gb/10Gb Ethernet" },
+	{ "Broadcom BCM57311 NetXtreme-C 10Gb Ethernet" },
+	{ "Broadcom BCM57312 NetXtreme-C 10Gb/25Gb Ethernet" },
+	{ "Broadcom BCM57402 NetXtreme-E 10Gb Ethernet" },
+	{ "Broadcom BCM57404 NetXtreme-E 10Gb/25Gb Ethernet" },
+	{ "Broadcom BCM57406 NetXtreme-E 10GBase-T Ethernet" },
 	{ "Broadcom BCM57402 NetXtreme-E Ethernet Partition" },
-	{ "Broadcom BCM57407 NetXtreme-E Dual-port 10GBase-T Ethernet" },
-	{ "Broadcom BCM57412 NetXtreme-E Dual-port 10Gb Ethernet" },
-	{ "Broadcom BCM57414 NetXtreme-E Dual-port 10Gb/25Gb Ethernet" },
-	{ "Broadcom BCM57416 NetXtreme-E Dual-port 10GBase-T Ethernet" },
-	{ "Broadcom BCM57417 NetXtreme-E Dual-port 10GBase-T Ethernet" },
+	{ "Broadcom BCM57407 NetXtreme-E 10GBase-T Ethernet" },
+	{ "Broadcom BCM57412 NetXtreme-E 10Gb Ethernet" },
+	{ "Broadcom BCM57414 NetXtreme-E 10Gb/25Gb Ethernet" },
+	{ "Broadcom BCM57416 NetXtreme-E 10GBase-T Ethernet" },
+	{ "Broadcom BCM57417 NetXtreme-E 10GBase-T Ethernet" },
 	{ "Broadcom BCM57412 NetXtreme-E Ethernet Partition" },
-	{ "Broadcom BCM57314 NetXtreme-C Dual-port 10Gb/25Gb/40Gb/50Gb Ethernet" },
-	{ "Broadcom BCM57417 NetXtreme-E Dual-port 10Gb/25Gb Ethernet" },
-	{ "Broadcom BCM57416 NetXtreme-E Dual-port 10Gb Ethernet" },
+	{ "Broadcom BCM57314 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet" },
+	{ "Broadcom BCM57417 NetXtreme-E 10Gb/25Gb Ethernet" },
+	{ "Broadcom BCM57416 NetXtreme-E 10Gb Ethernet" },
 	{ "Broadcom BCM57404 NetXtreme-E Ethernet Partition" },
 	{ "Broadcom BCM57406 NetXtreme-E Ethernet Partition" },
-	{ "Broadcom BCM57407 NetXtreme-E Dual-port 25Gb Ethernet" },
+	{ "Broadcom BCM57407 NetXtreme-E 25Gb Ethernet" },
+	{ "Broadcom BCM57407 NetXtreme-E Ethernet Partition" },
 	{ "Broadcom BCM57414 NetXtreme-E Ethernet Partition" },
 	{ "Broadcom BCM57416 NetXtreme-E Ethernet Partition" },
-	{ "Broadcom BCM57304 NetXtreme-C Ethernet Virtual Function" },
-	{ "Broadcom BCM57404 NetXtreme-E Ethernet Virtual Function" },
-	{ "Broadcom BCM57414 NetXtreme-E Ethernet Virtual Function" },
-	{ "Broadcom BCM57314 NetXtreme-E Ethernet Virtual Function" },
+	{ "Broadcom NetXtreme-E Ethernet Virtual Function" },
+	{ "Broadcom NetXtreme-C Ethernet Virtual Function" },
 };
 
 static const struct pci_device_id bnxt_pci_tbl[] = {
+	{ PCI_VDEVICE(BROADCOM, 0x16c0), .driver_data = BCM57417_NPAR },
 	{ PCI_VDEVICE(BROADCOM, 0x16c8), .driver_data = BCM57301 },
 	{ PCI_VDEVICE(BROADCOM, 0x16c9), .driver_data = BCM57302 },
 	{ PCI_VDEVICE(BROADCOM, 0x16ca), .driver_data = BCM57304 },
@@ -160,13 +159,19 @@ static const struct pci_device_id bnxt_pci_tbl[] = {
 	{ PCI_VDEVICE(BROADCOM, 0x16e7), .driver_data = BCM57404_NPAR },
 	{ PCI_VDEVICE(BROADCOM, 0x16e8), .driver_data = BCM57406_NPAR },
 	{ PCI_VDEVICE(BROADCOM, 0x16e9), .driver_data = BCM57407_SFP },
+	{ PCI_VDEVICE(BROADCOM, 0x16ea), .driver_data = BCM57407_NPAR },
+	{ PCI_VDEVICE(BROADCOM, 0x16eb), .driver_data = BCM57412_NPAR },
 	{ PCI_VDEVICE(BROADCOM, 0x16ec), .driver_data = BCM57414_NPAR },
+	{ PCI_VDEVICE(BROADCOM, 0x16ed), .driver_data = BCM57414_NPAR },
 	{ PCI_VDEVICE(BROADCOM, 0x16ee), .driver_data = BCM57416_NPAR },
+	{ PCI_VDEVICE(BROADCOM, 0x16ef), .driver_data = BCM57416_NPAR },
 #ifdef CONFIG_BNXT_SRIOV
-	{ PCI_VDEVICE(BROADCOM, 0x16cb), .driver_data = BCM57304_VF },
-	{ PCI_VDEVICE(BROADCOM, 0x16d3), .driver_data = BCM57404_VF },
-	{ PCI_VDEVICE(BROADCOM, 0x16dc), .driver_data = BCM57414_VF },
-	{ PCI_VDEVICE(BROADCOM, 0x16e1), .driver_data = BCM57314_VF },
+	{ PCI_VDEVICE(BROADCOM, 0x16c1), .driver_data = NETXTREME_E_VF },
+	{ PCI_VDEVICE(BROADCOM, 0x16cb), .driver_data = NETXTREME_C_VF },
+	{ PCI_VDEVICE(BROADCOM, 0x16d3), .driver_data = NETXTREME_E_VF },
+	{ PCI_VDEVICE(BROADCOM, 0x16dc), .driver_data = NETXTREME_E_VF },
+	{ PCI_VDEVICE(BROADCOM, 0x16e1), .driver_data = NETXTREME_C_VF },
+	{ PCI_VDEVICE(BROADCOM, 0x16e5), .driver_data = NETXTREME_C_VF },
 #endif
 	{ 0 }
 };
@@ -189,8 +194,7 @@ static const u16 bnxt_async_events_arr[] = {
 
 static bool bnxt_vf_pciid(enum board_idx idx)
 {
-	return (idx == BCM57304_VF || idx == BCM57404_VF ||
-		idx == BCM57314_VF || idx == BCM57414_VF);
+	return (idx == NETXTREME_C_VF || idx == NETXTREME_E_VF);
 }
 
 #define DB_CP_REARM_FLAGS	(DB_KEY_CP | DB_IDX_VALID)
Signature · 1 line
1.8.3.1
author maintainer
#3 lore raw

PATCH 3/10 bnxt_en: Update to firmware interface spec 1.5.1.

In reply to Michael Chan
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c     |    3 +
 drivers/net/ethernet/broadcom/bnxt/bnxt.h     |   14 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 1251 +++++++++++++++----------
 3 files changed, 760 insertions(+), 508 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +3 -0
index d9b4cd1..f6b4f34 100644
@@ -4253,6 +4253,9 @@ static int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)
 	if (bp->max_tc > BNXT_MAX_QUEUE)
 		bp->max_tc = BNXT_MAX_QUEUE;
 
+	if (resp->queue_cfg_info & QUEUE_QPORTCFG_RESP_QUEUE_CFG_INFO_ASYM_CFG)
+		bp->max_tc = 1;
+
 	qptr = &resp->queue_id0;
 	for (i = 0; i < bp->max_tc; i++) {
 		bp->q_info[i].queue_id = *qptr++;
drivers/net/ethernet/broadcom/bnxt/bnxt.h +7 -7
index db4814e..012cc51 100644
@@ -11,10 +11,10 @@
 #define BNXT_H
 
 #define DRV_MODULE_NAME		"bnxt_en"
-#define DRV_MODULE_VERSION	"1.3.0"
+#define DRV_MODULE_VERSION	"1.5.0"
 
 #define DRV_VER_MAJ	1
-#define DRV_VER_MIN	3
+#define DRV_VER_MIN	5
 #define DRV_VER_UPD	0
 
 struct tx_bd {
@@ -106,11 +106,11 @@ struct tx_cmp {
 	 #define CMP_TYPE_REMOTE_DRIVER_REQ			 34
 	 #define CMP_TYPE_REMOTE_DRIVER_RESP			 36
 	 #define CMP_TYPE_ERROR_STATUS				 48
-	 #define CMPL_BASE_TYPE_STAT_EJECT			 (0x1aUL << 0)
-	 #define CMPL_BASE_TYPE_HWRM_DONE			 (0x20UL << 0)
-	 #define CMPL_BASE_TYPE_HWRM_FWD_REQ			 (0x22UL << 0)
-	 #define CMPL_BASE_TYPE_HWRM_FWD_RESP			 (0x24UL << 0)
-	 #define CMPL_BASE_TYPE_HWRM_ASYNC_EVENT		 (0x2eUL << 0)
+	 #define CMPL_BASE_TYPE_STAT_EJECT			 0x1aUL
+	 #define CMPL_BASE_TYPE_HWRM_DONE			 0x20UL
+	 #define CMPL_BASE_TYPE_HWRM_FWD_REQ			 0x22UL
+	 #define CMPL_BASE_TYPE_HWRM_FWD_RESP			 0x24UL
+	 #define CMPL_BASE_TYPE_HWRM_ASYNC_EVENT		 0x2eUL
 
 	#define TX_CMP_FLAGS_ERROR				(1 << 6)
 	#define TX_CMP_FLAGS_PUSH				(1 << 7)
drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h +750 -501

1,890 lines not on this page · raw message

Signature · 1 line
1.8.3.1
author maintainer
#4 lore raw

PATCH 4/10 bnxt_en: Added support for Secure Firmware Update

In reply to Michael Chan

From: Rob Swindell <[email protected]>

Using Ethtool flashdev command, entire NVM package (*.pkg) files may now be staged into the "update" area of the NVM and subsequently verified and installed by the firmware using the newly introduced
command: NVM_INSTALL_UPDATE.

We also introduce use of the new firmware command FW_SET_TIME so that the NVM-resident package installation log contains valid time-stamps.

---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c         |  24 ++++
 drivers/net/ethernet/broadcom/bnxt/bnxt.h         |   1 +
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 155 ++++++++++++++++++++--
 drivers/net/ethernet/broadcom/bnxt/bnxt_fw_hdr.h  |  16 ++-
 4 files changed, 182 insertions(+), 14 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +24 -0
index f6b4f34..f0a9d23 100644
@@ -32,6 +32,7 @@
 #include <linux/mii.h>
 #include <linux/if.h>
 #include <linux/if_vlan.h>
+#include <linux/rtc.h>
 #include <net/ip.h>
 #include <net/tcp.h>
 #include <net/udp.h>
@@ -4314,6 +4315,27 @@ hwrm_ver_get_exit:
 	return rc;
 }
 
+int bnxt_hwrm_fw_set_time(struct bnxt *bp)
+{
+	struct hwrm_fw_set_time_input req = {0};
+	struct rtc_time tm;
+	struct timeval tv;
+
+	if (bp->hwrm_spec_code < 0x10400)
+		return -EOPNOTSUPP;
+
+	do_gettimeofday(&tv);
+	rtc_time_to_tm(tv.tv_sec, &tm);
+	bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FW_SET_TIME, -1, -1);
+	req.year = cpu_to_le16(1900 + tm.tm_year);
+	req.month = 1 + tm.tm_mon;
+	req.day = tm.tm_mday;
+	req.hour = tm.tm_hour;
+	req.minute = tm.tm_min;
+	req.second = tm.tm_sec;
+	return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
+}
+
 static int bnxt_hwrm_port_qstats(struct bnxt *bp)
 {
 	int rc;
@@ -6811,6 +6833,8 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (rc)
 		goto init_err;
 
+	bnxt_hwrm_fw_set_time(bp);
+
 	dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_SG |
 			   NETIF_F_TSO | NETIF_F_TSO6 |
 			   NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_GRE |
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -0
index 012cc51..41033d0 100644
@@ -1220,6 +1220,7 @@ int bnxt_hwrm_set_coal(struct bnxt *);
 int bnxt_hwrm_func_qcaps(struct bnxt *);
 int bnxt_hwrm_set_pause(struct bnxt *);
 int bnxt_hwrm_set_link_setting(struct bnxt *, bool, bool);
+int bnxt_hwrm_fw_set_time(struct bnxt *);
 int bnxt_open_nic(struct bnxt *, bool, bool);
 int bnxt_close_nic(struct bnxt *, bool, bool);
 int bnxt_get_max_rings(struct bnxt *, int *, int *, bool);
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +142 -13

222 lines not on this page · raw message

drivers/net/ethernet/broadcom/bnxt/bnxt_fw_hdr.h +15 -1
index 82bf44a..cad30dd 100644
@@ -11,6 +11,7 @@
 #define __BNXT_FW_HDR_H__
 
 #define BNXT_FIRMWARE_BIN_SIGNATURE     0x1a4d4342	/* "BCM"+0x1a */
+#define BNXT_UCODE_TRAILER_SIGNATURE	0x726c7254	/* "Trlr" */
 
 enum SUPPORTED_FAMILY {
 	DEVICE_5702_3_4_FAMILY,		/* 0  - Denali, Vinson, K2 */
@@ -85,7 +86,7 @@ enum SUPPORTED_MEDIA {
 
 struct bnxt_fw_header {
 	__le32 signature;	/* constains the constant value of
-				 * BNXT_Firmware_Bin_Signatures
+				 * BNXT_FIRMWARE_BIN_SIGNATURE
 				 */
 	u8 flags;		/* reserved for ChiMP use */
 	u8 code_type;		/* enum SUPPORTED_CODE */
@@ -102,4 +103,17 @@ struct bnxt_fw_header {
 	u8 major_ver;
 };
 
+/* Microcode and pre-boot software/firmware trailer: */
+struct bnxt_ucode_trailer {
+	u8 rsa_sig[256];
+	__le16 flags;
+	u8 version_format;
+	u8 version_length;
+	u8 version[16];
+	__le16 dir_type;
+	__le16 trailer_length;
+	__le32 sig;		/* BNXT_UCODE_TRAILER_SIGNATURE */
+	__le32 chksum;		/* CRC-32 */
+};
+
 #endif
Signature · 1 line
1.8.3.1
#5 lore raw

RE: [PATCH net-next 04/10] bnxt_en: Added support for Secure Firmware Update

drivers/net/ethernet/broadcom/bnxt/bnxt.c hwrm_ver_get_exit: · line 4325

Quoted 2 lines
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -0
+	if (bp->hwrm_spec_code < 0x10400)
+		return -EOPNOTSUPP;

Don't you use defines for these kind of version values?

Quoted 1 line

static int bnxt_flash_package_from_file(struct net_device *dev,

...

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_flash_firmware_from_file(struct net_device *dev, · line 1334

Quoted 2 lines
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +2 -0
+	rc = request_firmware(&fw, filename, &dev->dev);
+	if (rc != 0) {

If (rc)

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_flash_firmware_from_file(struct net_device *dev, · line 1376

Quoted 2 lines
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +2 -0
+	if ((install_type & 0xffff) == 0)
+		install_type >>= 16;

! instead of "== 0". Also, this looks 'magical'.

author maintainer
#6 lore raw

Re: [PATCH net-next 04/10] bnxt_en: Added support for Secure Firmware Update

Quoted 3 lines · Yuval

drivers/net/ethernet/broadcom/bnxt/bnxt.c hwrm_ver_get_exit: · line 4325

Quoted 2 lines
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -0
+     if (bp->hwrm_spec_code < 0x10400)
+             return -EOPNOTSUPP;

Don't you use defines for these kind of version values?

No we don't. In this case, firmware spec version 1.4.0 has added this new feature. So we use this feature if the firmware spec is 1.4.0 or above.

#7 lore raw

Re: [PATCH net-next 04/10] bnxt_en: Added support for Secure Firmware Update

In reply to Michael Chan
url: https://github.com/0day-ci/linux/commits/Michael-Chan/bnxt-update-for-net-next/20160919-161506 config: s390-allmodconfig (attached as .config) compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9)…

Hi Rob,

[auto build test ERROR on net-next/master]

url: https://github.com/0day-ci/linux/commits/Michael-Chan/bnxt-update-for-net-next/20160919-161506
config: s390-allmodconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=s390

All errors (new ones prefixed by >>):

>> ERROR: "rtc_time64_to_tm" [drivers/net/ethernet/broadcom/bnxt/bnxt_en.ko] undefined!

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

author maintainer
#8 lore raw

PATCH 5/10 bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

In reply to Michael Chan

The existing code is inconsistent in reporting and accepting the combined channel count. bnxt_get_channels() reports maximum combined as the maximum rx count. bnxt_set_channels() accepts combined count that cannot be bigger than max rx or max tx.

For example, if max rx = 2 and max tx = 1, we report max supported combined to be 2. But if the user tries to set combined to 2, it will fail because 2 is bigger than max tx which is 1.

Fix the code to be consistent. Max allowed combined = max(max_rx, max_tx). We will accept a combined channel count <= max(max_rx, max_tx).

---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +7 -5
index 4a430b6..c74ce69 100644
@@ -348,7 +348,7 @@ static void bnxt_get_channels(struct net_device *dev,
 	int max_rx_rings, max_tx_rings, tcs;
 
 	bnxt_get_max_rings(bp, &max_rx_rings, &max_tx_rings, true);
-	channel->max_combined = max_rx_rings;
+	channel->max_combined = max_t(int, max_rx_rings, max_tx_rings);
 
 	if (bnxt_get_max_rings(bp, &max_rx_rings, &max_tx_rings, false)) {
 		max_rx_rings = 0;
@@ -406,8 +406,8 @@ static int bnxt_set_channels(struct net_device *dev,
 	if (tcs > 1)
 		max_tx_rings /= tcs;
 
-	if (sh && (channel->combined_count > max_rx_rings ||
-		   channel->combined_count > max_tx_rings))
+	if (sh &&
+	    channel->combined_count > max_t(int, max_rx_rings, max_tx_rings))
 		return -ENOMEM;
 
 	if (!sh && (channel->rx_count > max_rx_rings ||
@@ -430,8 +430,10 @@ static int bnxt_set_channels(struct net_device *dev,
 
 	if (sh) {
 		bp->flags |= BNXT_FLAG_SHARED_RINGS;
-		bp->rx_nr_rings = channel->combined_count;
-		bp->tx_nr_rings_per_tc = channel->combined_count;
+		bp->rx_nr_rings = min_t(int, channel->combined_count,
+					max_rx_rings);
+		bp->tx_nr_rings_per_tc = min_t(int, channel->combined_count,
+					       max_tx_rings);
 	} else {
 		bp->flags &= ~BNXT_FLAG_SHARED_RINGS;
 		bp->rx_nr_rings = channel->rx_count;
Signature · 1 line
1.8.3.1
#9 lore raw

RE: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

Quoted 11 lines

The existing code is inconsistent in reporting and accepting the combined channel count. bnxt_get_channels() reports maximum combined as the maximum rx count. bnxt_set_channels() accepts combined count that cannot be bigger than max rx or max tx.

For example, if max rx = 2 and max tx = 1, we report max supported combined to be 2. But if the user tries to set combined to 2, it will fail because 2 is bigger than max tx which is 1.

Fix the code to be consistent. Max allowed combined = max(max_rx, max_tx). We will accept a combined channel count <= max(max_rx, max_tx).

Don't you mean the 'max allowed combined = min(max_rx, max_tx)'. How does using 'max' change the faulty scenario you've described?

author maintainer
#10 lore raw

Re: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

Quoted 9 lines · Yuval
Quoted 9 lines

The existing code is inconsistent in reporting and accepting the combined channel count. bnxt_get_channels() reports maximum combined as the maximum rx count. bnxt_set_channels() accepts combined count that cannot be bigger than max rx or max tx.

For example, if max rx = 2 and max tx = 1, we report max supported combined to be 2. But if the user tries to set combined to 2, it will fail because 2 is bigger than max tx which is 1.

Quoted 5 lines
Quoted 2 lines

Fix the code to be consistent. Max allowed combined = max(max_rx, max_tx). We will accept a combined channel count <= max(max_rx, max_tx).

Don't you mean the 'max allowed combined = min(max_rx, max_tx)'. How does using 'max' change the faulty scenario you've described?

I'm fixing the inconsistency described in the first 2 paragraphs. The driver logic allows a combined ring to be rx or tx only. In the above example, we allow combined to be set to 2. The 2nd combined ring supports rx only.

#11 lore raw

RE: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

Quoted 11 lines
Quoted 10 lines
Quoted 10 lines

The existing code is inconsistent in reporting and accepting the combined channel count. bnxt_get_channels() reports maximum combined as the maximum rx count. bnxt_set_channels() accepts combined count that cannot be bigger than max rx or max tx.

For example, if max rx = 2 and max tx = 1, we report max supported combined to be 2. But if the user tries to set combined to 2, it will fail because 2 is bigger than max tx which is 1.

Fix the code to be consistent. Max allowed combined = max(max_rx,

max_tx).

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

We will accept a combined channel count <= max(max_rx, max_tx).

Don't you mean the 'max allowed combined = min(max_rx, max_tx)'. How does using 'max' change the faulty scenario you've described?

I'm fixing the inconsistency described in the first 2 paragraphs. The driver logic allows a combined ring to be rx or tx only. In the above example, we allow combined to be set to 2. The 2nd combined ring supports rx only.

Then what makes it a combined channel?
Sounds to me like in the above scenario you should have claimed support for:
- max rx == 2
- max tx == 1
- max combined == 1

author maintainer
#12 lore raw

Re: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

Quoted 20 lines · Yuval
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines

The existing code is inconsistent in reporting and accepting the combined channel count. bnxt_get_channels() reports maximum combined as the maximum rx count. bnxt_set_channels() accepts combined count that cannot be bigger than max rx or max tx.

For example, if max rx = 2 and max tx = 1, we report max supported combined to be 2. But if the user tries to set combined to 2, it will fail because 2 is bigger than max tx which is 1.

Fix the code to be consistent. Max allowed combined = max(max_rx,

max_tx).

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

We will accept a combined channel count <= max(max_rx, max_tx).

Don't you mean the 'max allowed combined = min(max_rx, max_tx)'. How does using 'max' change the faulty scenario you've described?

I'm fixing the inconsistency described in the first 2 paragraphs. The driver logic allows a combined ring to be rx or tx only. In the above example, we allow combined to be set to 2. The 2nd combined ring supports rx only.

Quoted 5 lines

Then what makes it a combined channel?
Sounds to me like in the above scenario you should have claimed support for:
- max rx == 2
- max tx == 1
- max combined == 1

Our implementation will report:

max rx 2
max tx 1
max combined 2

If the user chooses 2 rx and 1 tx, he will use 3 msix vectors (3 completion rings, etc). If the user chooses 2 combined (1 with rx/tx, 1 with rx only), he will use 2 msix vectors (2 completion rings, etc). With a large number of NPAR functions and SRIOV functions, the number of rings available per function may not be symmetrical. We just want maximum flexibility to make use of all available resources in 2 different modes (one that uses more resources and one that uses less).

#13 lore raw

RE: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

Quoted 33 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines

The existing code is inconsistent in reporting and accepting the combined channel count. bnxt_get_channels() reports maximum combined as the maximum rx count. bnxt_set_channels() accepts combined count that cannot be bigger than max rx or max tx.

For example, if max rx = 2 and max tx = 1, we report max supported combined to be 2. But if the user tries to set combined to 2, it will fail because 2 is bigger than max tx which is 1.

Fix the code to be consistent. Max allowed combined = max(max_rx,

max_tx).

Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 1 line

We will accept a combined channel count <= max(max_rx, max_tx).

Don't you mean the 'max allowed combined = min(max_rx, max_tx)'. How does using 'max' change the faulty scenario you've described?

I'm fixing the inconsistency described in the first 2 paragraphs. The driver logic allows a combined ring to be rx or tx only. In the above example, we allow combined to be set to 2. The 2nd combined ring

supports rx only.

Quoted 6 lines

Then what makes it a combined channel?
Sounds to me like in the above scenario you should have claimed support for:
- max rx == 2
- max tx == 1
- max combined == 1

Our implementation will report:

max rx 2
max tx 1
max combined 2

Quoted 7 lines

If the user chooses 2 rx and 1 tx, he will use 3 msix vectors (3 completion rings, etc). If the user chooses 2 combined (1 with rx/tx,
1 with rx only), he will use 2 msix vectors (2 completion rings, etc). With a large number of NPAR functions and SRIOV functions, the number of rings available per function may not be symmetrical. We just want maximum flexibility to make use of all available resources in 2 different modes (one that uses more resources and one that uses less).

Sounds like the user should chose 1 combined in 1 rx in this scenario.

author maintainer
#14 lore raw

Re: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

Quoted 10 lines · Yuval
Quoted 8 lines

If the user chooses 2 rx and 1 tx, he will use 3 msix vectors (3 completion rings, etc). If the user chooses 2 combined (1 with rx/tx,
1 with rx only), he will use 2 msix vectors (2 completion rings, etc). With a large number of NPAR functions and SRIOV functions, the number of rings available per function may not be symmetrical. We just want maximum flexibility to make use of all available resources in 2 different modes (one that uses more resources and one that uses less).

Sounds like the user should chose 1 combined in 1 rx in this scenario.

We only support all combined or all rx/tx. Supporting arbitrary combination of the 2 will add a lot more complication to the driver code. I don't think it will add any value to the user either. In the end, it's all the same and the user sees a simpler interface. If combined is chosen, the driver logic will combine all available rx/tx ring pairs. Any remaining rings will still be used to reach the desired combined count.

author maintainer
#15 lore raw

PATCH 6/10 bnxt_en: Re-arrange bnxt_hwrm_func_qcaps().

In reply to Michael Chan

Re-arrange the code so that the generation of the random MAC address for the VF is at the end of the function. The next patch will add one more step to call bnxt_approve_mac() to get the firmware to approve the random MAC address.

---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +12 -11
index f0a9d23..b1dcece 100644
@@ -4161,6 +4161,11 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
 	if (rc)
 		goto hwrm_func_qcaps_exit;
 
+	bp->tx_push_thresh = 0;
+	if (resp->flags &
+	    cpu_to_le32(FUNC_QCAPS_RESP_FLAGS_PUSH_MODE_SUPPORTED))
+		bp->tx_push_thresh = BNXT_TX_PUSH_THRESH;
+
 	if (BNXT_PF(bp)) {
 		struct bnxt_pf_info *pf = &bp->pf;
 
@@ -4192,12 +4197,6 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
 		struct bnxt_vf_info *vf = &bp->vf;
 
 		vf->fw_fid = le16_to_cpu(resp->fid);
-		memcpy(vf->mac_addr, resp->mac_address, ETH_ALEN);
-		if (is_valid_ether_addr(vf->mac_addr))
-			/* overwrite netdev dev_adr with admin VF MAC */
-			memcpy(bp->dev->dev_addr, vf->mac_addr, ETH_ALEN);
-		else
-			random_ether_addr(bp->dev->dev_addr);
 
 		vf->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx);
 		vf->max_cp_rings = le16_to_cpu(resp->max_cmpl_rings);
@@ -4209,14 +4208,16 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
 		vf->max_l2_ctxs = le16_to_cpu(resp->max_l2_ctxs);
 		vf->max_vnics = le16_to_cpu(resp->max_vnics);
 		vf->max_stat_ctxs = le16_to_cpu(resp->max_stat_ctx);
+
+		memcpy(vf->mac_addr, resp->mac_address, ETH_ALEN);
+		if (is_valid_ether_addr(vf->mac_addr))
+			/* overwrite netdev dev_adr with admin VF MAC */
+			memcpy(bp->dev->dev_addr, vf->mac_addr, ETH_ALEN);
+		else
+			random_ether_addr(bp->dev->dev_addr);
 #endif
 	}
 
-	bp->tx_push_thresh = 0;
-	if (resp->flags &
-	    cpu_to_le32(FUNC_QCAPS_RESP_FLAGS_PUSH_MODE_SUPPORTED))
-		bp->tx_push_thresh = BNXT_TX_PUSH_THRESH;
-
 hwrm_func_qcaps_exit:
 	mutex_unlock(&bp->hwrm_cmd_lock);
 	return rc;
Signature · 1 line
1.8.3.1
author maintainer
#16 lore raw

PATCH 7/10 bnxt_en: Call firmware to approve the random VF MAC address.

In reply to Michael Chan

After generating the random MAC address for VF, call the firmware to approve it. This step serves 2 purposes. Some hypervisor (e.g. ESX) wants to approve the MAC address. 2nd, the call will setup the proper forwarding database in the internal switch.

We need to unlock the hwrm_cmd_lock mutex before calling bnxt_approve_mac(). We can do that because we are at the end of the function and all the previous firmware response data has been copied.

---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +7 -2
index b1dcece..cbc0b8a 100644
@@ -4210,11 +4210,16 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
 		vf->max_stat_ctxs = le16_to_cpu(resp->max_stat_ctx);
 
 		memcpy(vf->mac_addr, resp->mac_address, ETH_ALEN);
-		if (is_valid_ether_addr(vf->mac_addr))
+		mutex_unlock(&bp->hwrm_cmd_lock);
+
+		if (is_valid_ether_addr(vf->mac_addr)) {
 			/* overwrite netdev dev_adr with admin VF MAC */
 			memcpy(bp->dev->dev_addr, vf->mac_addr, ETH_ALEN);
-		else
+		} else {
 			random_ether_addr(bp->dev->dev_addr);
+			rc = bnxt_approve_mac(bp, bp->dev->dev_addr);
+		}
+		return rc;
 #endif
 	}
 
Signature · 1 line
1.8.3.1
author maintainer
#17 lore raw

PATCH 8/10 bnxt_en: Pad TX packets below 52 bytes.

In reply to Michael Chan

The hardware has a limitation that it won't pass host to BMC loopback packets below 52-bytes.

---
 drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -1
index 41033d0..51b164a 100644
@@ -413,7 +413,7 @@ struct rx_tpa_end_cmp_ext {
 
 #define BNXT_RX_PAGE_SIZE (1 << BNXT_RX_PAGE_SHIFT)
 
-#define BNXT_MIN_PKT_SIZE	45
+#define BNXT_MIN_PKT_SIZE	52
 
 #define BNXT_NUM_TESTS(bp)	0
 
Signature · 1 line
1.8.3.1
author maintainer
#18 lore raw

PATCH 9/10 bnxt_en: Support for "ethtool -r" command

In reply to Michael Chan

From: Deepak Khungar <[email protected]>

Restart autoneg if autoneg is enabled.

---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +20 -0
index c74ce69..a7e04ff 100644
@@ -1849,6 +1849,25 @@ static int bnxt_get_module_eeprom(struct net_device *dev,
 	return rc;
 }
 
+static int bnxt_nway_reset(struct net_device *dev)
+{
+	int rc = 0;
+
+	struct bnxt *bp = netdev_priv(dev);
+	struct bnxt_link_info *link_info = &bp->link_info;
+
+	if (!BNXT_SINGLE_PF(bp))
+		return -EOPNOTSUPP;
+
+	if (!(link_info->autoneg & BNXT_AUTONEG_SPEED))
+		return -EINVAL;
+
+	if (netif_running(dev))
+		rc = bnxt_hwrm_set_link_setting(bp, true, false);
+
+	return rc;
+}
+
 const struct ethtool_ops bnxt_ethtool_ops = {
 	.get_link_ksettings	= bnxt_get_link_ksettings,
 	.set_link_ksettings	= bnxt_set_link_ksettings,
@@ -1881,4 +1900,5 @@ const struct ethtool_ops bnxt_ethtool_ops = {
 	.set_eee		= bnxt_set_eee,
 	.get_module_info	= bnxt_get_module_info,
 	.get_module_eeprom	= bnxt_get_module_eeprom,
+	.nway_reset		= bnxt_nway_reset
 };
Signature · 1 line
1.8.3.1
#19 lore raw

RE: [PATCH net-next 09/10] bnxt_en: Support for "ethtool -r" command

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_get_module_eeprom(struct net_device *dev, · line 1863

Quoted 4 lines

Restart autoneg if autoneg is enabled.

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +2 -0
+	if (!(link_info->autoneg & BNXT_AUTONEG_SPEED))
+		return -EINVAL;

Looks like a lot of the of implementations of this ethtool are unconditionally doing the reset.
Perhaps the right thing to do is check for autoneg availability at the ethtool core itself?

[Not an objection to this patch in any way as there are tens of implementations doing the same; Simply noting this]

author maintainer
#20 lore raw

PATCH 10/10 bnxt_en: Fixed the VF link status after a link state change

In reply to Michael Chan

From: Eddie Wai <[email protected]>

The VF link state can be changed via the 'ip link set' cmd. Currently, the new link state does not take effect immediately.

The fix is for the PF to send a link change async event to the designated VF after a VF link state change. This async event will trigger the VF to update the link status.

---
 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 84 ++++++++++++-------------
 1 file changed, 42 insertions(+), 42 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c +42 -42
index 50d2007..8be7185 100644
@@ -19,6 +19,45 @@
 #include "bnxt_ethtool.h"
 
 #ifdef CONFIG_BNXT_SRIOV
+static int bnxt_hwrm_fwd_async_event_cmpl(struct bnxt *bp,
+					  struct bnxt_vf_info *vf, u16 event_id)
+{
+	struct hwrm_fwd_async_event_cmpl_output *resp = bp->hwrm_cmd_resp_addr;
+	struct hwrm_fwd_async_event_cmpl_input req = {0};
+	struct hwrm_async_event_cmpl *async_cmpl;
+	int rc = 0;
+
+	bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FWD_ASYNC_EVENT_CMPL, -1, -1);
+	if (vf)
+		req.encap_async_event_target_id = cpu_to_le16(vf->fw_fid);
+	else
+		/* broadcast this async event to all VFs */
+		req.encap_async_event_target_id = cpu_to_le16(0xffff);
+	async_cmpl = (struct hwrm_async_event_cmpl *)req.encap_async_event_cmpl;
+	async_cmpl->type =
+		cpu_to_le16(HWRM_ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT);
+	async_cmpl->event_id = cpu_to_le16(event_id);
+
+	mutex_lock(&bp->hwrm_cmd_lock);
+	rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
+
+	if (rc) {
+		netdev_err(bp->dev, "hwrm_fwd_async_event_cmpl failed. rc:%d\n",
+			   rc);
+		goto fwd_async_event_cmpl_exit;
+	}
+
+	if (resp->error_code) {
+		netdev_err(bp->dev, "hwrm_fwd_async_event_cmpl error %d\n",
+			   resp->error_code);
+		rc = -1;
+	}
+
+fwd_async_event_cmpl_exit:
+	mutex_unlock(&bp->hwrm_cmd_lock);
+	return rc;
+}
+
 static int bnxt_vf_ndo_prep(struct bnxt *bp, int vf_id)
 {
 	if (!test_bit(BNXT_STATE_OPEN, &bp->state)) {
@@ -243,8 +282,9 @@ int bnxt_set_vf_link_state(struct net_device *dev, int vf_id, int link)
 		rc = -EINVAL;
 		break;
 	}
-	/* CHIMP TODO: send msg to VF to update new link state */
-
+	if (vf->flags & (BNXT_VF_LINK_UP | BNXT_VF_LINK_FORCED))
+		rc = bnxt_hwrm_fwd_async_event_cmpl(bp, vf,
+			HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE);
 	return rc;
 }
 
@@ -525,46 +565,6 @@ err_out1:
 	return rc;
 }
 
-static int bnxt_hwrm_fwd_async_event_cmpl(struct bnxt *bp,
-					  struct bnxt_vf_info *vf,
-					  u16 event_id)
-{
-	int rc = 0;
-	struct hwrm_fwd_async_event_cmpl_input req = {0};
-	struct hwrm_fwd_async_event_cmpl_output *resp = bp->hwrm_cmd_resp_addr;
-	struct hwrm_async_event_cmpl *async_cmpl;
-
-	bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FWD_ASYNC_EVENT_CMPL, -1, -1);
-	if (vf)
-		req.encap_async_event_target_id = cpu_to_le16(vf->fw_fid);
-	else
-		/* broadcast this async event to all VFs */
-		req.encap_async_event_target_id = cpu_to_le16(0xffff);
-	async_cmpl = (struct hwrm_async_event_cmpl *)req.encap_async_event_cmpl;
-	async_cmpl->type =
-		cpu_to_le16(HWRM_ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT);
-	async_cmpl->event_id = cpu_to_le16(event_id);
-
-	mutex_lock(&bp->hwrm_cmd_lock);
-	rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
-
-	if (rc) {
-		netdev_err(bp->dev, "hwrm_fwd_async_event_cmpl failed. rc:%d\n",
-			   rc);
-		goto fwd_async_event_cmpl_exit;
-	}
-
-	if (resp->error_code) {
-		netdev_err(bp->dev, "hwrm_fwd_async_event_cmpl error %d\n",
-			   resp->error_code);
-		rc = -1;
-	}
-
-fwd_async_event_cmpl_exit:
-	mutex_unlock(&bp->hwrm_cmd_lock);
-	return rc;
-}
-
 void bnxt_sriov_disable(struct bnxt *bp)
 {
 	u16 num_vfs = pci_num_vf(bp->pdev);
Signature · 1 line
1.8.3.1
author maintainer
#22 lore raw
Quoted 6 lines · David Miller

From: Michael Chan <[email protected]>
Date: Mon, 19 Sep 2016 03:57:59 -0400

Quoted 1 line

Misc. changes and minor bug fixes for net-next. Please review.

Series applied, thanks Michael.

Sorry, I missed this and sent out v2. Please ignore v2 and I will send a small patch to fix up the kbuild_test_rebot error. Thanks.