diff mbox series

[5/5] scsi: megaraid_sas: move megasas_dbg_lvl init to megasas_init

Message ID 1663145283-4872-6-git-send-email-kanie@linux.alibaba.com
State New
Headers show
Series scsi: megaraid_sas: some bug fixes and cod cleanup | expand

Commit Message

Guixin Liu Sept. 14, 2022, 8:48 a.m. UTC
The megasas_dbg_lvl is a driver level parameter, dont init in
probe path, otherwise we can not see any debug print when bind
a device to megaraid driver.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sumit Saxena Sept. 28, 2022, 11:19 a.m. UTC | #1
On Wed, Sep 14, 2022 at 2:18 PM Guixin Liu <kanie@linux.alibaba.com> wrote:
>
> The megasas_dbg_lvl is a driver level parameter, dont init in
> probe path, otherwise we can not see any debug print when bind
> a device to megaraid driver.
>
> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
diff mbox series

Patch

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index b5503f9..66f84b5 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -7439,7 +7439,6 @@  static inline void megasas_init_ctrl_params(struct megasas_instance *instance)
 	    (instance->pdev->device == PCI_DEVICE_ID_LSI_SAS0071SKINNY))
 		instance->flag_ieee = 1;
 
-	megasas_dbg_lvl = 0;
 	instance->flag = 0;
 	instance->unload = 1;
 	instance->last_time = 0;
@@ -9011,6 +9010,7 @@  static int __init megasas_init(void)
 	 */
 	pr_info("megasas: %s\n", MEGASAS_VERSION);
 
+	megasas_dbg_lvl = 0;
 	support_poll_for_event = 2;
 	support_device_change = 1;
 	support_nvme_encapsulation = true;