Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-01-11 10:01:50 +0100
committerPetr Tesarik <ptesarik@suse.cz>2019-01-11 10:01:50 +0100
commite29e6e3d4ba1fad7b2e4a118377fe33ad0e2c016 (patch)
tree1113de34958a6376e8c7aac4b6083b7a54f490a6
parentb5abdb5ae783fc0500f39dae9f07ae932d1d8208 (diff)
parent22738761adc0b836f586cc7bdbaac6bb0eaa4425 (diff)
Merge branch 'users/tbogendoerfer/SLE15-SP1/for-next' into SLE15-SP1
Pull bnx2x updates from Thomas Bogendoerfer
-rw-r--r--patches.drivers/bnx2x-Add-MBI-version-to-ethtool-driver-query-output.patch71
-rw-r--r--patches.drivers/bnx2x-Add-VF-spoof-checking-configuration.patch162
-rw-r--r--patches.drivers/bnx2x-Add-storm-FW-version-to-ethtool-driver-query-o.patch32
-rw-r--r--patches.drivers/bnx2x-Assign-unique-DMAE-channel-number-for-FW-DMAE-.patch58
-rw-r--r--patches.drivers/bnx2x-Clear-fip-MAC-when-fcoe-offload-support-is-dis.patch34
-rw-r--r--patches.drivers/bnx2x-Enable-PTP-only-on-the-PF-that-initializes-the.patch109
-rw-r--r--patches.drivers/bnx2x-Fix-NULL-pointer-dereference-in-bnx2x_del_all_.patch102
-rw-r--r--patches.drivers/bnx2x-Ignore-bandwidth-attention-in-single-function-.patch40
-rw-r--r--patches.drivers/bnx2x-Mark-expected-switch-fall-throughs.patch102
-rw-r--r--patches.drivers/bnx2x-Provide-VF-link-status-in-ndo_get_vf_config.patch28
-rw-r--r--patches.drivers/bnx2x-Remove-configured-vlans-as-part-of-unload-sequ.patch107
-rw-r--r--patches.drivers/bnx2x-Send-update-svid-ramrod-with-retry-poll-flags-.patch65
-rw-r--r--series.conf12
13 files changed, 922 insertions, 0 deletions
diff --git a/patches.drivers/bnx2x-Add-MBI-version-to-ethtool-driver-query-output.patch b/patches.drivers/bnx2x-Add-MBI-version-to-ethtool-driver-query-output.patch
new file mode 100644
index 0000000000..1cb3f449b0
--- /dev/null
+++ b/patches.drivers/bnx2x-Add-MBI-version-to-ethtool-driver-query-output.patch
@@ -0,0 +1,71 @@
+From: Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
+Date: Mon, 26 Nov 2018 22:25:56 -0800
+Subject: bnx2x: Add MBI version to ethtool driver query output.
+Patch-mainline: v5.0-rc1
+Git-commit: a1bcaf023120d44c3500cbcf5769bb3cf034c9ca
+References: bsc#1104402 FATE#325899
+
+The patch populates the MBI version in the ethtool driver query data.
+Adding 'extended_dev_info_shared_cfg' structure describing the nvram
+structure, this is required to access the mbi version string.
+
+Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
+Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 24 +++++++++++++++++++-
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h | 5 ++++
+ 2 files changed, 28 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+@@ -1105,11 +1105,33 @@ static void bnx2x_get_drvinfo(struct net
+ struct ethtool_drvinfo *info)
+ {
+ struct bnx2x *bp = netdev_priv(dev);
++ char version[ETHTOOL_FWVERS_LEN];
++ int ext_dev_info_offset;
++ u32 mbi;
+
+ strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver));
+ strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version));
+
+- bnx2x_fill_fw_str(bp, info->fw_version, sizeof(info->fw_version));
++ if (SHMEM2_HAS(bp, extended_dev_info_shared_addr)) {
++ ext_dev_info_offset = SHMEM2_RD(bp,
++ extended_dev_info_shared_addr);
++ mbi = REG_RD(bp, ext_dev_info_offset +
++ offsetof(struct extended_dev_info_shared_cfg,
++ mbi_version));
++ if (mbi) {
++ memset(version, 0, sizeof(version));
++ snprintf(version, ETHTOOL_FWVERS_LEN, "mbi %d.%d.%d ",
++ (mbi & 0xff000000) >> 24,
++ (mbi & 0x00ff0000) >> 16,
++ (mbi & 0x0000ff00) >> 8);
++ strlcpy(info->fw_version, version,
++ sizeof(info->fw_version));
++ }
++ }
++
++ memset(version, 0, sizeof(version));
++ bnx2x_fill_fw_str(bp, version, ETHTOOL_FWVERS_LEN);
++ strlcat(info->fw_version, version, sizeof(info->fw_version));
+
+ strlcpy(info->bus_info, pci_name(bp->pdev), sizeof(info->bus_info));
+ }
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
+@@ -1140,6 +1140,11 @@ struct shm_dev_info { /* size */
+
+ };
+
++struct extended_dev_info_shared_cfg {
++ u32 reserved[18];
++ u32 mbi_version;
++ u32 mbi_date;
++};
+
+ #if !defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN)
+ #error "Missing either LITTLE_ENDIAN or BIG_ENDIAN definition."
diff --git a/patches.drivers/bnx2x-Add-VF-spoof-checking-configuration.patch b/patches.drivers/bnx2x-Add-VF-spoof-checking-configuration.patch
new file mode 100644
index 0000000000..862e7b4799
--- /dev/null
+++ b/patches.drivers/bnx2x-Add-VF-spoof-checking-configuration.patch
@@ -0,0 +1,162 @@
+From: Shahed Shaikh <shahed.shaikh@cavium.com>
+Date: Thu, 20 Sep 2018 11:22:50 -0700
+Subject: bnx2x: Add VF spoof-checking configuration
+Patch-mainline: v4.20-rc1
+Git-commit: 753039650455b0efcbbcc3f1f28ac429f9edd717
+References: bsc#1104402 FATE#325899
+
+Add support for `ndo_set_vf_spoofchk' to allow PF control over
+its VF spoof-checking configuration.
+
+Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
+Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 1
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 1
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 80 +++++++++++++++++++++-
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 2
+ 4 files changed, 82 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+@@ -494,6 +494,7 @@ int bnx2x_get_vf_config(struct net_devic
+ int bnx2x_set_vf_mac(struct net_device *dev, int queue, u8 *mac);
+ int bnx2x_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos,
+ __be16 vlan_proto);
++int bnx2x_set_vf_spoofchk(struct net_device *dev, int idx, bool val);
+
+ /* select_queue callback */
+ u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb,
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+@@ -13105,6 +13105,7 @@ static const struct net_device_ops bnx2x
+ .ndo_set_vf_mac = bnx2x_set_vf_mac,
+ .ndo_set_vf_vlan = bnx2x_set_vf_vlan,
+ .ndo_get_vf_config = bnx2x_get_vf_config,
++ .ndo_set_vf_spoofchk = bnx2x_set_vf_spoofchk,
+ #endif
+ #ifdef NETDEV_FCOE_WWNN
+ .ndo_fcoe_get_wwn = bnx2x_fcoe_get_wwn,
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+@@ -209,7 +209,10 @@ void bnx2x_vfop_qctor_prep(struct bnx2x
+ */
+ __set_bit(BNX2X_Q_FLG_TX_SWITCH, &setup_p->flags);
+ __set_bit(BNX2X_Q_FLG_TX_SEC, &setup_p->flags);
+- __set_bit(BNX2X_Q_FLG_ANTI_SPOOF, &setup_p->flags);
++ if (vf->spoofchk)
++ __set_bit(BNX2X_Q_FLG_ANTI_SPOOF, &setup_p->flags);
++ else
++ __clear_bit(BNX2X_Q_FLG_ANTI_SPOOF, &setup_p->flags);
+
+ /* Setup-op rx parameters */
+ if (test_bit(BNX2X_Q_TYPE_HAS_RX, &q_type)) {
+@@ -1268,6 +1271,8 @@ int bnx2x_iov_init_one(struct bnx2x *bp,
+ bnx2x_vf(bp, i, state) = VF_FREE;
+ mutex_init(&bnx2x_vf(bp, i, op_mutex));
+ bnx2x_vf(bp, i, op_current) = CHANNEL_TLV_NONE;
++ /* enable spoofchk by default */
++ bnx2x_vf(bp, i, spoofchk) = 1;
+ }
+
+ /* re-read the IGU CAM for VFs - index and abs_vfid must be set */
+@@ -2631,7 +2636,7 @@ int bnx2x_get_vf_config(struct net_devic
+ ivi->qos = 0;
+ ivi->max_tx_rate = 10000; /* always 10G. TBA take from link struct */
+ ivi->min_tx_rate = 0;
+- ivi->spoofchk = 1; /*always enabled */
++ ivi->spoofchk = vf->spoofchk ? 1 : 0;
+ if (vf->state == VF_ENABLED) {
+ /* mac and vlan are in vlan_mac objects */
+ if (bnx2x_validate_vf_sp_objs(bp, vf, false)) {
+@@ -2948,6 +2953,77 @@ out:
+
+ return rc;
+ }
++
++int bnx2x_set_vf_spoofchk(struct net_device *dev, int idx, bool val)
++{
++ struct bnx2x *bp = netdev_priv(dev);
++ struct bnx2x_virtf *vf;
++ int i, rc = 0;
++
++ vf = BP_VF(bp, idx);
++ if (!vf)
++ return -EINVAL;
++
++ /* nothing to do */
++ if (vf->spoofchk == val)
++ return 0;
++
++ vf->spoofchk = val ? 1 : 0;
++
++ DP(BNX2X_MSG_IOV, "%s spoofchk for VF %d\n",
++ val ? "enabling" : "disabling", idx);
++
++ /* is vf initialized and queue set up? */
++ if (vf->state != VF_ENABLED ||
++ bnx2x_get_q_logical_state(bp, &bnx2x_leading_vfq(vf, sp_obj)) !=
++ BNX2X_Q_LOGICAL_STATE_ACTIVE)
++ return rc;
++
++ /* User should be able to see error in system logs */
++ if (!bnx2x_validate_vf_sp_objs(bp, vf, true))
++ return -EINVAL;
++
++ /* send queue update ramrods to configure spoofchk */
++ for_each_vfq(vf, i) {
++ struct bnx2x_queue_state_params q_params = {NULL};
++ struct bnx2x_queue_update_params *update_params;
++
++ q_params.q_obj = &bnx2x_vfq(vf, i, sp_obj);
++
++ /* validate the Q is UP */
++ if (bnx2x_get_q_logical_state(bp, q_params.q_obj) !=
++ BNX2X_Q_LOGICAL_STATE_ACTIVE)
++ continue;
++
++ __set_bit(RAMROD_COMP_WAIT, &q_params.ramrod_flags);
++ q_params.cmd = BNX2X_Q_CMD_UPDATE;
++ update_params = &q_params.params.update;
++ __set_bit(BNX2X_Q_UPDATE_ANTI_SPOOF_CHNG,
++ &update_params->update_flags);
++ if (val) {
++ __set_bit(BNX2X_Q_UPDATE_ANTI_SPOOF,
++ &update_params->update_flags);
++ } else {
++ __clear_bit(BNX2X_Q_UPDATE_ANTI_SPOOF,
++ &update_params->update_flags);
++ }
++
++ /* Update the Queue state */
++ rc = bnx2x_queue_state_change(bp, &q_params);
++ if (rc) {
++ BNX2X_ERR("Failed to %s spoofchk on VF %d - vfq %d\n",
++ val ? "enable" : "disable", idx, i);
++ goto out;
++ }
++ }
++out:
++ if (!rc)
++ DP(BNX2X_MSG_IOV,
++ "%s spoofchk for VF[%d]\n", val ? "Enabled" : "Disabled",
++ idx);
++
++ return rc;
++}
+
+ /* crc is the first field in the bulletin board. Compute the crc over the
+ * entire bulletin board excluding the crc field itself. Use the length field
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h
+@@ -142,6 +142,8 @@ struct bnx2x_virtf {
+
+ bool flr_clnup_stage; /* true during flr cleanup */
+ bool malicious; /* true if FW indicated so, until FLR */
++ /* 1(true) if spoof check is enabled */
++ u8 spoofchk;
+
+ /* dma */
+ dma_addr_t fw_stat_map;
diff --git a/patches.drivers/bnx2x-Add-storm-FW-version-to-ethtool-driver-query-o.patch b/patches.drivers/bnx2x-Add-storm-FW-version-to-ethtool-driver-query-o.patch
new file mode 100644
index 0000000000..1f94d4c3c4
--- /dev/null
+++ b/patches.drivers/bnx2x-Add-storm-FW-version-to-ethtool-driver-query-o.patch
@@ -0,0 +1,32 @@
+From: Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
+Date: Mon, 26 Nov 2018 22:25:57 -0800
+Subject: bnx2x: Add storm FW version to ethtool driver query output.
+Patch-mainline: v5.0-rc1
+Git-commit: 96a60ae886a479196e84b6f56f217c9c23b7cb2b
+References: bsc#1104402 FATE#325899
+
+The patch populates the Storm FW version in the ethtool driver query data.
+
+Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
+Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+@@ -1112,6 +1112,12 @@ static void bnx2x_get_drvinfo(struct net
+ strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver));
+ strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version));
+
++ memset(version, 0, sizeof(version));
++ snprintf(version, ETHTOOL_FWVERS_LEN, " storm %d.%d.%d.%d",
++ BCM_5710_FW_MAJOR_VERSION, BCM_5710_FW_MINOR_VERSION,
++ BCM_5710_FW_REVISION_VERSION, BCM_5710_FW_ENGINEERING_VERSION);
++ strlcat(info->version, version, sizeof(info->version));
++
+ if (SHMEM2_HAS(bp, extended_dev_info_shared_addr)) {
+ ext_dev_info_offset = SHMEM2_RD(bp,
+ extended_dev_info_shared_addr);
diff --git a/patches.drivers/bnx2x-Assign-unique-DMAE-channel-number-for-FW-DMAE-.patch b/patches.drivers/bnx2x-Assign-unique-DMAE-channel-number-for-FW-DMAE-.patch
new file mode 100644
index 0000000000..5169f4c9e2
--- /dev/null
+++ b/patches.drivers/bnx2x-Assign-unique-DMAE-channel-number-for-FW-DMAE-.patch
@@ -0,0 +1,58 @@
+From: Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
+Date: Sun, 11 Nov 2018 18:27:34 -0800
+Subject: bnx2x: Assign unique DMAE channel number for FW DMAE transactions.
+Patch-mainline: v4.20-rc4
+Git-commit: 77e461d14ed141253573eeeb4d34eccc51e38328
+References: bsc#1104402 FATE#325899
+
+Driver assigns DMAE channel 0 for FW as part of START_RAMROD command. FW
+uses this channel for DMAE operations (e.g., TIME_SYNC implementation).
+Driver also uses the same channel 0 for DMAE operations for some of the PFs
+(e.g., PF0 on Port0). This could lead to concurrent access to the DMAE
+channel by FW and driver which is not legal. Hence need to assign unique
+DMAE id for FW.
+Currently following DMAE channels are used by the clients,
+ MFW - OCBB/OCSD functionality uses DMAE channel 14/15
+ Driver 0-3 and 8-11 (for PF dmae operations)
+ 4 and 12 (for stats requests)
+Assigning unique dmae_id '13' to the FW.
+
+Changes from previous version:
+------------------------------
+v2: Incorporated the review comments.
+
+Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
+Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 7 +++++++
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 1 +
+ 2 files changed, 8 insertions(+)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+@@ -2191,6 +2191,13 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x
+ #define PMF_DMAE_C(bp) (BP_PORT(bp) * MAX_DMAE_C_PER_PORT + \
+ E1HVN_MAX)
+
++/* Following is the DMAE channel number allocation for the clients.
++ * MFW: OCBB/OCSD implementations use DMAE channels 14/15 respectively.
++ * Driver: 0-3 and 8-11 (for PF dmae operations)
++ * 4 and 12 (for stats requests)
++ */
++#define BNX2X_FW_DMAE_C 13 /* Channel for FW DMAE operations */
++
+ /* PCIE link and speed */
+ #define PCICFG_LINK_WIDTH 0x1f00000
+ #define PCICFG_LINK_WIDTH_SHIFT 20
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
+@@ -6149,6 +6149,7 @@ static inline int bnx2x_func_send_start(
+ rdata->sd_vlan_tag = cpu_to_le16(start_params->sd_vlan_tag);
+ rdata->path_id = BP_PATH(bp);
+ rdata->network_cos_mode = start_params->network_cos_mode;
++ rdata->dmae_cmd_id = BNX2X_FW_DMAE_C;
+
+ rdata->vxlan_dst_port = cpu_to_le16(start_params->vxlan_dst_port);
+ rdata->geneve_dst_port = cpu_to_le16(start_params->geneve_dst_port);
diff --git a/patches.drivers/bnx2x-Clear-fip-MAC-when-fcoe-offload-support-is-dis.patch b/patches.drivers/bnx2x-Clear-fip-MAC-when-fcoe-offload-support-is-dis.patch
new file mode 100644
index 0000000000..6447ef9bc1
--- /dev/null
+++ b/patches.drivers/bnx2x-Clear-fip-MAC-when-fcoe-offload-support-is-dis.patch
@@ -0,0 +1,34 @@
+From: Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
+Date: Wed, 12 Dec 2018 08:57:00 -0800
+Subject: bnx2x: Clear fip MAC when fcoe offload support is disabled
+Patch-mainline: v4.20
+Git-commit: bbf666c1af916ed74795493c564df6fad462cc80
+References: bsc#1104402 FATE#325899
+
+On some customer setups it was observed that shmem contains a non-zero fip
+MAC for 57711 which would lead to enabling of SW FCoE.
+Add a software workaround to clear the bad fip mac address if no FCoE
+connections are supported.
+
+Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
+Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+@@ -11750,8 +11750,10 @@ static void bnx2x_get_fcoe_info(struct b
+ * If maximum allowed number of connections is zero -
+ * disable the feature.
+ */
+- if (!bp->cnic_eth_dev.max_fcoe_conn)
++ if (!bp->cnic_eth_dev.max_fcoe_conn) {
+ bp->flags |= NO_FCOE_FLAG;
++ eth_zero_addr(bp->fip_mac);
++ }
+ }
+
+ static void bnx2x_get_cnic_info(struct bnx2x *bp)
diff --git a/patches.drivers/bnx2x-Enable-PTP-only-on-the-PF-that-initializes-the.patch b/patches.drivers/bnx2x-Enable-PTP-only-on-the-PF-that-initializes-the.patch
new file mode 100644
index 0000000000..5b143d3d20
--- /dev/null
+++ b/patches.drivers/bnx2x-Enable-PTP-only-on-the-PF-that-initializes-the.patch
@@ -0,0 +1,109 @@
+From: Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
+Date: Wed, 12 Dec 2018 08:57:02 -0800
+Subject: bnx2x: Enable PTP only on the PF that initializes the port
+Patch-mainline: v4.20
+Git-commit: 07f12622a66320d5f56a71a921cf70a43e7a6b87
+References: bsc#1104402 FATE#325899
+
+There will be only one PHC clock per port. PTP should be enabled only on
+one PF per port. The change enables PTP functionality on the PF that
+initializes the port. The change is useful in multi-function modes e.g.,
+NPAR where a port can have more than one PF.
+
+Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
+Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 1 +
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 +
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 22 ++++++++++------------
+ 3 files changed, 12 insertions(+), 12 deletions(-)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+@@ -2520,6 +2520,7 @@ void bnx2x_update_mfw_dump(struct bnx2x
+ void bnx2x_init_ptp(struct bnx2x *bp);
+ int bnx2x_configure_ptp_filters(struct bnx2x *bp);
+ void bnx2x_set_rx_ts(struct bnx2x *bp, struct sk_buff *skb);
++void bnx2x_register_phc(struct bnx2x *bp);
+
+ #define BNX2X_MAX_PHC_DRIFT 31000000
+ #define BNX2X_PTP_TX_TIMEOUT
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+@@ -2842,6 +2842,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int
+ bnx2x_set_rx_mode_inner(bp);
+
+ if (bp->flags & PTP_SUPPORTED) {
++ bnx2x_register_phc(bp);
+ bnx2x_init_ptp(bp);
+ bnx2x_configure_ptp_filters(bp);
+ }
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+@@ -7723,6 +7723,9 @@ static int bnx2x_init_hw_port(struct bnx
+ REG_WR(bp, reg_addr, val);
+ }
+
++ if (CHIP_IS_E3B0(bp))
++ bp->flags |= PTP_SUPPORTED;
++
+ return 0;
+ }
+
+@@ -9444,8 +9447,13 @@ unload_error:
+ * function stop ramrod is sent, since as part of this ramrod FW access
+ * PTP registers.
+ */
+- if (bp->flags & PTP_SUPPORTED)
++ if (bp->flags & PTP_SUPPORTED) {
+ bnx2x_stop_ptp(bp);
++ if (bp->ptp_clock) {
++ ptp_clock_unregister(bp->ptp_clock);
++ bp->ptp_clock = NULL;
++ }
++ }
+
+ /* Disable HW interrupts, NAPI */
+ bnx2x_netif_stop(bp, 1);
+@@ -12523,9 +12531,6 @@ static int bnx2x_init_bp(struct bnx2x *b
+
+ bp->dump_preset_idx = 1;
+
+- if (CHIP_IS_E3B0(bp))
+- bp->flags |= PTP_SUPPORTED;
+-
+ return rc;
+ }
+
+@@ -13917,7 +13922,7 @@ static int bnx2x_ptp_enable(struct ptp_c
+ return -ENOTSUPP;
+ }
+
+-static void bnx2x_register_phc(struct bnx2x *bp)
++void bnx2x_register_phc(struct bnx2x *bp)
+ {
+ /* Fill the ptp_clock_info struct and register PTP clock*/
+ bp->ptp_clock_info.owner = THIS_MODULE;
+@@ -14119,8 +14124,6 @@ static int bnx2x_init_one(struct pci_dev
+ dev->base_addr, bp->pdev->irq, dev->dev_addr);
+ pcie_print_link_status(bp->pdev);
+
+- bnx2x_register_phc(bp);
+-
+ if (!IS_MF_SD_STORAGE_PERSONALITY_ONLY(bp))
+ bnx2x_set_os_driver_state(bp, OS_DRIVER_STATE_DISABLED);
+
+@@ -14153,11 +14156,6 @@ static void __bnx2x_remove(struct pci_de
+ struct bnx2x *bp,
+ bool remove_netdev)
+ {
+- if (bp->ptp_clock) {
+- ptp_clock_unregister(bp->ptp_clock);
+- bp->ptp_clock = NULL;
+- }
+-
+ /* Delete storage MAC address */
+ if (!NO_FCOE(bp)) {
+ rtnl_lock();
diff --git a/patches.drivers/bnx2x-Fix-NULL-pointer-dereference-in-bnx2x_del_all_.patch b/patches.drivers/bnx2x-Fix-NULL-pointer-dereference-in-bnx2x_del_all_.patch
new file mode 100644
index 0000000000..e7da0c75ca
--- /dev/null
+++ b/patches.drivers/bnx2x-Fix-NULL-pointer-dereference-in-bnx2x_del_all_.patch
@@ -0,0 +1,102 @@
+From: Ivan Mironov <mironov.ivan@gmail.com>
+Date: Mon, 24 Dec 2018 20:13:05 +0500
+Subject: bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some
+ hw
+Patch-mainline: v5.0-rc1
+Git-commit: 38355a5f9a22bfa5bd5b1bb79805aca39fa53729
+References: bsc#1104402 FATE#325899
+
+This happened when I tried to boot normal Fedora 29 system with latest
+available kernel (from fedora rawhide, plus some unrelated custom
+patches):
+
+ BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
+ PGD 0 P4D 0
+ Oops: 0010 [#1] SMP PTI
+ CPU: 6 PID: 1422 Comm: libvirtd Tainted: G I 4.20.0-0.rc7.git3.hpsa2.1.fc29.x86_64 #1
+ Hardware name: HP ProLiant BL460c G6, BIOS I24 05/21/2018
+ RIP: 0010: (null)
+ Code: Bad RIP value.
+ RSP: 0018:ffffa47ccdc9fbe0 EFLAGS: 00010246
+ RAX: 0000000000000000 RBX: 00000000000003e8 RCX: ffffa47ccdc9fbf8
+ RDX: ffffa47ccdc9fc00 RSI: ffff97d9ee7b01f8 RDI: ffff97d9f0150b80
+ RBP: ffff97d9f0150b80 R08: 0000000000000000 R09: 0000000000000000
+ R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000003
+ R13: ffff97d9ef1e53e8 R14: 0000000000000009 R15: ffff97d9f0ac6730
+ FS: 00007f4d224ef700(0000) GS:ffff97d9fa200000(0000) knlGS:0000000000000000
+ CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+ CR2: ffffffffffffffd6 CR3: 00000011ece52006 CR4: 00000000000206e0
+ Call Trace:
+ ? bnx2x_chip_cleanup+0x195/0x610 [bnx2x]
+ ? bnx2x_nic_unload+0x1e2/0x8f0 [bnx2x]
+ ? bnx2x_reload_if_running+0x24/0x40 [bnx2x]
+ ? bnx2x_set_features+0x79/0xa0 [bnx2x]
+ ? __netdev_update_features+0x244/0x9e0
+ ? netlink_broadcast_filtered+0x136/0x4b0
+ ? netdev_update_features+0x22/0x60
+ ? dev_disable_lro+0x1c/0xe0
+ ? devinet_sysctl_forward+0x1c6/0x211
+ ? proc_sys_call_handler+0xab/0x100
+ ? __vfs_write+0x36/0x1a0
+ ? rcu_read_lock_sched_held+0x79/0x80
+ ? rcu_sync_lockdep_assert+0x2e/0x60
+ ? __sb_start_write+0x14c/0x1b0
+ ? vfs_write+0x159/0x1c0
+ ? vfs_write+0xba/0x1c0
+ ? ksys_write+0x52/0xc0
+ ? do_syscall_64+0x60/0x1f0
+ ? entry_SYSCALL_64_after_hwframe+0x49/0xbe
+
+After some investigation I figured out that recently added cleanup code
+tries to call VLAN filtering de-initialization function which exist only
+for newer hardware. Corresponding function pointer is not
+set (== 0) for older hardware, namely these chips:
+
+ #define CHIP_NUM_57710 0x164e
+ #define CHIP_NUM_57711 0x164f
+ #define CHIP_NUM_57711E 0x1650
+
+And I have one of those in my test system:
+
+ Broadcom Inc. and subsidiaries NetXtreme II BCM57711E 10-Gigabit PCIe [14e4:1650]
+
+Function bnx2x_init_vlan_mac_fp_objs() from
+drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h decides whether to
+initialize relevant pointers in bnx2x_sp_objs.vlan_obj or not.
+
+This regression was introduced after v4.20-rc7, and still exists in v4.20
+release.
+
+Fixes: 04f05230c5c13 ("bnx2x: Remove configured vlans as part of unload sequence.")
+Signed-off-by: Ivan Mironov <mironov.ivan@gmail.com>
+Signed-off-by: Ivan Mironov <mironov.ivan@gmail.com>
+Acked-by: Sudarsana Kalluru <Sudarsana.Kalluru@cavium.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+@@ -9360,10 +9360,16 @@ void bnx2x_chip_cleanup(struct bnx2x *bp
+ BNX2X_ERR("Failed to schedule DEL commands for UC MACs list: %d\n",
+ rc);
+
+- /* Remove all currently configured VLANs */
+- rc = bnx2x_del_all_vlans(bp);
+- if (rc < 0)
+- BNX2X_ERR("Failed to delete all VLANs\n");
++ /* The whole *vlan_obj structure may be not initialized if VLAN
++ * filtering offload is not supported by hardware. Currently this is
++ * true for all hardware covered by CHIP_IS_E1x().
++ */
++ if (!CHIP_IS_E1x(bp)) {
++ /* Remove all currently configured VLANs */
++ rc = bnx2x_del_all_vlans(bp);
++ if (rc < 0)
++ BNX2X_ERR("Failed to delete all VLANs\n");
++ }
+
+ /* Disable LLH */
+ if (!CHIP_IS_E1(bp))
diff --git a/patches.drivers/bnx2x-Ignore-bandwidth-attention-in-single-function-.patch b/patches.drivers/bnx2x-Ignore-bandwidth-attention-in-single-function-.patch
new file mode 100644
index 0000000000..bcdf727fb9
--- /dev/null
+++ b/patches.drivers/bnx2x-Ignore-bandwidth-attention-in-single-function-.patch
@@ -0,0 +1,40 @@
+From: Shahed Shaikh <Shahed.Shaikh@cavium.com>
+Date: Thu, 20 Sep 2018 11:22:51 -0700
+Subject: bnx2x: Ignore bandwidth attention in single function mode
+Patch-mainline: v4.20-rc1
+Git-commit: 75a110a1783ef8324ffd763b24f4ac268253cbca
+References: bsc#1104402 FATE#325899
+
+This is a workaround for FW bug -
+MFW generates bandwidth attention in single function mode, which
+is only expected to be generated in multi function mode.
+This undesired attention in SF mode results in incorrect HW
+configuration and resulting into Tx timeout.
+
+Signed-off-by: Shahed Shaikh <Shahed.Shaikh@cavium.com>
+Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+@@ -3536,6 +3536,16 @@ static void bnx2x_drv_info_iscsi_stat(st
+ */
+ static void bnx2x_config_mf_bw(struct bnx2x *bp)
+ {
++ /* Workaround for MFW bug.
++ * MFW is not supposed to generate BW attention in
++ * single function mode.
++ */
++ if (!IS_MF(bp)) {
++ DP(BNX2X_MSG_MCP,
++ "Ignoring MF BW config in single function mode\n");
++ return;
++ }
++
+ if (bp->link_vars.link_up) {
+ bnx2x_cmng_fns_init(bp, true, CMNG_FNS_MINMAX);
+ bnx2x_link_sync_notify(bp);
diff --git a/patches.drivers/bnx2x-Mark-expected-switch-fall-throughs.patch b/patches.drivers/bnx2x-Mark-expected-switch-fall-throughs.patch
new file mode 100644
index 0000000000..e41c905a9a
--- /dev/null
+++ b/patches.drivers/bnx2x-Mark-expected-switch-fall-throughs.patch
@@ -0,0 +1,102 @@
+From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
+Date: Wed, 27 Jun 2018 20:32:23 -0500
+Subject: bnx2x: Mark expected switch fall-throughs
+Patch-mainline: v4.19-rc1
+Git-commit: 83607344d667315687e1a5ddd2ad2fbbff22cc43
+References: bsc#1104402 FATE#325899
+
+In preparation to enabling -Wimplicit-fallthrough, mark switch cases
+where we are expecting to fall through.
+
+Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 3 +++
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++--
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 4 ++--
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 1 +
+ drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
+ 5 files changed, 9 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+@@ -6339,6 +6339,7 @@ int bnx2x_set_led(struct link_params *pa
+ */
+ if (!vars->link_up)
+ break;
++ /* else: fall through */
+ case LED_MODE_ON:
+ if (((params->phy[EXT_PHY1].type ==
+ PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727) ||
+@@ -12521,11 +12522,13 @@ static void bnx2x_phy_def_cfg(struct lin
+ switch (link_config & PORT_FEATURE_LINK_SPEED_MASK) {
+ case PORT_FEATURE_LINK_SPEED_10M_HALF:
+ phy->req_duplex = DUPLEX_HALF;
++ /* fall through */
+ case PORT_FEATURE_LINK_SPEED_10M_FULL:
+ phy->req_line_speed = SPEED_10;
+ break;
+ case PORT_FEATURE_LINK_SPEED_100M_HALF:
+ phy->req_duplex = DUPLEX_HALF;
++ /* fall through */
+ case PORT_FEATURE_LINK_SPEED_100M_FULL:
+ phy->req_line_speed = SPEED_100;
+ break;
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+@@ -8561,11 +8561,11 @@ int bnx2x_set_int_mode(struct bnx2x *bp)
+ bp->num_queues,
+ 1 + bp->num_cnic_queues);
+
+- /* falling through... */
++ /* fall through */
+ case BNX2X_INT_MODE_MSI:
+ bnx2x_enable_msi(bp);
+
+- /* falling through... */
++ /* fall through */
+ case BNX2X_INT_MODE_INTX:
+ bp->num_ethernet_queues = 1;
+ bp->num_queues = bp->num_ethernet_queues + bp->num_cnic_queues;
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
+@@ -3258,7 +3258,7 @@ static int bnx2x_mcast_validate_e2(struc
+ /* DEL command deletes all currently configured MACs */
+ case BNX2X_MCAST_CMD_DEL:
+ o->set_registry_size(o, 0);
+- /* Don't break */
++ /* fall through */
+
+ /* RESTORE command will restore the entire multicast configuration */
+ case BNX2X_MCAST_CMD_RESTORE:
+@@ -3592,7 +3592,7 @@ static int bnx2x_mcast_validate_e1(struc
+ /* DEL command deletes all currently configured MACs */
+ case BNX2X_MCAST_CMD_DEL:
+ o->set_registry_size(o, 0);
+- /* Don't break */
++ /* fall through */
+
+ /* RESTORE command will restore the entire multicast configuration */
+ case BNX2X_MCAST_CMD_RESTORE:
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+@@ -1826,6 +1826,7 @@ get_vf:
+ DP(BNX2X_MSG_IOV, "got VF [%d:%d] RSS update ramrod\n",
+ vf->abs_vfid, qidx);
+ bnx2x_vf_handle_rss_update_eqe(bp, vf);
++ /* fall through */
+ case EVENT_RING_OPCODE_VF_FLR:
+ /* Do nothing for now */
+ return 0;
+--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+@@ -1727,7 +1727,7 @@ static int bnxt_async_event_process(stru
+ speed);
+ }
+ set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event);
+- /* fall thru */
++ /* fall through */
+ }
+ case ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
+ set_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event);
diff --git a/patches.drivers/bnx2x-Provide-VF-link-status-in-ndo_get_vf_config.patch b/patches.drivers/bnx2x-Provide-VF-link-status-in-ndo_get_vf_config.patch
new file mode 100644
index 0000000000..016e148b73
--- /dev/null
+++ b/patches.drivers/bnx2x-Provide-VF-link-status-in-ndo_get_vf_config.patch
@@ -0,0 +1,28 @@
+From: Shahed Shaikh <Shahed.Shaikh@cavium.com>
+Date: Thu, 20 Sep 2018 11:22:52 -0700
+Subject: bnx2x: Provide VF link status in ndo_get_vf_config
+Patch-mainline: v4.20-rc1
+Git-commit: ea65949e1988a686976496bcf26471ff22d821d8
+References: bsc#1104402 FATE#325899
+
+Provide current link status of VF in ndo_get_vf_config
+handler.
+
+Signed-off-by: Shahed Shaikh <Shahed.Shaikh@cavium.com>
+Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+@@ -2637,6 +2637,7 @@ int bnx2x_get_vf_config(struct net_devic
+ ivi->max_tx_rate = 10000; /* always 10G. TBA take from link struct */
+ ivi->min_tx_rate = 0;
+ ivi->spoofchk = vf->spoofchk ? 1 : 0;
++ ivi->linkstate = vf->link_cfg;
+ if (vf->state == VF_ENABLED) {
+ /* mac and vlan are in vlan_mac objects */
+ if (bnx2x_validate_vf_sp_objs(bp, vf, false)) {
diff --git a/patches.drivers/bnx2x-Remove-configured-vlans-as-part-of-unload-sequ.patch b/patches.drivers/bnx2x-Remove-configured-vlans-as-part-of-unload-sequ.patch
new file mode 100644
index 0000000000..2901037ee5
--- /dev/null
+++ b/patches.drivers/bnx2x-Remove-configured-vlans-as-part-of-unload-sequ.patch
@@ -0,0 +1,107 @@
+From: Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
+Date: Wed, 12 Dec 2018 08:57:01 -0800
+Subject: bnx2x: Remove configured vlans as part of unload sequence.
+Patch-mainline: v4.20
+Git-commit: 04f05230c5c13b1384f66f5186a68d7499e34622
+References: bsc#1104402 FATE#325899
+
+Vlans are not getting removed when drivers are unloaded. The recent storm
+firmware versions had added safeguards against re-configuring an already
+configured vlan. As a result, PF inner reload flows (e.g., mtu change)
+might trigger an assertion.
+This change is going to remove vlans (same as we do for MACs) when doing
+a chip cleanup during unload.
+
+Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
+Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 34 ++++++++++++++++++-----
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h | 4 ++
+ 2 files changed, 30 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+@@ -8472,6 +8472,7 @@ int bnx2x_set_vlan_one(struct bnx2x *bp,
+ /* Fill a user request section if needed */
+ if (!test_bit(RAMROD_CONT, ramrod_flags)) {
+ ramrod_param.user_req.u.vlan.vlan = vlan;
++ __set_bit(BNX2X_VLAN, &ramrod_param.user_req.vlan_mac_flags);
+ /* Set the command: ADD or DEL */
+ if (set)
+ ramrod_param.user_req.cmd = BNX2X_VLAN_MAC_ADD;
+@@ -8492,6 +8493,27 @@ int bnx2x_set_vlan_one(struct bnx2x *bp,
+ return rc;
+ }
+
++static int bnx2x_del_all_vlans(struct bnx2x *bp)
++{
++ struct bnx2x_vlan_mac_obj *vlan_obj = &bp->sp_objs[0].vlan_obj;
++ unsigned long ramrod_flags = 0, vlan_flags = 0;
++ struct bnx2x_vlan_entry *vlan;
++ int rc;
++
++ __set_bit(RAMROD_COMP_WAIT, &ramrod_flags);
++ __set_bit(BNX2X_VLAN, &vlan_flags);
++ rc = vlan_obj->delete_all(bp, vlan_obj, &vlan_flags, &ramrod_flags);
++ if (rc)
++ return rc;
++
++ /* Mark that hw forgot all entries */
++ list_for_each_entry(vlan, &bp->vlan_reg, link)
++ vlan->hw = false;
++ bp->vlan_cnt = 0;
++
++ return 0;
++}
++
+ int bnx2x_del_all_macs(struct bnx2x *bp,
+ struct bnx2x_vlan_mac_obj *mac_obj,
+ int mac_type, bool wait_for_comp)
+@@ -9330,6 +9352,11 @@ void bnx2x_chip_cleanup(struct bnx2x *bp
+ BNX2X_ERR("Failed to schedule DEL commands for UC MACs list: %d\n",
+ rc);
+
++ /* Remove all currently configured VLANs */
++ rc = bnx2x_del_all_vlans(bp);
++ if (rc < 0)
++ BNX2X_ERR("Failed to delete all VLANs\n");
++
+ /* Disable LLH */
+ if (!CHIP_IS_E1(bp))
+ REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port*8, 0);
+@@ -13026,13 +13053,6 @@ static void bnx2x_vlan_configure(struct
+
+ int bnx2x_vlan_reconfigure_vid(struct bnx2x *bp)
+ {
+- struct bnx2x_vlan_entry *vlan;
+-
+- /* The hw forgot all entries after reload */
+- list_for_each_entry(vlan, &bp->vlan_reg, link)
+- vlan->hw = false;
+- bp->vlan_cnt = 0;
+-
+ /* Don't set rx mode here. Our caller will do it. */
+ bnx2x_vlan_configure(bp, false);
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
+@@ -265,6 +265,7 @@ enum {
+ BNX2X_ETH_MAC,
+ BNX2X_ISCSI_ETH_MAC,
+ BNX2X_NETQ_ETH_MAC,
++ BNX2X_VLAN,
+ BNX2X_DONT_CONSUME_CAM_CREDIT,
+ BNX2X_DONT_CONSUME_CAM_CREDIT_DEST,
+ };
+@@ -272,7 +273,8 @@ enum {
+ #define BNX2X_VLAN_MAC_CMP_MASK (1 << BNX2X_UC_LIST_MAC | \
+ 1 << BNX2X_ETH_MAC | \
+ 1 << BNX2X_ISCSI_ETH_MAC | \
+- 1 << BNX2X_NETQ_ETH_MAC)
++ 1 << BNX2X_NETQ_ETH_MAC | \
++ 1 << BNX2X_VLAN)
+ #define BNX2X_VLAN_MAC_CMP_FLAGS(flags) \
+ ((flags) & BNX2X_VLAN_MAC_CMP_MASK)
+
diff --git a/patches.drivers/bnx2x-Send-update-svid-ramrod-with-retry-poll-flags-.patch b/patches.drivers/bnx2x-Send-update-svid-ramrod-with-retry-poll-flags-.patch
new file mode 100644
index 0000000000..8fbdf973ab
--- /dev/null
+++ b/patches.drivers/bnx2x-Send-update-svid-ramrod-with-retry-poll-flags-.patch
@@ -0,0 +1,65 @@
+From: Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
+Date: Wed, 12 Dec 2018 08:57:03 -0800
+Subject: bnx2x: Send update-svid ramrod with retry/poll flags enabled
+Patch-mainline: v4.20
+Git-commit: 9061193c4ee065d3240fde06767c2e06ec61decc
+References: bsc#1104402 FATE#325899
+
+Driver sends update-SVID ramrod in the MFW notification path.
+If there is a pending ramrod, driver doesn't retry the command
+and storm firmware will never be updated with the SVID value.
+The patch adds changes to send update-svid ramrod in process context with
+retry/poll flags set.
+
+Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
+Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 1 +
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 10 +++++++++-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+@@ -1282,6 +1282,7 @@ enum sp_rtnl_flag {
+ BNX2X_SP_RTNL_TX_STOP,
+ BNX2X_SP_RTNL_GET_DRV_VERSION,
+ BNX2X_SP_RTNL_CHANGE_UDP_PORT,
++ BNX2X_SP_RTNL_UPDATE_SVID,
+ };
+
+ enum bnx2x_iov_flag {
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+@@ -2925,6 +2925,10 @@ static void bnx2x_handle_update_svid_cmd
+ func_params.f_obj = &bp->func_obj;
+ func_params.cmd = BNX2X_F_CMD_SWITCH_UPDATE;
+
++ /* Prepare parameters for function state transitions */
++ __set_bit(RAMROD_COMP_WAIT, &func_params.ramrod_flags);
++ __set_bit(RAMROD_RETRY, &func_params.ramrod_flags);
++
+ if (IS_MF_UFP(bp) || IS_MF_BD(bp)) {
+ int func = BP_ABS_FUNC(bp);
+ u32 val;
+@@ -4311,7 +4315,8 @@ static void bnx2x_attn_int_deasserted3(s
+ bnx2x_handle_eee_event(bp);
+
+ if (val & DRV_STATUS_OEM_UPDATE_SVID)
+- bnx2x_handle_update_svid_cmd(bp);
++ bnx2x_schedule_sp_rtnl(bp,
++ BNX2X_SP_RTNL_UPDATE_SVID, 0);
+
+ if (bp->link_vars.periodic_flags &
+ PERIODIC_FLAGS_LINK_EVENT) {
+@@ -10394,6 +10399,9 @@ sp_rtnl_not_reset:
+ &bp->sp_rtnl_state))
+ bnx2x_update_mng_version(bp);
+
++ if (test_and_clear_bit(BNX2X_SP_RTNL_UPDATE_SVID, &bp->sp_rtnl_state))
++ bnx2x_handle_update_svid_cmd(bp);
++
+ if (test_and_clear_bit(BNX2X_SP_RTNL_CHANGE_UDP_PORT,
+ &bp->sp_rtnl_state)) {
+ if (bnx2x_udp_port_update(bp)) {
diff --git a/series.conf b/series.conf
index 8e0ff65b98..1361fb6ddb 100644
--- a/series.conf
+++ b/series.conf
@@ -34769,6 +34769,7 @@
patches.drivers/net-mlx5e-Add-counter-for-MPWQE-filler-strides.patch
patches.drivers/net-mlx5e-Add-counter-for-total-num-of-NOP-operation.patch
patches.drivers/net-mlx5e-Update-NIC-HW-stats-on-demand-only.patch
+ patches.drivers/bnx2x-Mark-expected-switch-fall-throughs.patch
patches.drivers/net-mvpp2-Make-TX-RX-descriptors-little-endian.patch
patches.drivers/net-mvpp2-prs-Drop-unions-representing-TCAM-and-SRAM.patch
patches.drivers/net-mvpp2-prs-Drop-unnecessary-swab16-in-vlan-detect.patch
@@ -39551,6 +39552,9 @@
patches.drivers/net_sched-change-tcf_del_walker-to-take-idrinfo-lock.patch
patches.drivers/net-tap-remove-redundant-null-pointer-check-before-k.patch
patches.drivers/vhost_net-add-a-missing-error-return.patch
+ patches.drivers/bnx2x-Add-VF-spoof-checking-configuration.patch
+ patches.drivers/bnx2x-Ignore-bandwidth-attention-in-single-function-.patch
+ patches.drivers/bnx2x-Provide-VF-link-status-in-ndo_get_vf_config.patch
patches.drivers/net-phy-don-t-reschedule-state-machine-when-PHY-is-h.patch
patches.drivers/bna-Remove-unnecessary-self-assignment.patch
patches.drivers/0045-net-freescale-fix-return-type-of-ndo_start_xmit-func.patch
@@ -41205,6 +41209,7 @@
patches.drivers/tools-testing-nvdimm-fix-the-array-size-for-dimm-devices.patch
patches.fixes/acpi-nfit-fix-ars-overflow-continuation.patch
patches.drivers/revert-acpi-nfit-further-restrict-userspace-ars-start-requests.patch
+ patches.drivers/bnx2x-Assign-unique-DMAE-channel-number-for-FW-DMAE-.patch
patches.fixes/can-raw-check-for-CAN-FD-capable-netdev-in-raw_sendm.patch
patches.drivers/can-rcar_can-Fix-erroneous-registration.patch
patches.fixes/can-hi311x-Use-level-triggered-interrupt.patch
@@ -41602,6 +41607,10 @@
patches.arch/ibmvnic-Fix-non-atomic-memory-allocation-in-IRQ-cont.patch
patches.drivers/nfp-flower-ensure-TCP-flags-can-be-placed-in-IPv6-fr.patch
patches.drivers/USB-hso-Fix-OOB-memory-access-in-hso_probe-hso_get_c.patch
+ patches.drivers/bnx2x-Clear-fip-MAC-when-fcoe-offload-support-is-dis.patch
+ patches.drivers/bnx2x-Remove-configured-vlans-as-part-of-unload-sequ.patch
+ patches.drivers/bnx2x-Enable-PTP-only-on-the-PF-that-initializes-the.patch
+ patches.drivers/bnx2x-Send-update-svid-ramrod-with-retry-poll-flags-.patch
patches.drivers/i40e-fix-mac-filter-delete-when-setting-mac-address.patch
patches.drivers/i40e-fix-VLAN.TCI-0-RX-HW-offload.patch
patches.drivers/i40e-DRY-rx_ptype-handling-code.patch
@@ -41779,6 +41788,8 @@
patches.arch/s390-sles15sp1-00-12-48-net-smc-avoid-a-delay-by-waiting-for-nothing.patch
patches.arch/s390-sles15sp1-00-12-49-net-smc-add-infrastructure-to-send-delete-rkey-messa.patch
patches.arch/s390-sles15sp1-00-12-50-net-smc-unregister-rkeys-of-unused-buffer.patch
+ patches.drivers/bnx2x-Add-MBI-version-to-ethtool-driver-query-output.patch
+ patches.drivers/bnx2x-Add-storm-FW-version-to-ethtool-driver-query-o.patch
patches.drivers/can-flexcan-flexcan_irq-fix-indention.patch
patches.drivers/wlcore-Fix-the-return-value-in-case-of-error-in-wlco.patch
patches.drivers/rtl8xxxu-Fix-missing-break-in-switch.patch
@@ -41806,6 +41817,7 @@
patches.drivers/bpf-tls_sw-init-TLS-ULP-removes-BPF-proto-hooks.patch
patches.drivers/net-mlx5e-drop-useless-LIST_HEAD.patch
patches.drivers/mlxsw-spectrum-drop-useless-LIST_HEAD.patch
+ patches.drivers/bnx2x-Fix-NULL-pointer-dereference-in-bnx2x_del_all_.patch
patches.drivers/crypto-bcm-fix-normal-non-key-hash-algorithm-failure.patch
patches.fixes/gfs2-Get-rid-of-potential-double-freeing-in-gfs2_cre.patch
patches.fixes/gfs2-Fix-loop-in-gfs2_rbm_find.patch