diff mbox series

[02/11] qla2xxx: Add H:C:T info in the log message for fc ports

Message ID 20210323044257.26664-3-njavali@marvell.com
State Superseded
Headers show
Series qla2xxx driver bug fixes | expand

Commit Message

Nilesh Javali March 23, 2021, 4:42 a.m. UTC
From: Arun Easi <aeasi@marvell.com>

The host:channel:scsi_target_id information is helpful in matching
an fc port with a scsi device, so add it. For initiator fc ports,
a -1 would be displayed for "target" part.

Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Himanshu Madhani March 24, 2021, 3:48 p.m. UTC | #1
> On Mar 22, 2021, at 11:42 PM, Nilesh Javali <njavali@marvell.com> wrote:

> 

> From: Arun Easi <aeasi@marvell.com>

> 

> The host:channel:scsi_target_id information is helpful in matching

> an fc port with a scsi device, so add it. For initiator fc ports,

> a -1 would be displayed for "target" part.

> 

> Signed-off-by: Arun Easi <aeasi@marvell.com>

> Signed-off-by: Nilesh Javali <njavali@marvell.com>

> ---

> drivers/scsi/qla2xxx/qla_init.c | 9 +++++----

> 1 file changed, 5 insertions(+), 4 deletions(-)

> 

> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c

> index f01f07116bd3..af237c485389 100644

> --- a/drivers/scsi/qla2xxx/qla_init.c

> +++ b/drivers/scsi/qla2xxx/qla_init.c

> @@ -5512,13 +5512,14 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)

> 	if (fcport->port_type & FCT_NVME_DISCOVERY)

> 		rport_ids.roles |= FC_PORT_ROLE_NVME_DISCOVERY;

> 

> +	fc_remote_port_rolechg(rport, rport_ids.roles);

> +

> 	ql_dbg(ql_dbg_disc, vha, 0x20ee,

> -	    "%s %8phN. rport %p is %s mode\n",

> -	    __func__, fcport->port_name, rport,

> +	    "%s: %8phN. rport %ld:0:%d (%p) is %s mode\n",

> +	    __func__, fcport->port_name, vha->host_no,

> +	    rport->scsi_target_id, rport,

> 	    (fcport->port_type == FCT_TARGET) ? "tgt" :

> 	    ((fcport->port_type & FCT_NVME) ? "nvme" : "ini"));

> -

> -	fc_remote_port_rolechg(rport, rport_ids.roles);

> }

> 

> /*

> -- 

> 2.19.0.rc0

> 


Looks good.

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


--
Himanshu Madhani	 Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index f01f07116bd3..af237c485389 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -5512,13 +5512,14 @@  qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)
 	if (fcport->port_type & FCT_NVME_DISCOVERY)
 		rport_ids.roles |= FC_PORT_ROLE_NVME_DISCOVERY;
 
+	fc_remote_port_rolechg(rport, rport_ids.roles);
+
 	ql_dbg(ql_dbg_disc, vha, 0x20ee,
-	    "%s %8phN. rport %p is %s mode\n",
-	    __func__, fcport->port_name, rport,
+	    "%s: %8phN. rport %ld:0:%d (%p) is %s mode\n",
+	    __func__, fcport->port_name, vha->host_no,
+	    rport->scsi_target_id, rport,
 	    (fcport->port_type == FCT_TARGET) ? "tgt" :
 	    ((fcport->port_type & FCT_NVME) ? "nvme" : "ini"));
-
-	fc_remote_port_rolechg(rport, rport_ids.roles);
 }
 
 /*