From 925d34dfea11c626a09dfb583b6e297f17f6fd55 Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Sun, 4 Aug 2019 10:50:25 -0700 Subject: [PATCH] ufs: ufshcd: Prevent sleeping in IRQ context Few paths from the ufshcd driver is allowing the IRQ handler path to go to sleep, which is incorrect. Hence, prevent them from going to sleep by switching to GFP_ATOMIC (instead of GFP_KERNEL), and disabling the path to dump the registers. Change-Id: Id8ed3e659e9e22b41fa0956543423824c66bf511 Signed-off-by: Raghavendra Rao Ananta --- drivers/scsi/ufs/ufshcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 5ecf5b2bd63a..1840c4b7da0f 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -114,7 +114,7 @@ int ufshcd_dump_regs(struct ufs_hba *hba, size_t offset, size_t len, if (offset % 4 != 0 || len % 4 != 0) /* keep readl happy */ return -EINVAL; - regs = kzalloc(len, GFP_KERNEL); + regs = kzalloc(len, GFP_ATOMIC); if (!regs) return -ENOMEM; @@ -431,8 +431,6 @@ static void ufshcd_print_host_regs(struct ufs_hba *hba) ufshcd_print_clk_freqs(hba); - if (hba->vops && hba->vops->dbg_register_dump) - hba->vops->dbg_register_dump(hba); } static