All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V1] bfa: fix faulty handling of events in lps sm
@ 2013-05-13  9:49 Vijay Mohan Guvva
  0 siblings, 0 replies; only message in thread
From: Vijay Mohan Guvva @ 2013-05-13  9:49 UTC (permalink / raw)
  To: linux-scsi, jbottomley; +Cc: Anil Gurumurthy, Vijay Mohan Guvva

Resending the patch as it didn't make the link-scsi list.

When a switch disable/enable or a reboot is done, the HBA port gets an
offline and a subsequent online notification. When the port comes up a
link up notification is sent to bfa from the firmware. The bfa then send
an FLOGI to the firmware which is sent out on the wire.
The switch port meanwhile goes offline (presumably for diagnostics)
which causes the switch not to respond to the FLOGI.
The link down notification is sent to the HBA driver. However owing to a
bug in the lps state machine handling the lps state machine does not
move to sm_init state (it remains in sm_login state and send a login
complete message to fcs). This results in a zero PID assignment as the
login is not really complete.

This fix is to correctly handle the events in lps state machine.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
---
 drivers/scsi/bfa/bfa_svc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c
index 299c1c8..7ed2c57 100644
--- a/drivers/scsi/bfa/bfa_svc.c
+++ b/drivers/scsi/bfa/bfa_svc.c
@@ -1276,7 +1276,6 @@ bfa_lps_sm_login(struct bfa_lps_s *lps, enum bfa_lps_event event)
 
 	switch (event) {
 	case BFA_LPS_SM_FWRSP:
-	case BFA_LPS_SM_OFFLINE:
 		if (lps->status == BFA_STATUS_OK) {
 			bfa_sm_set_state(lps, bfa_lps_sm_online);
 			if (lps->fdisc)
@@ -1305,6 +1304,7 @@ bfa_lps_sm_login(struct bfa_lps_s *lps, enum bfa_lps_event event)
 		bfa_lps_login_comp(lps);
 		break;
 
+	case BFA_LPS_SM_OFFLINE:
 	case BFA_LPS_SM_DELETE:
 		bfa_sm_set_state(lps, bfa_lps_sm_init);
 		break;
-- 
1.8.2.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-13  9:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-13  9:49 [PATCH V1] bfa: fix faulty handling of events in lps sm Vijay Mohan Guvva

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.