[SCSI] bfa: Fix bug_on condition in RPSC rsp handling
authorVijaya Mohan Guvva <vmohan@brocade.com>
Mon, 13 May 2013 09:33:31 +0000 (02:33 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 26 Jun 2013 23:47:36 +0000 (16:47 -0700)
Fix bug_on condition check in RPSC (Report Port Speed Capabilities)
response processing.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/bfa/bfa_fcs_rport.c

index 62713a7c2daf2c1abb4e577126af66b0002ca1c9..2035b0d6435186186af4a497109a9a57b3843931 100644 (file)
@@ -3430,9 +3430,10 @@ bfa_fcs_rpf_rpsc2_response(void *fcsarg, struct bfa_fcxp_s *fcxp, void *cbarg,
                num_ents = be16_to_cpu(rpsc2_acc->num_pids);
                bfa_trc(rport->fcs, num_ents);
                if (num_ents > 0) {
-                       WARN_ON(rpsc2_acc->port_info[0].pid == rport->pid);
+                       WARN_ON(be32_to_cpu(rpsc2_acc->port_info[0].pid) !=
+                                               bfa_ntoh3b(rport->pid));
                        bfa_trc(rport->fcs,
-                               be16_to_cpu(rpsc2_acc->port_info[0].pid));
+                               be32_to_cpu(rpsc2_acc->port_info[0].pid));
                        bfa_trc(rport->fcs,
                                be16_to_cpu(rpsc2_acc->port_info[0].speed));
                        bfa_trc(rport->fcs,