From b4e06e408639fa29e3fac5a2235b46a4e1b4a3a0 Mon Sep 17 00:00:00 2001 From: Nithin Sujir <nsujir@broadcom.com> Date: Wed, 23 Mar 2011 09:36:08 +0000 Subject: [PATCH 05/16] fcoeutils: Retry vlan discovery forever if AUTO_VLAN and FCOE_ENABLE are set This is a modified patch as per Robert Love's comments - https://lists.open-fcoe.org/pipermail/devel/2011-March/011272.html After trying vlan discovery 10 times fcoemon disables auto_vlan on the port and falls back to the physical interface. bnx2fc does not support this. This patch checks for FCOE_ENABLE and AUTO_VLAN and if both are set for the interface, the vlan discovery will continue until a vlan is discovered. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: Petr Sabata <psabata@redhat.com> --- fcoemon.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fcoemon.c b/fcoemon.c index 042d1c8..9df473a 100644 --- a/fcoemon.c +++ b/fcoemon.c @@ -1994,7 +1994,9 @@ void fcm_vlan_disc_timeout(void *arg) struct fcoe_port *p = arg; FCM_LOG_DBG("%s: VLAN discovery TIMEOUT [%d]", p->ifname, p->vlan_disc_count); - if (++(p->vlan_disc_count) > FCM_VLAN_DISC_MAX) { + p->vlan_disc_count++; + if (!(p->fcoe_enable && p->auto_vlan) && + (p->vlan_disc_count > FCM_VLAN_DISC_MAX)) { FCM_LOG("%s: VLAN discovery failed after %d attempts", p->ifname, FCM_VLAN_DISC_MAX); FCM_LOG("%s: disabling VLAN discovery, trying FCoE on %s", -- 1.7.4.4