From: Ilya Khomyakov <khomyakovilya@gmail.com>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: "James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>,
Kashyap Desai <kashyap.desai@broadcom.com>,
Sumit Saxena <sumit.saxena@broadcom.com>,
Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
mpi3mr-linuxdrv.pdl@broadcom.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Ilya Khomyakov <khomyakovilya@gmail.com>
Subject: [PATCH] scsi: mpi3mr: keep DevicePage0 SAS/SATA log on one line
Date: Tue, 4 Aug 2026 17:29:01 +0300 [thread overview]
Message-ID: <20260804142901.4406-1-khomyakovilya@gmail.com> (raw)
The DevicePage0 SAS/SATA diagnostic message contains an embedded newline
inside a single ioc_info() format string.
The first record receives the normal mpi3mr prefix, while the continuation
starts directly with device_info. Consequently, common filtered captures
such as
dmesg | grep -i mpi3mr
retain only the first part of the message and omit device_info, phy_num,
attached_phy_id, and negotiated_link_rate. These fields are useful when
diagnosing SAS discovery and negotiated link-rate problems.
Before the change, a filtered capture stopped after:
mpi3mr0: device_pg0: sas_sata:
sas_address(0x5000cca2708a13c2),flags(0x0000),
Remove the embedded newline and retain only the final newline so the entire
message is emitted as one prefixed kernel log record. Also add the missing
spaces after commas in the format string.
After the change, the same device is reported in one record as:
mpi3mr0: device_pg0: sas_sata: sas_address(0x5000cca2708a13c2),
flags(0x0000), device_info(0x0101), phy_num(18),
attached_phy_id(1), negotiated_link_rate(0x0b)
The wrapping above is only for the changelog. The kernel emits the actual
message on one line.
The change was tested with an out-of-tree mpi3mr 8.17.1.0.4 build. All nine
DevicePage0 SAS/SATA records retained every field in the output of
`dmesg | grep -i mpi3mr`.
This is a diagnostic-output-only change. It does not modify discovery, I/O,
or link-management behavior.
Signed-off-by: Ilya Khomyakov <khomyakovilya@gmail.com>
---
drivers/scsi/mpi3mr/mpi3mr_os.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -1290,8 +1290,9 @@ mpi3mr_debug_dump_devpg0(struct mpi3mr_ioc *mrioc, struct mpi3_device_page0 *dev
struct mpi3_device0_sas_sata_format *sasinf =
&dev_pg0->device_specific.sas_sata_format;
ioc_info(mrioc,
- "device_pg0: sas_sata: sas_address(0x%016llx),flags(0x%04x),\n"
- "device_info(0x%04x), phy_num(%d), attached_phy_id(%d),negotiated_link_rate(0x%02x)\n",
+ "device_pg0: sas_sata: sas_address(0x%016llx), flags(0x%04x), "
+ "device_info(0x%04x), phy_num(%d), attached_phy_id(%d), "
+ "negotiated_link_rate(0x%02x)\n",
le64_to_cpu(sasinf->sas_address),
le16_to_cpu(sasinf->flags),
le16_to_cpu(sasinf->device_info), sasinf->phy_num,
reply other threads:[~2026-08-04 14:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260804142901.4406-1-khomyakovilya@gmail.com \
--to=khomyakovilya@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=kashyap.desai@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mpi3mr-linuxdrv.pdl@broadcom.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=sumit.saxena@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox