Check fcoe_enable before setting the state machine action
to FCP_CREATE_IF to avoid creating interfaces that are not
wanted.

Signed-off-by: Mark Rustad <[email protected]>
Tested-by: Jack Morgan <[email protected]>
---

 fcoemon.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fcoemon.c b/fcoemon.c
index f6e7318..558e2c0 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -1136,8 +1136,10 @@ static void fcp_set_next_action(struct fcoe_port *p, 
enum fcp_action action)
                case FCP_ENABLE_IF:
                        if (p->auto_vlan)
                                p->action = FCP_VLAN_DISC;
-                       else
+                       else if (p->fcoe_enable)
                                p->action = FCP_CREATE_IF;
+                       else
+                               p->action = FCP_WAIT;
                        break;
                default:
                        p->action = FCP_WAIT;
@@ -1201,8 +1203,10 @@ static void fcp_set_next_action(struct fcoe_port *p, 
enum fcp_action action)
                case FCP_ACTIVATE_IF:
                        if (p->auto_vlan)
                                p->action = FCP_VLAN_DISC;
-                       else
+                       else if (p->fcoe_enable)
                                p->action = FCP_CREATE_IF;
+                       else
+                               p->action = FCP_WAIT;
                        break;
                case FCP_DESTROY_IF:
                case FCP_DISABLE_IF:

_______________________________________________
fcoe-devel mailing list
[email protected]
http://lists.open-fcoe.org/mailman/listinfo/fcoe-devel

Reply via email to