0
0
mirror of https://mirrors.bfsu.edu.cn/git/linux.git synced 2024-12-29 14:05:19 +08:00
linux/drivers/scsi/pm8001
Ahmed S. Darwish 4ba9e51657 scsi: pm80xx: Do not sleep in atomic context
hw_event_sas_phy_up() is used in hardirq/softirq context:

 pm8001_interrupt_handler_msix() || pm8001_interrupt_handler_intx() || pm8001_tasklet
   => PM8001_CHIP_DISP->isr() = pm80xx_chip_isr()
     => process_oq() [spin_lock_irqsave(&pm8001_ha->lock,)]
       => process_one_iomb()
         => mpi_hw_event()
           => hw_event_sas_phy_up()
             => msleep(200)

Revert the msleep() back to an mdelay() to avoid sleeping in atomic
context.

Link: https://lore.kernel.org/r/20201126132952.2287996-2-bigeasy@linutronix.de
Fixes: 4daf1ef3c6 ("scsi: pm80xx: Convert 'long' mdelay to msleep")
Cc: Vikram Auradkar <auradkar@google.com>
Cc: Jack Wang <jinpu.wang@cloud.ionos.com>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-12-01 00:03:52 -05:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pm80xx_hwi.c scsi: pm80xx: Do not sleep in atomic context 2020-12-01 00:03:52 -05:00
pm80xx_hwi.h scsi: pm80xx: Avoid busywait in FW ready check 2020-11-04 22:55:38 -05:00
pm8001_chips.h
pm8001_ctl.c scsi: pm8001: Neaten debug logging macros and uses 2020-11-23 22:22:11 -05:00
pm8001_ctl.h
pm8001_defs.h scsi: pm80xx: Increase the number of outstanding I/O supported to 1024 2020-10-07 23:50:04 -04:00
pm8001_hwi.c scsi: pm8001: Remove space in a debug message 2020-11-30 23:34:40 -05:00
pm8001_hwi.h scsi: pm80xx: Fix for phy enable/disable functionality 2018-09-11 21:13:08 -04:00
pm8001_init.c scsi: pm8001: Fix misindentation 2020-11-30 23:32:49 -05:00
pm8001_sas.c scsi: pm8001: Convert pm8001_printk() to pm8001_info() 2020-11-30 23:32:19 -05:00
pm8001_sas.h scsi: pm8001: Convert pm8001_printk() to pm8001_info() 2020-11-30 23:32:19 -05:00