scsi: qla2xxx: Move logging default mask to execute once only.
authorJoe Carnuccio <joe.carnuccio@cavium.com>
Wed, 23 Aug 2017 22:05:10 +0000 (15:05 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 02:29:25 +0000 (22:29 -0400)
Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_dbg.c
drivers/scsi/qla2xxx/qla_os.c

index 7e7cd79038be07c1ebd8036e85b3fe87e04c0714..065449e0f347f1217573add2f57a91d0e666a350 100644 (file)
@@ -2520,8 +2520,6 @@ qla83xx_fw_dump_failed:
 static inline int
 ql_mask_match(uint32_t level)
 {
-       if (ql2xextended_error_logging == 1)
-               ql2xextended_error_logging = QL_DBG_DEFAULT1_MASK;
        return (level & ql2xextended_error_logging) == level;
 }
 
index 5b033e265a3be64a12c195cc0f6d7aa75c731f6f..10c3ee53ec3a639c121761c191fcfa01d2a02116 100644 (file)
@@ -6648,6 +6648,8 @@ qla2x00_module_init(void)
        strcpy(qla2x00_version_str, QLA2XXX_VERSION);
        if (ql2xextended_error_logging)
                strcat(qla2x00_version_str, "-debug");
+       if (ql2xextended_error_logging == 1)
+               ql2xextended_error_logging = QL_DBG_DEFAULT1_MASK;
 
        qla2xxx_transport_template =
            fc_attach_transport(&qla2xxx_transport_functions);