From 15821f05b78dbeb2f897d1d22576449103a4d8d5 Mon Sep 17 00:00:00 2001 From: Krishna Gudipati Date: Mon, 13 Dec 2010 16:23:27 -0800 Subject: [SCSI] bfa: io tag handling and minor bug fix. Fix iotag handling: 1) Update and check io tag for retry case. 2) Clearing upper 3 bits in io tag when an IO completes. The 3 upper bits in io tags are used for counting FCP exchange retry. Un-cleared bits will cause firmware to access invalid memory when the same io tag is used for an IO to a target that doesn't support FCP exchange retry. 3) Only check the effective bits when validating an iotag. Other minor fixes: 1) Added trace to get FC header type with assert of unhandled packet received. Ignore the type FC_TYPE_FC_FSS (FC_XS). 2) Fixed the adapter info display check - to check for fcmode flag even. Signed-off-by: Krishna Gudipati Signed-off-by: James Bottomley --- drivers/scsi/bfa/bfa_fcs_lport.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/bfa/bfa_fcs_lport.c') diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c index 4f2e4e095d67..eb804980cde9 100644 --- a/drivers/scsi/bfa/bfa_fcs_lport.c +++ b/drivers/scsi/bfa/bfa_fcs_lport.c @@ -604,6 +604,7 @@ bfa_fcs_lport_uf_recv(struct bfa_fcs_lport_s *lport, struct fc_els_cmd_s *els_cmd = (struct fc_els_cmd_s *) (fchs + 1); bfa_stats(lport, uf_recvs); + bfa_trc(lport->fcs, fchs->type); if (!bfa_fcs_lport_is_online(lport)) { bfa_stats(lport, uf_recv_drops); @@ -663,8 +664,11 @@ bfa_fcs_lport_uf_recv(struct bfa_fcs_lport_s *lport, * Only handles ELS frames for now. */ if (fchs->type != FC_TYPE_ELS) { - bfa_trc(lport->fcs, fchs->type); - bfa_assert(0); + bfa_trc(lport->fcs, fchs->s_id); + bfa_trc(lport->fcs, fchs->d_id); + /* ignore type FC_TYPE_FC_FSS */ + if (fchs->type != FC_TYPE_FC_FSS) + bfa_sm_fault(lport->fcs, fchs->type); return; } -- cgit v1.2.3-55-g7522