On Thu, Mar 08, 2018 at 11:55:13AM -0300, Mauricio Faria de Oliveira wrote:
From: Sreekanth Reddy sreekanth.reddy@broadcom.com
commit c666d3be99c000bb889a33353e9be0fa5808d3de upstream.
This patch finishes all outstanding SCSI IO commands (but not other commands, e.g., task management) in the shutdown and unload paths.
It first waits for the commands to complete (this is done after setting 'ioc->remove_host = 1 ', which prevents new commands to be queued) then it flushes commands that might still be running.
This avoids triggering error handling (e.g., abort command) for all commands possibly completed by the adapter after interrupts disabled.
[mauricfo: introduced something in commit message.]
Signed-off-by: Sreekanth Reddy sreekanth.reddy@broadcom.com Tested-by: Mauricio Faria de Oliveira mauricfo@linux.vnet.ibm.com Signed-off-by: Mauricio Faria de Oliveira mauricfo@linux.vnet.ibm.com Signed-off-by: Martin K. Petersen martin.petersen@oracle.com [mauricfo: backport to linux-4.15.y (a few updates to context lines)]
Also does not apply to 4.14.y :(