From patchwork Sat Mar 26 00:45:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John Daley (johndale)" X-Patchwork-Id: 11744 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 9F1185A1F; Sat, 26 Mar 2016 01:45:21 +0100 (CET) Received: from alln-iport-2.cisco.com (alln-iport-2.cisco.com [173.37.142.89]) by dpdk.org (Postfix) with ESMTP id A90035A17 for ; Sat, 26 Mar 2016 01:45:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1339; q=dns/txt; s=iport; t=1458953119; x=1460162719; h=from:to:cc:subject:date:message-id; bh=nV9Z81TspsJeQVxj57lVG8jlt765K1rAVTfocnI/nk4=; b=WxqT1yIIiGtq8uQ95eo7NlXdYfEpCq4Gz2niGDIQZ8rj9W88Otp1iUjR VvqDoPUUZ/8AMLPgTv77CZrmpJ3eJRQ+TOJr83wv3NM0+1v9u0cDYTA6s lEUBvG/ZfSmyfMU3fCrxptRMegNWiEuNbefHfQTKGpVhQ4n9Eu/Lixifu Q=; X-IronPort-AV: E=Sophos;i="5.24,393,1454976000"; d="scan'208";a="252255379" Received: from alln-core-10.cisco.com ([173.36.13.132]) by alln-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 26 Mar 2016 00:45:18 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-10.cisco.com (8.14.5/8.14.5) with ESMTP id u2Q0jIsn017074; Sat, 26 Mar 2016 00:45:18 GMT Received: by cisco.com (Postfix, from userid 392789) id 946403FAADBD; Fri, 25 Mar 2016 17:45:18 -0700 (PDT) From: John Daley To: dev@dpdk.org Cc: John Daley Date: Fri, 25 Mar 2016 17:45:17 -0700 Message-Id: <1458953117-13817-1-git-send-email-johndale@cisco.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] enic: state change from link-down to link-up not recognized X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When the enic was disabled, link notification was correctly disabled in the NIC but the software indicator that it was disabled was not updated (vdev->notify_pa not set to 0). When the link came back up, enic did not re-enable notification in the NIC. This affected bonding when a enic slave device link bounced. The fix is to unconditionally enable notification when the enic is enabled. Fixes: 9913fbb91df0 ("enic/base: common code") Signed-off-by: John Daley Reviewed-by: Nelson Escobar --- drivers/net/enic/base/vnic_dev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c index 6153864..e8a5028 100644 --- a/drivers/net/enic/base/vnic_dev.c +++ b/drivers/net/enic/base/vnic_dev.c @@ -768,11 +768,9 @@ int vnic_dev_notify_set(struct vnic_dev *vdev, u16 intr) static u32 instance; if (vdev->notify || vdev->notify_pa) { - pr_warn("notify block %p still allocated.\n" \ - "Ignore if restarting port\n", vdev->notify); - return -EINVAL; + return vnic_dev_notify_setcmd(vdev, vdev->notify, + vdev->notify_pa, intr); } - if (!vnic_dev_in_reset(vdev)) { snprintf((char *)name, sizeof(name), "vnic_notify-%d", instance++);