diff mbox series

[05/14] qla2xxx: Show OS name and version in FDMI-1

Message ID 20210805102005.20183-6-njavali@marvell.com
State Superseded
Headers show
Series [01/14] qla2xxx: Add host attribute to trigger MPI hang | expand

Commit Message

Nilesh Javali Aug. 5, 2021, 10:19 a.m. UTC
From: Arun Easi <aeasi@marvell.com>

To be consistent with other OS drivers, register OS name and
version in FDMI-1 fabric registration.

Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_def.h | 2 +-
 drivers/scsi/qla2xxx/qla_gs.c  | 4 ++--
 drivers/scsi/qla2xxx/qla_os.c  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Himanshu Madhani Aug. 5, 2021, 3:25 p.m. UTC | #1
> On Aug 5, 2021, at 5:19 AM, Nilesh Javali <njavali@marvell.com> wrote:
> 
> From: Arun Easi <aeasi@marvell.com>
> 
> To be consistent with other OS drivers, register OS name and
> version in FDMI-1 fabric registration.
> 
> Signed-off-by: Arun Easi <aeasi@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
> drivers/scsi/qla2xxx/qla_def.h | 2 +-
> drivers/scsi/qla2xxx/qla_gs.c  | 4 ++--
> drivers/scsi/qla2xxx/qla_os.c  | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
> index af0e8be0eb9b..c081bf1c7578 100644
> --- a/drivers/scsi/qla2xxx/qla_def.h
> +++ b/drivers/scsi/qla2xxx/qla_def.h
> @@ -2790,7 +2790,7 @@ static const char * const port_dstate_str[] = {
> /*
>  * FDMI HBA attribute types.
>  */
> -#define FDMI1_HBA_ATTR_COUNT			9
> +#define FDMI1_HBA_ATTR_COUNT			10
> #define FDMI2_HBA_ATTR_COUNT			17
> 
> #define FDMI_HBA_NODE_NAME			0x1
> diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
> index b0b15fac5f3b..c37478f1b538 100644
> --- a/drivers/scsi/qla2xxx/qla_gs.c
> +++ b/drivers/scsi/qla2xxx/qla_gs.c
> @@ -1730,8 +1730,6 @@ qla2x00_hba_attributes(scsi_qla_host_t *vha, void *entries,
> 	size += alen;
> 	ql_dbg(ql_dbg_disc, vha, 0x20a8,
> 	    "FIRMWARE VERSION = %s.\n", eiter->a.fw_version);
> -	if (callopt == CALLOPT_FDMI1)
> -		goto done;
> 	/* OS Name and Version */
> 	eiter = entries + size;
> 	eiter->type = cpu_to_be16(FDMI_HBA_OS_NAME_AND_VERSION);
> @@ -1754,6 +1752,8 @@ qla2x00_hba_attributes(scsi_qla_host_t *vha, void *entries,
> 	size += alen;
> 	ql_dbg(ql_dbg_disc, vha, 0x20a9,
> 	    "OS VERSION = %s.\n", eiter->a.os_version);
> +	if (callopt == CALLOPT_FDMI1)
> +		goto done;
> 	/* MAX CT Payload Length */
> 	eiter = entries + size;
> 	eiter->type = cpu_to_be16(FDMI_HBA_MAXIMUM_CT_PAYLOAD_LENGTH);
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index 61ae8cbba670..a1ccd9f32a98 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -7991,7 +7991,7 @@ qla2x00_module_init(void)
> 	BUILD_BUG_ON(sizeof(struct cmd_type_7_fx00) != 64);
> 	BUILD_BUG_ON(sizeof(struct cmd_type_crc_2) != 64);
> 	BUILD_BUG_ON(sizeof(struct ct_entry_24xx) != 64);
> -	BUILD_BUG_ON(sizeof(struct ct_fdmi1_hba_attributes) != 2344);
> +	BUILD_BUG_ON(sizeof(struct ct_fdmi1_hba_attributes) != 2604);
> 	BUILD_BUG_ON(sizeof(struct ct_fdmi2_hba_attributes) != 4424);
> 	BUILD_BUG_ON(sizeof(struct ct_fdmi2_port_attributes) != 4164);
> 	BUILD_BUG_ON(sizeof(struct ct_fdmi_hba_attr) != 260);
> -- 
> 2.19.0.rc0
> 

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

--
Himanshu Madhani	 Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index af0e8be0eb9b..c081bf1c7578 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2790,7 +2790,7 @@  static const char * const port_dstate_str[] = {
 /*
  * FDMI HBA attribute types.
  */
-#define FDMI1_HBA_ATTR_COUNT			9
+#define FDMI1_HBA_ATTR_COUNT			10
 #define FDMI2_HBA_ATTR_COUNT			17
 
 #define FDMI_HBA_NODE_NAME			0x1
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index b0b15fac5f3b..c37478f1b538 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -1730,8 +1730,6 @@  qla2x00_hba_attributes(scsi_qla_host_t *vha, void *entries,
 	size += alen;
 	ql_dbg(ql_dbg_disc, vha, 0x20a8,
 	    "FIRMWARE VERSION = %s.\n", eiter->a.fw_version);
-	if (callopt == CALLOPT_FDMI1)
-		goto done;
 	/* OS Name and Version */
 	eiter = entries + size;
 	eiter->type = cpu_to_be16(FDMI_HBA_OS_NAME_AND_VERSION);
@@ -1754,6 +1752,8 @@  qla2x00_hba_attributes(scsi_qla_host_t *vha, void *entries,
 	size += alen;
 	ql_dbg(ql_dbg_disc, vha, 0x20a9,
 	    "OS VERSION = %s.\n", eiter->a.os_version);
+	if (callopt == CALLOPT_FDMI1)
+		goto done;
 	/* MAX CT Payload Length */
 	eiter = entries + size;
 	eiter->type = cpu_to_be16(FDMI_HBA_MAXIMUM_CT_PAYLOAD_LENGTH);
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 61ae8cbba670..a1ccd9f32a98 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -7991,7 +7991,7 @@  qla2x00_module_init(void)
 	BUILD_BUG_ON(sizeof(struct cmd_type_7_fx00) != 64);
 	BUILD_BUG_ON(sizeof(struct cmd_type_crc_2) != 64);
 	BUILD_BUG_ON(sizeof(struct ct_entry_24xx) != 64);
-	BUILD_BUG_ON(sizeof(struct ct_fdmi1_hba_attributes) != 2344);
+	BUILD_BUG_ON(sizeof(struct ct_fdmi1_hba_attributes) != 2604);
 	BUILD_BUG_ON(sizeof(struct ct_fdmi2_hba_attributes) != 4424);
 	BUILD_BUG_ON(sizeof(struct ct_fdmi2_port_attributes) != 4164);
 	BUILD_BUG_ON(sizeof(struct ct_fdmi_hba_attr) != 260);