We only want the FCoE create and destroy routines to deal with top level N_Ports, the VN_Ports are tracked on the vport list (see scsi_transport_fc).
Signed-off-by: Chris Leech <[email protected]> --- drivers/scsi/fcoe/fcoe.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index a4b8991..3e5fb2a 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -591,9 +591,6 @@ static void fcoe_if_destroy(struct fc_lport *lport) /* Logout of the fabric */ fc_fabric_logoff(lport); - /* Remove the instance from fcoe's list */ - fcoe_hostlist_remove(lport); - /* tear-down the FCoE controller */ fcoe_ctlr_destroy(&fcoe->ctlr); @@ -749,9 +746,6 @@ static struct fc_lport *fcoe_if_create(struct fcoe_interface *fcoe, goto out_lp_destroy; } - /* add to lports list */ - fcoe_hostlist_add(lport); - dev_hold(netdev); fcoe_interface_get(fcoe); return lport; @@ -1694,6 +1688,8 @@ static int fcoe_destroy(const char *buffer, struct kernel_param *kp) rc = -ENODEV; goto out_putdev; } + /* Remove the instance from fcoe's list */ + fcoe_hostlist_remove(lport); port = lport_priv(lport); fcoe = port->fcoe; fcoe_if_destroy(lport); @@ -1762,6 +1758,9 @@ static int fcoe_create(const char *buffer, struct kernel_param *kp) /* Make this the "master" N_Port */ fcoe->ctlr.lp = lport; + /* add to lports list */ + fcoe_hostlist_add(lport); + /* start FIP Discovery and FLOGI */ lport->boot_time = jiffies; fc_fabric_login(lport); _______________________________________________ devel mailing list [email protected] http://www.open-fcoe.org/mailman/listinfo/devel
