From 8ac3f225f9f2695377bca53b8d87e0db5c6546bf Mon Sep 17 00:00:00 2001 From: Nilesh Javali Date: Thu, 23 Jul 2026 10:34:00 +0530 Subject: [PATCH] scsi: qla2xxx: Use 64-bit FPM word counters for 29xx host stats 29xx provides the 64-bit FPM transmit/receive word counters in the link statistics block, like 83xx/27xx/28xx. qla2x00_get_fc_host_stats() only consumed those counters for the older families and fell back to the software approximation (input/output bytes >> 2) on 29xx, reporting less accurate rx_words/tx_words. Add IS_QLA29XX() to the high-speed branch so 29xx reports the hardware word counters. Signed-off-by: Nilesh Javali Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20260723050413.3897522-44-njavali@marvell.com Signed-off-by: Martin K. Petersen (Oracle) --- drivers/scsi/qla2xxx/qla_attr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 19aa66b8ca52..6cf74f8c9628 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -2990,7 +2990,8 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost) p->error_frames = le32_to_cpu(stats->dropped_frames) + le32_to_cpu(stats->discarded_frames); - if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { + if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha) || + IS_QLA29XX(ha)) { p->rx_words = le64_to_cpu(stats->fpm_recv_word_cnt); p->tx_words = le64_to_cpu(stats->fpm_xmit_word_cnt); } else {