]> Pileus Git - ~andy/linux/commitdiff
[SCSI] libfc: fix typo in retry check on received PRLI
authorJoe Eykholt <jeykholt@cisco.com>
Wed, 21 Oct 2009 23:26:45 +0000 (16:26 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 4 Dec 2009 18:00:22 +0000 (12:00 -0600)
A received Fibre Channel ELS PRLI request contains a bit that
indicates whether the remote port supports certain retry processing
sequences.  The test for this bit was somehow coded to use multiply
instead of AND!

This case would apply only for target mode operation, and it is
unlikely to be noticed as an initiator.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/libfc/fc_rport.c

index 03ea6748e7eecac3a83416146b7e4a258fc84282..bdc973278d8d6c92deedc6befd457040cd79e037 100644 (file)
@@ -1402,7 +1402,7 @@ static void fc_rport_recv_prli_req(struct fc_rport_priv *rdata,
                                break;
                        case FC_TYPE_FCP:
                                fcp_parm = ntohl(rspp->spp_params);
-                               if (fcp_parm * FCP_SPPF_RETRY)
+                               if (fcp_parm & FCP_SPPF_RETRY)
                                        rdata->flags |= FC_RP_FLAGS_RETRY;
                                rdata->supported_classes = FC_COS_CLASS3;
                                if (fcp_parm & FCP_SPPF_INIT_FCN)