scsi: ipr: System hung while dlpar adding primary ipr adapter back
authorWen Xiong <wenxiong@linux.vnet.ibm.com>
Fri, 21 Sep 2018 00:32:12 +0000 (19:32 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 21 Sep 2018 16:35:39 +0000 (12:35 -0400)
commit318ddb34b2052f838aa243d07173e2badf3e630e
tree8ea8c5955e10590caa7951a9d39c3e04d04b3b2f
parent8c39e2699f8acb2e29782a834e56306da24937fe
scsi: ipr: System hung while dlpar adding primary ipr adapter back

While dlpar adding primary ipr adapter back, driver goes through adapter
initialization then schedule ipr_worker_thread to start te disk scan by
dropping the host lock, calling scsi_add_device.  Then get the adapter reset
request again, so driver does scsi_block_requests, this will cause the
scsi_add_device get hung until we unblock. But we can't run ipr_worker_thread
to do the unblock because its stuck in scsi_add_device.

This patch fixes the issue.

[mkp: typo and whitespace fixes]

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ipr.c
drivers/scsi/ipr.h