[SCSI] libfc: use FC_MAX_ERROR_CNT
authorHillf Danton <dhillf@gmail.com>
Wed, 27 Jul 2011 22:10:28 +0000 (15:10 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 28 Jul 2011 08:09:36 +0000 (12:09 +0400)
Though defined, FC_MAX_ERROR_CNT is not used. It is used now for CRC error in
the path of receiving FCP frame.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/libfc/fc_fcp.c

index 9cd2149519ace23d9dbbff8fa7d28b1c5e2acdf5..41f7070ba9bae741813e57f4d59c8e5b3e0ff571 100644 (file)
@@ -498,7 +498,7 @@ crc_err:
                        stats = per_cpu_ptr(lport->dev_stats, get_cpu());
                        stats->ErrorFrames++;
                        /* per cpu count, not total count, but OK for limit */
-                       if (stats->InvalidCRCCount++ < 5)
+                       if (stats->InvalidCRCCount++ < FC_MAX_ERROR_CNT)
                                printk(KERN_WARNING "libfc: CRC error on data "
                                       "frame for port (%6.6x)\n",
                                       lport->port_id);