From: Don Brace <don.brace@microchip.com>
To: <don.brace@microchip.com>, <scott.teel@microchip.com>,
<scott.benesh@microchip.com>, <gerry.morong@microchip.com>,
<mahesh.rajashekhara@microchip.com>, <mike.mcgowen@microchip.com>,
<murthy.bhat@microchip.com>, <kumar.meiyappan@microchip.com>,
<jeremy.reeves@microchip.com>, <hch@infradead.org>,
<James.Bottomley@HansenPartnership.com>,
<martin.petersen@oracle.com>, <joseph.szczypek@hpe.com>,
<POSWALD@suse.com>, <cameron.cumberland@suse.com>,
Yi Zhang <yi.zhang@redhat.com>
Cc: <linux-scsi@vger.kernel.org>
Subject: [PATCH 3/5] Enhance WWID Logging Logic.
Date: Wed, 23 Apr 2025 13:32:27 -0500 [thread overview]
Message-ID: <20250423183229.538572-4-don.brace@microchip.com> (raw)
In-Reply-To: <20250423183229.538572-1-don.brace@microchip.com>
From: Venkatesh Emparala <Venkatesh.Emparala@microchip.com>
Log the extended WWID for NVMe devices and for devices that have the
firmware feature bit "PQI_FIRMWARE_FEATURE_RPL_EXTENDED_FORMAT_4_5"
enabled.
Log 8-bytes otherwise.
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Signed-off-by: Venkatesh Emparala <Venkatesh.Emparala@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
---
drivers/scsi/smartpqi/smartpqi_init.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 3cb8619e9ce9..efc042071ec0 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -2011,18 +2011,31 @@ static void pqi_dev_info(struct pqi_ctrl_info *ctrl_info,
PQI_DEV_INFO_BUFFER_LENGTH - count,
"-:-");
- if (pqi_is_logical_device(device))
+ if (pqi_is_logical_device(device)) {
count += scnprintf(buffer + count,
PQI_DEV_INFO_BUFFER_LENGTH - count,
" %08x%08x",
*((u32 *)&device->scsi3addr),
*((u32 *)&device->scsi3addr[4]));
- else
+ } else if (ctrl_info->rpl_extended_format_4_5_supported) {
+ if (device->device_type == SA_DEVICE_TYPE_NVME)
+ count += scnprintf(buffer + count,
+ PQI_DEV_INFO_BUFFER_LENGTH - count,
+ " %016llx%016llx",
+ get_unaligned_be64(&device->wwid[0]),
+ get_unaligned_be64(&device->wwid[8]));
+ else
+ count += scnprintf(buffer + count,
+ PQI_DEV_INFO_BUFFER_LENGTH - count,
+ " %016llx",
+ get_unaligned_be64(&device->wwid[0]));
+ } else {
count += scnprintf(buffer + count,
PQI_DEV_INFO_BUFFER_LENGTH - count,
- " %016llx%016llx",
- get_unaligned_be64(&device->wwid[0]),
- get_unaligned_be64(&device->wwid[8]));
+ " %016llx",
+ get_unaligned_be64(&device->wwid[0]));
+ }
+
count += scnprintf(buffer + count, PQI_DEV_INFO_BUFFER_LENGTH - count,
" %s %.8s %.16s ",
--
2.49.0.391.g4bbb303af6
next prev parent reply other threads:[~2025-04-23 18:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 18:32 [PATCH 0/5] smartpqi updates Don Brace
2025-04-23 18:32 ` [PATCH 1/5] smartpqi: take drives offline when controller is offline Don Brace
2025-04-23 18:32 ` [PATCH 2/5] smartpqi: add new pci ids Don Brace
2025-04-23 18:32 ` Don Brace [this message]
2025-04-23 18:32 ` [PATCH 4/5] smartpqi: fix smp_processor_id() call trace for preemptible kernels Don Brace
2025-04-23 18:32 ` [PATCH 5/5] smartpqi: update driver version to 2.1.34-035 Don Brace
2025-04-29 1:45 ` [PATCH 0/5] smartpqi updates Martin K. Petersen
2025-05-06 4:25 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250423183229.538572-4-don.brace@microchip.com \
--to=don.brace@microchip.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=POSWALD@suse.com \
--cc=cameron.cumberland@suse.com \
--cc=gerry.morong@microchip.com \
--cc=hch@infradead.org \
--cc=jeremy.reeves@microchip.com \
--cc=joseph.szczypek@hpe.com \
--cc=kumar.meiyappan@microchip.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mahesh.rajashekhara@microchip.com \
--cc=martin.petersen@oracle.com \
--cc=mike.mcgowen@microchip.com \
--cc=murthy.bhat@microchip.com \
--cc=scott.benesh@microchip.com \
--cc=scott.teel@microchip.com \
--cc=yi.zhang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.