diff options
author | Jing Huang <huangj@brocade.com> | 2010-07-08 22:47:08 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:04:05 -0400 |
commit | 1769f990fc182695bc215ce4369688064addcd1e (patch) | |
tree | f09635abe9e660a6c30eb9b7f50707122e5cb270 /drivers/scsi/bfa | |
parent | d9883548a0b0afec4786e6c5cd8d03d43a30b779 (diff) |
[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: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa')
-rw-r--r-- | drivers/scsi/bfa/vport.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/bfa/vport.c b/drivers/scsi/bfa/vport.c index f14e9f2d2c30..66f30a0d61e0 100644 --- a/drivers/scsi/bfa/vport.c +++ b/drivers/scsi/bfa/vport.c | |||
@@ -218,9 +218,9 @@ bfa_fcs_vport_sm_fdisc(struct bfa_fcs_vport_s *vport, | |||
218 | 218 | ||
219 | switch (event) { | 219 | switch (event) { |
220 | case BFA_FCS_VPORT_SM_DELETE: | 220 | case BFA_FCS_VPORT_SM_DELETE: |
221 | bfa_sm_set_state(vport, bfa_fcs_vport_sm_logo); | 221 | bfa_sm_set_state(vport, bfa_fcs_vport_sm_cleanup); |
222 | bfa_lps_discard(vport->lps); | 222 | bfa_lps_discard(vport->lps); |
223 | bfa_fcs_vport_do_logo(vport); | 223 | bfa_fcs_port_delete(&vport->lport); |
224 | break; | 224 | break; |
225 | 225 | ||
226 | case BFA_FCS_VPORT_SM_OFFLINE: | 226 | case BFA_FCS_VPORT_SM_OFFLINE: |
@@ -357,8 +357,9 @@ bfa_fcs_vport_sm_error(struct bfa_fcs_vport_s *vport, | |||
357 | 357 | ||
358 | switch (event) { | 358 | switch (event) { |
359 | case BFA_FCS_VPORT_SM_DELETE: | 359 | case BFA_FCS_VPORT_SM_DELETE: |
360 | bfa_sm_set_state(vport, bfa_fcs_vport_sm_uninit); | 360 | bfa_sm_set_state(vport, bfa_fcs_vport_sm_cleanup); |
361 | bfa_fcs_vport_free(vport); | 361 | bfa_fcs_port_delete(&vport->lport); |
362 | |||
362 | break; | 363 | break; |
363 | 364 | ||
364 | default: | 365 | default: |