diff mbox

[dpdk-dev] enic: state change from link-down to link-up not recognized

Message ID 1458953117-13817-1-git-send-email-johndale@cisco.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

John Daley March 26, 2016, 12:45 a.m. UTC
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 <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
---
 drivers/net/enic/base/vnic_dev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Thomas Monjalon March 30, 2016, 5:35 p.m. UTC | #1
2016-03-25 17:45, John Daley:
> 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 <johndale@cisco.com>
> Reviewed-by: Nelson Escobar <neescoba@cisco.com>

Applied, thanks
diff mbox

Patch

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++);