linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: mpi3mr: keep DevicePage0 SAS/SATA log on one line
@ 2026-08-04 14:29 Ilya Khomyakov
  0 siblings, 0 replies; only message in thread
From: Ilya Khomyakov @ 2026-08-04 14:29 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: James E . J . Bottomley, Sathya Prakash Veerichetty,
	Kashyap Desai, Sumit Saxena, Sreekanth Reddy, mpi3mr-linuxdrv.pdl,
	linux-scsi, linux-kernel, Ilya Khomyakov

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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-04 14:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 14:29 [PATCH] scsi: mpi3mr: keep DevicePage0 SAS/SATA log on one line Ilya Khomyakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).