scsi: qla2xxx: Show OS name and version in FDMI-1
authorArun Easi <aeasi@marvell.com>
Tue, 10 Aug 2021 04:37:11 +0000 (21:37 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 12 Aug 2021 03:17:42 +0000 (23:17 -0400)
To be consistent with other OS drivers, register OS name and version in
FDMI-1 fabric registration.

Link: https://lore.kernel.org/r/20210810043720.1137-6-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_gs.c
drivers/scsi/qla2xxx/qla_os.c

index af0e8be..c081bf1 100644 (file)
@@ -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
index b16b7d1..11401cf 100644 (file)
@@ -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);
index 4db7e43..222bcd8 100644 (file)
@@ -7990,7 +7990,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);