linux-stable/drivers/scsi/libsas
Xiang Chen 307d9f49cc scsi: libsas: Keep host active while processing events
Processing events such as PORTE_BROADCAST_RCVD may cause dependency issues
for runtime power management support.  Such a problem would be that
handling a PORTE_BROADCAST_RCVD event requires that the host is resumed to
send SMP commands. However, in resuming the host, the phyup events
generated from re-enabling the phys are processed in the same workqueue as
the original PORTE_BROADCAST_RCVD event. As such, the host will never
finish resuming (as it waits for the phyup event processing), and then the
PORTE_BROADCAST_RCVD event can't be processed as the SMP commands are
blocked, and so we have a deadlock.  Solve this problem by ensuring that
libsas keeps the host active until completely finished phy or port events,
such as PORTE_BYTES_DMAED. As such, we don't have to worry about resuming
the host for processing individual SMP commands in this example.

Link: https://lore.kernel.org/r/1639999298-244569-15-git-send-email-chenxiang66@hisilicon.com
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-12-22 23:38:31 -05:00
..
Kconfig scsi: libsas: Drop BLK_DEV_BSGLIB selection 2021-07-27 00:06:42 -04:00
Makefile scsi: libsas: Allow libsas to include SCSI header files directly 2021-07-20 23:11:17 -04:00
sas_ata.c scsi: libsas: Use scsi_cmd_to_rq() instead of scsi_cmnd.request 2021-08-11 22:25:39 -04:00
sas_discover.c scsi: Remove superfluous #include <linux/async.h> directives 2021-11-29 23:02:15 -05:00
sas_event.c scsi: libsas: Keep host active while processing events 2021-12-22 23:38:31 -05:00
sas_expander.c scsi: libsas: Resume host while sending SMP I/Os 2021-12-22 23:38:30 -05:00
sas_host_smp.c scsi: libsas: Allow libsas to include SCSI header files directly 2021-07-20 23:11:17 -04:00
sas_init.c scsi: libsas: Defer works of new phys during suspend 2021-12-22 23:38:30 -05:00
sas_internal.h scsi: libsas: Refactor sas_queue_deferred_work() 2021-12-22 23:38:30 -05:00
sas_phy.c scsi: libsas: Allow libsas to include SCSI header files directly 2021-07-20 23:11:17 -04:00
sas_port.c scsi: libsas: Allow libsas to include SCSI header files directly 2021-07-20 23:11:17 -04:00
sas_scsi_host.c scsi: libsas: Decode SAM status and host byte codes 2021-12-16 22:59:58 -05:00
sas_task.c scsi: libsas: Introduce more SAM status code aliases in enum exec_status 2021-06-02 16:10:46 -04:00