diff options
author | Vasu Dev <vasu.dev@intel.com> | 2011-02-25 18:03:01 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-28 19:31:53 -0500 |
commit | 72fa396bf57b31e8e2a401a21a3a088c0cc6b043 (patch) | |
tree | c4094d3f8db3265dd122952867c1e8ff4e6abb63 /drivers/scsi/libfc | |
parent | f31624831a79b9e3f129f6c3b0a1b83903a7b61e (diff) |
[SCSI] fcoe, libfc: initialize EM anchors list and then update npiv EMs
EM anchors list initialization for only master port was not enough to
keep npiv working as described here:-
https://lists.open-fcoe.org/pipermail/devel/2011-January/011063.html
So this patch moves fc_exch_mgr_list_clone to update npiv ports
EMs once EM anchors list initialized.
Also some cleanup, no need to set lport = NULL as that always
get initialized later.
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_exch.c | 1 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 1 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_npiv.c | 9 |
3 files changed, 3 insertions, 8 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 10a5436aff77..28231badd9e6 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c | |||
@@ -2175,6 +2175,7 @@ err: | |||
2175 | fc_exch_mgr_del(ema); | 2175 | fc_exch_mgr_del(ema); |
2176 | return -ENOMEM; | 2176 | return -ENOMEM; |
2177 | } | 2177 | } |
2178 | EXPORT_SYMBOL(fc_exch_mgr_list_clone); | ||
2178 | 2179 | ||
2179 | /** | 2180 | /** |
2180 | * fc_exch_mgr_alloc() - Allocate an exchange manager | 2181 | * fc_exch_mgr_alloc() - Allocate an exchange manager |
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 735f1f82ccfd..8c08b210001d 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
@@ -1590,6 +1590,7 @@ void fc_lport_enter_flogi(struct fc_lport *lport) | |||
1590 | */ | 1590 | */ |
1591 | int fc_lport_config(struct fc_lport *lport) | 1591 | int fc_lport_config(struct fc_lport *lport) |
1592 | { | 1592 | { |
1593 | INIT_LIST_HEAD(&lport->ema_list); | ||
1593 | INIT_DELAYED_WORK(&lport->retry_work, fc_lport_timeout); | 1594 | INIT_DELAYED_WORK(&lport->retry_work, fc_lport_timeout); |
1594 | mutex_init(&lport->lp_mutex); | 1595 | mutex_init(&lport->lp_mutex); |
1595 | 1596 | ||
diff --git a/drivers/scsi/libfc/fc_npiv.c b/drivers/scsi/libfc/fc_npiv.c index 076cd5ff0e40..f33b897e4784 100644 --- a/drivers/scsi/libfc/fc_npiv.c +++ b/drivers/scsi/libfc/fc_npiv.c | |||
@@ -37,9 +37,7 @@ struct fc_lport *libfc_vport_create(struct fc_vport *vport, int privsize) | |||
37 | 37 | ||
38 | vn_port = libfc_host_alloc(shost->hostt, privsize); | 38 | vn_port = libfc_host_alloc(shost->hostt, privsize); |
39 | if (!vn_port) | 39 | if (!vn_port) |
40 | goto err_out; | 40 | return vn_port; |
41 | if (fc_exch_mgr_list_clone(n_port, vn_port)) | ||
42 | goto err_put; | ||
43 | 41 | ||
44 | vn_port->vport = vport; | 42 | vn_port->vport = vport; |
45 | vport->dd_data = vn_port; | 43 | vport->dd_data = vn_port; |
@@ -49,11 +47,6 @@ struct fc_lport *libfc_vport_create(struct fc_vport *vport, int privsize) | |||
49 | mutex_unlock(&n_port->lp_mutex); | 47 | mutex_unlock(&n_port->lp_mutex); |
50 | 48 | ||
51 | return vn_port; | 49 | return vn_port; |
52 | |||
53 | err_put: | ||
54 | scsi_host_put(vn_port->host); | ||
55 | err_out: | ||
56 | return NULL; | ||
57 | } | 50 | } |
58 | EXPORT_SYMBOL(libfc_vport_create); | 51 | EXPORT_SYMBOL(libfc_vport_create); |
59 | 52 | ||