提交 1769f990 编写于 作者: J Jing Huang 提交者: James Bottomley

[SCSI] bfa: vport state machine fix

Vport state machine does not cleanup associated lport in some states: while
waiting for fdisc response or fdisc failure state. The fixe is to cleanup lport
on vport delete in all states.  In fdisc state, discard fdisc response and
delete lport and wait for lport deletecompletion. in error state, delete lport
and wait for delete completion.
Signed-off-by: NJing Huang <huangj@brocade.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 d9883548
......@@ -218,9 +218,9 @@ bfa_fcs_vport_sm_fdisc(struct bfa_fcs_vport_s *vport,
switch (event) {
case BFA_FCS_VPORT_SM_DELETE:
bfa_sm_set_state(vport, bfa_fcs_vport_sm_logo);
bfa_sm_set_state(vport, bfa_fcs_vport_sm_cleanup);
bfa_lps_discard(vport->lps);
bfa_fcs_vport_do_logo(vport);
bfa_fcs_port_delete(&vport->lport);
break;
case BFA_FCS_VPORT_SM_OFFLINE:
......@@ -357,8 +357,9 @@ bfa_fcs_vport_sm_error(struct bfa_fcs_vport_s *vport,
switch (event) {
case BFA_FCS_VPORT_SM_DELETE:
bfa_sm_set_state(vport, bfa_fcs_vport_sm_uninit);
bfa_fcs_vport_free(vport);
bfa_sm_set_state(vport, bfa_fcs_vport_sm_cleanup);
bfa_fcs_port_delete(&vport->lport);
break;
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册