From: John Daley Date: Sat, 26 Mar 2016 00:45:17 +0000 (-0700) Subject: enic: fix link state change X-Git-Tag: spdx-start~7148 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7fbf050c8cc7c350926cd943afcf1636eb636201;p=dpdk.git enic: fix link state change 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 --- diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c index 615386462e..e8a502870e 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++);