]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: scsi_transport_fc: Fix FPIN Link Integrity statistics counters
authorJames Smart <jsmart2021@gmail.com>
Tue, 1 Mar 2022 17:55:36 +0000 (09:55 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:20 +0000 (13:57 +0200)
commit3f09a56b12aa88547ddb929ac6a5b34ffd0c3e34
treef2f8b7eec06b930cf1818a16f09188524aa2dbac
parent2ea33f17342f5223bb138fe195329d05807406ef
scsi: scsi_transport_fc: Fix FPIN Link Integrity statistics counters

commit 07e0984b96ec1ba8c6de1c092b986b00ea0c114c upstream.

In the original FPIN commit, stats were incremented by the event_count.
Event_count is the minimum # of events that must occur before an FPIN is
sent. Thus, its not the actual number of events, and could be significantly
off (too low) as it doesn't reflect anything not reported.  Rather than
attempt to count events, have the statistic count how many FPINS cross the
threshold and were reported.

Link: https://lore.kernel.org/r/20220301175536.60250-1-jsmart2021@gmail.com
Fixes: 3dcfe0de5a97 ("scsi: fc: Parse FPIN packets and update statistics")
Cc: <stable@vger.kernel.org> # v5.11+
Cc: Shyam Sundar <ssundar@marvell.com>
Cc: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/scsi_transport_fc.c