diff options
author | Vasu Dev <vasu.dev@intel.com> | 2011-08-25 12:40:52 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-28 19:39:37 -0700 |
commit | 77a2b73a7805a3c6a473b6741aa514ef40295d26 (patch) | |
tree | c9cc39a2451733c77bad8ce627d336becb78b882 /drivers/scsi/libfc/fc_lport.c | |
parent | 848e7d5b46b9b0ee613a106bc460acf6a09a8546 (diff) | |
download | op-kernel-dev-77a2b73a7805a3c6a473b6741aa514ef40295d26.zip op-kernel-dev-77a2b73a7805a3c6a473b6741aa514ef40295d26.tar.gz |
[SCSI] libfc: fix fc_eh_host_reset
Current fc_eh_host_reset leaves lport offline
permanently due to FLOGI response getting
handled by LOGO response from last reset as both
had same exchange id.
So fix this by having end to end exches clean-up
using exchange abort along exches reset
done from fc_eh_host_reset. This would avoid
exchanges collision between the sessions across
the reset. In this case implicit login should have
done that but no aborting support for FIP
frames, so just wait till lport->r_a_tov before
restarting next flogi to ensure all exchanges
are good to use again for next session.
Below is the trace of LOGO from older session
coming ahead of FLOGI response with same exche id
0x203:-
617 86.435165 4e.00.0b -> ff.ff.fc FC ELS LOGO 0x203
618 86.435195 4e.00.0b -> b6.02.00 FC ELS LOGO 0x213
619 86.435220 4e.00.0b -> 18.03.00 FC ELS LOGO 0x223
620 86.435244 4e.00.0b -> 18.02.00 FC ELS LOGO 0x233
621 86.435267 4e.00.0b -> 18.01.00 FC ELS LOGO 0x243
622 86.435349 00.00.00 -> ff.ff.fe FC ELS FLOGI 0x203
623 86.435549 ff.ff.fc -> 4e.00.0b FC ELS ACC (LOGO) 0x203
624 86.438721 ff.ff.fe -> 4e.00.0b FC ELS ACC (FLOGI) 0x203
625 86.442059 18.03.00 -> 4e.00.0b FC ELS ACC (LOGO) 0x223
626 86.443683 b6.02.00 -> 4e.00.0b FC ELS ACC (LOGO) 0x213
627 86.447693 18.01.00 -> 4e.00.0b FC ELS ACC (LOGO) 0x243
628 86.453499 18.02.00 -> 4e.00.0b FC ELS ACC (LOGO) 0x233
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Reviewed-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libfc/fc_lport.c')
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index e55ed9c..628f347 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -88,6 +88,7 @@ */ #include <linux/timer.h> +#include <linux/delay.h> #include <linux/slab.h> #include <asm/unaligned.h> @@ -1029,8 +1030,16 @@ static void fc_lport_enter_reset(struct fc_lport *lport) FCH_EVT_LIPRESET, 0); fc_vports_linkchange(lport); fc_lport_reset_locked(lport); - if (lport->link_up) + if (lport->link_up) { + /* + * Wait upto resource allocation time out before + * doing re-login since incomplete FIP exchanged + * from last session may collide with exchanges + * in new session. + */ + msleep(lport->r_a_tov); fc_lport_enter_flogi(lport); + } } /** |