linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] scsi: qla2xxx: log message "skipping scsi_scan_host()" as informational
@ 2022-08-25 12:01 Mauricio Faria de Oliveira
  2022-08-25 22:04 ` Himanshu Madhani
  2022-09-01  4:25 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Mauricio Faria de Oliveira @ 2022-08-25 12:01 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen
  Cc: Nilesh Javali, GR-QLogic-Storage-Upstream, linux-scsi

This message is helpful to troubleshoot missing LUNs/SAN boot errors.
It'd be nice to log it by default instead of only enabled with debug.

This user had an accidental/forgotten file modprobe.d/qla2xxx.conf
w/ option qlini_mode=disabled from experiments with FC target mode,
and their boot LUN didn't come up, as it skips scsi scan, of course.

But their boot log didn't provide any clues to help understand that.

The issue/message could be figured out w/ ql2xextended_error_logging,
but it would have been simpler (or even deflected/addressed by user)
w/ it there by default.
(And it also would help support/triage/deflection tooling.)

P.S.: I can't test it on real hardware now (built on next-20220811),
but it's just like other messages in the same function, just below.

Expected change:

 scsi host15: qla2xxx
+qla2xxx [0000:3b:00.0]-00fb:15: skipping scsi_scan_host() for non-initiator port
 qla2xxx [0000:3b:00.0]-00fb:15: QLogic QLE2692 - QLE2692 Dual Port 16Gb FC to PCIe Gen3 x8 Adapter.

According to:

  qla2x00_probe_one()
  ...
          ret = scsi_add_host(...);
  ...
                  ql_log(ql_log_info, ...
                          "skipping scsi_scan_host() for non-initiator port\n");
  ...
          ql_log(ql_log_info, ...
              "QLogic %s - %s.\n", ha->model_number, ha->model_desc);

Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
---
 drivers/scsi/qla2xxx/qla_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 87a93892deac..8bd1947a650b 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -3530,7 +3530,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		qla_dual_mode_enabled(base_vha))
 		scsi_scan_host(host);
 	else
-		ql_dbg(ql_dbg_init, base_vha, 0x0122,
+		ql_log(ql_log_info, base_vha, 0x0122,
 			"skipping scsi_scan_host() for non-initiator port\n");
 
 	qla2x00_alloc_sysfs_attr(base_vha);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND] scsi: qla2xxx: log message "skipping scsi_scan_host()" as informational
  2022-08-25 12:01 [PATCH RESEND] scsi: qla2xxx: log message "skipping scsi_scan_host()" as informational Mauricio Faria de Oliveira
@ 2022-08-25 22:04 ` Himanshu Madhani
  2022-09-01  4:25 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Himanshu Madhani @ 2022-08-25 22:04 UTC (permalink / raw)
  To: Mauricio Faria de Oliveira
  Cc: James E.J. Bottomley, Martin Petersen, Nilesh Javali,
	GR-QLogic-Storage-Upstream, linux-scsi



> On Aug 25, 2022, at 5:01 AM, Mauricio Faria de Oliveira <mfo@canonical.com> wrote:
> 
> This message is helpful to troubleshoot missing LUNs/SAN boot errors.
> It'd be nice to log it by default instead of only enabled with debug.
> 
> This user had an accidental/forgotten file modprobe.d/qla2xxx.conf
> w/ option qlini_mode=disabled from experiments with FC target mode,
> and their boot LUN didn't come up, as it skips scsi scan, of course.
> 
> But their boot log didn't provide any clues to help understand that.
> 
> The issue/message could be figured out w/ ql2xextended_error_logging,
> but it would have been simpler (or even deflected/addressed by user)
> w/ it there by default.
> (And it also would help support/triage/deflection tooling.)
> 
> P.S.: I can't test it on real hardware now (built on next-20220811),
> but it's just like other messages in the same function, just below.
> 
> Expected change:
> 
> scsi host15: qla2xxx
> +qla2xxx [0000:3b:00.0]-00fb:15: skipping scsi_scan_host() for non-initiator port
> qla2xxx [0000:3b:00.0]-00fb:15: QLogic QLE2692 - QLE2692 Dual Port 16Gb FC to PCIe Gen3 x8 Adapter.
> 
> According to:
> 
>  qla2x00_probe_one()
>  ...
>          ret = scsi_add_host(...);
>  ...
>                  ql_log(ql_log_info, ...
>                          "skipping scsi_scan_host() for non-initiator port\n");
>  ...
>          ql_log(ql_log_info, ...
>              "QLogic %s - %s.\n", ha->model_number, ha->model_desc);
> 
> Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
> ---
> drivers/scsi/qla2xxx/qla_os.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index 87a93892deac..8bd1947a650b 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -3530,7 +3530,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
> 		qla_dual_mode_enabled(base_vha))
> 		scsi_scan_host(host);
> 	else
> -		ql_dbg(ql_dbg_init, base_vha, 0x0122,
> +		ql_log(ql_log_info, base_vha, 0x0122,
> 			"skipping scsi_scan_host() for non-initiator port\n");
> 
> 	qla2x00_alloc_sysfs_attr(base_vha);
> -- 
> 2.34.1
> 

Code changes look good and are also verified on my system.

Aug 25 15:01:20 tatoonie kernel: qla2xxx [0000:04:00.0]-0122:1: skipping scsi_scan_host() for non-initiator port
Aug 25 15:01:22 tatoonie kernel: qla2xxx [0000:04:00.1]-0122:10: skipping scsi_scan_host() for non-initiator port

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Tested-by: Himanshu Madhani <himanshu.madhani@oracle.com>

-- 
Himanshu Madhani	Oracle Linux Engineering


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND] scsi: qla2xxx: log message "skipping scsi_scan_host()" as informational
  2022-08-25 12:01 [PATCH RESEND] scsi: qla2xxx: log message "skipping scsi_scan_host()" as informational Mauricio Faria de Oliveira
  2022-08-25 22:04 ` Himanshu Madhani
@ 2022-09-01  4:25 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-09-01  4:25 UTC (permalink / raw)
  To: Mauricio Faria de Oliveira
  Cc: James E.J. Bottomley, Martin K. Petersen, Nilesh Javali,
	GR-QLogic-Storage-Upstream, linux-scsi


Mauricio,

> This message is helpful to troubleshoot missing LUNs/SAN boot errors.
> It'd be nice to log it by default instead of only enabled with debug.

Applied to 6.1/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-01  4:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 12:01 [PATCH RESEND] scsi: qla2xxx: log message "skipping scsi_scan_host()" as informational Mauricio Faria de Oliveira
2022-08-25 22:04 ` Himanshu Madhani
2022-09-01  4:25 ` Martin K. Petersen

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).