在 2021/11/16 22:30, John Garry 写道:
On 16/11/2021 03:10, chenxiang wrote:
From: Xiang Chenchenxiang66@hisilicon.com
Right now hisi_sas driver has already supported runtime PM, and it works well on based function. But for some exception situations, there are some issues related to libsas layer:
- Remove a directly attached disk when sas host is suspended, a hang
will occur in the resume process, patch 1~2 solve the issue;
- Insert a new disk (for expander) during suspended, and the disk is not
revalidated when resuming sas host, patch 4~7 solve the issue;
- SMP IOs from libsas may be sending when sas host is suspended, so
resume sas host when sending SMP IOs in patch 9;
- New phyup may occur during the process of resuming controller, then
work of DISCE_DISCOVER_DOMAIN of a new phy and work PORTE_BYTES_DMAED of suspended phy are blocked by each other, so defer works of new phys during suspend in patch 10~12;
- Work PORTE_BROADCAST_RCVD and PORTE_BYTES_DMAED are in the same
workqueue, but it is possible that they are blocked by each other, so keep sas host active until finished some work in patch 14.
And patch 3 which is related to scsi/block PM is from Alan Stern (https://lore.kernel.org/linux-scsi/20210714161027.GC380727@rowland.harvard.e...)
Generally it looks ok.
It would be nice to test on something which is not hisi_sas.
I have a pm8001 card, but it is not setup in a machine. I can try that as I think we may need for some other work, but feel free to send to community in the meantime (with any issues I mentioned addressed, please).
Ok, thanks.
Thanks, john
.