Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3652376ybf; Tue, 3 Mar 2020 09:50:11 -0800 (PST) X-Google-Smtp-Source: ADFU+vvThQYICkKI0Q05DPtaeSv0OPNGbWYWzLZ6QARL7PYES4DYGyIoWxQyCxMSw579au7dS6lf X-Received: by 2002:aca:f1c6:: with SMTP id p189mr3348038oih.159.1583257811559; Tue, 03 Mar 2020 09:50:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583257811; cv=none; d=google.com; s=arc-20160816; b=rYKvO3e297csTb+FI9RFYTvrM+9GpN0sa3H2eF2FzIWJWab8NvLFQyTvGUi7T3OJTS 3a5M6G2cdLLsD9Q53MvspehdzAoGaurBwxil3TSa61lIRDtycqQEicC3VHwKywE7oNX1 j04GTnaanwdZri1Ne1VWoD6b5fmmURWpGJKHZRnpaetUUb2VO4aJh0paDoj7J49+lzKT 4L+SLsPKP1f0nK9wPoxRDuiujtNd2+blyZk1/rmWhPn/gmAqrBkBtSGbrERO0Egx1k/m TDdP61eZn4JbCGeTDEk7b7Du/tI3h+hx+IksnLWlNITnbtFEcCHmbdsmSm3zu7uAf4pX G/vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+2yB8ggebsAq6hhz4DKTSVkKqDG+XJmXUm/D1e4X1dY=; b=NL7p99rHps0WfkV18wIqrvb8jKk7eck51YMtAKYV+aw1zQ/unUyJCj0MmXy/cZ5aoK atKwmu8WiEH8HbZPZsjGUo4JyXl+XPgR1mLCosQaZaZk3Ln3HF/cciFH4kYAUZSIBBfd 1bBIB2RpeIXN/AIjPbmXtVlYlHDMPB+pjMvbCp1ChS/HJRRXE53/GdtFJw7N9vy6Memu MgFK2Wxs5iXWkJJKYZktu+XGqGexNjJQU/JeItmF2actA4iuM7LHo7K9xErwjEzw4xcK fRTWeZqMOeZrGSkvgT+Oss0SEZIm5iENhtPxkipGHY+snpNP9Rw2uRGiaX55lSrZCbtO L+jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ni+RyrOz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7si8526129otk.223.2020.03.03.09.49.59; Tue, 03 Mar 2020 09:50:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ni+RyrOz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731269AbgCCRrC (ORCPT + 99 others); Tue, 3 Mar 2020 12:47:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:53808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731265AbgCCRrA (ORCPT ); Tue, 3 Mar 2020 12:47:00 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BEDEE2166E; Tue, 3 Mar 2020 17:46:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583257620; bh=GL+ErFHzO4uUVjyhpYexc0RZkb4zGsFm7jDq9h5knZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ni+RyrOzH3+RpdHjEmroGzgYBCz0mCoz+O8XmxBpCpoUBu9SKq7+kMveKxscDhDYy DtWpyxktAS91c8e3CApRJFzlPo5jnwwn0vfrv6iOwBLo/smFyZwEy5T5uPdlaGhb8/ R+AFRoEjhX2tv/L7grYFq40kh2CSpBp4jYjkHnQs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Ertman , Andrew Bowers , Jeff Kirsher , Sasha Levin Subject: [PATCH 5.5 064/176] ice: Fix switch between FW and SW LLDP Date: Tue, 3 Mar 2020 18:42:08 +0100 Message-Id: <20200303174312.042559488@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200303174304.593872177@linuxfoundation.org> References: <20200303174304.593872177@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Ertman [ Upstream commit 53977ee47410885e7d4eee87d2c811a48a275150 ] When switching between FW and SW LLDP mode, the number of configured TLV apps in the driver's DCB configuration is getting out of synch with what lldpad thinks is configured. This is causing a problem when shutting down lldpad. The cleanup is trying to delete TLV apps that are not defined in the kernel. Since the driver is keeping an accurate account of the apps defined, use the drivers number of apps to determine if there is an app to delete. If the number of apps is <= 1, then do not attempt to delete. Signed-off-by: Dave Ertman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_dcb_nl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c index d870c1aedc170..926c9772f0860 100644 --- a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c +++ b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c @@ -713,13 +713,13 @@ static int ice_dcbnl_delapp(struct net_device *netdev, struct dcb_app *app) return -EINVAL; mutex_lock(&pf->tc_mutex); - ret = dcb_ieee_delapp(netdev, app); - if (ret) - goto delapp_out; - old_cfg = &pf->hw.port_info->local_dcbx_cfg; - if (old_cfg->numapps == 1) + if (old_cfg->numapps <= 1) + goto delapp_out; + + ret = dcb_ieee_delapp(netdev, app); + if (ret) goto delapp_out; new_cfg = &pf->hw.port_info->desired_dcbx_cfg; -- 2.20.1