netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Michal Swiatkowski <michal.swiatkowski@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	Andrew Bowers <andrewx.bowers@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 05/14] ice: Copy dcbx configuration only if mode is correct
Date: Fri, 23 Aug 2019 16:37:41 -0700	[thread overview]
Message-ID: <20190823233750.7997-6-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20190823233750.7997-1-jeffrey.t.kirsher@intel.com>

From: Michal Swiatkowski <michal.swiatkowski@intel.com>

In rebuild DCB desired_dcbx_cfg was copy to local_dcbx_cfg, but
if DCBX mode is IEEE desired_dcbx_cfg is not initialized by DCBX
config from FW. Change logic to copy config value only if mode is
set to CEE.

If driver copy desired_dcbx_cfg to local_dcbx_cfg in IEEE mode there
is problem with globr. System is frozen after two or more globr.

Signed-off-by: Michal Swiatkowski <michal.swiatkowski@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c
index 22bdc244c7e0..4fc9faf5bc71 100644
--- a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c
@@ -334,8 +334,10 @@ void ice_dcb_rebuild(struct ice_pf *pf)
 	devm_kfree(&pf->pdev->dev, prev_cfg);
 
 	/* Set the local desired config */
-	memset(&pf->hw.port_info->local_dcbx_cfg, 0, sizeof(*local_dcbx_cfg));
-	memcpy(local_dcbx_cfg, desired_dcbx_cfg, sizeof(*local_dcbx_cfg));
+	if (local_dcbx_cfg->dcbx_mode == ICE_DCBX_MODE_CEE)
+		memcpy(local_dcbx_cfg, desired_dcbx_cfg,
+		       sizeof(*local_dcbx_cfg));
+
 	ice_cfg_etsrec_defaults(pf->hw.port_info);
 	ret = ice_set_dcb_cfg(pf->hw.port_info);
 	if (ret) {
-- 
2.21.0


  parent reply	other threads:[~2019-08-23 23:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 23:37 [net-next 00/14][pull request] 100GbE Intel Wired LAN Driver Updates 2019-08-23 Jeff Kirsher
2019-08-23 23:37 ` [net-next 01/14] ice: Allow egress control packets from PF_VSI Jeff Kirsher
2019-08-23 23:37 ` [net-next 02/14] ice: Account for all states of FW DCBx and LLDP Jeff Kirsher
2019-08-23 23:37 ` [net-next 03/14] ice: Don't call synchronize_irq() for VF's from the host Jeff Kirsher
2019-08-23 23:37 ` [net-next 04/14] ice: Treat DCBx state NOT_STARTED as valid Jeff Kirsher
2019-08-23 23:37 ` Jeff Kirsher [this message]
2019-08-23 23:37 ` [net-next 06/14] ice: reject VF attempts to enable head writeback Jeff Kirsher
2019-08-23 23:37 ` [net-next 07/14] ice: Rename ethtool private flag for lldp Jeff Kirsher
2019-08-24  1:31   ` Jakub Kicinski
2019-08-24 23:47     ` David Miller
2019-08-25  0:04       ` Kirsher, Jeffrey T
2019-08-23 23:37 ` [net-next 08/14] ice: silence some bogus error messages Jeff Kirsher
2019-08-23 23:37 ` [net-next 09/14] ice: Fix flag used for module query Jeff Kirsher
2019-08-23 23:37 ` [net-next 10/14] ice: Don't clear auto_fec bit in ice_cfg_phy_fec() Jeff Kirsher
2019-08-23 23:37 ` [net-next 11/14] ice: Add input handlers for virtual channel handlers Jeff Kirsher
2019-08-23 23:37 ` [net-next 12/14] ice: update ethtool stats on-demand Jeff Kirsher
2019-08-23 23:37 ` [net-next 13/14] ice: Fix issues updating VSI MAC filters Jeff Kirsher
2019-08-23 23:37 ` [net-next 14/14] ice: Don't allow VSI to remove unassociated ucast filter Jeff Kirsher
2019-08-24 23:47 ` [net-next 00/14][pull request] 100GbE Intel Wired LAN Driver Updates 2019-08-23 David Miller

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=20190823233750.7997-6-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=andrewx.bowers@intel.com \
    --cc=davem@davemloft.net \
    --cc=michal.swiatkowski@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /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).