]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: vmw_pvscsi: return SUCCESS for successful command aborts
authorDavid Jeffery <djeffery@redhat.com>
Fri, 28 Oct 2016 16:27:26 +0000 (12:27 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 1 Nov 2016 17:31:23 +0000 (13:31 -0400)
commite4be326f6f177698cb5fb5505a9dd3d292074a0d
tree2b1145a0b142843a566dac4221bf9e385896bc44
parent71b5dc074c92856644d2e7b2c9a6e620b12397de
scsi: vmw_pvscsi: return SUCCESS for successful command aborts

The vmw_pvscsi driver reports most successful aborts as FAILED to the
scsi error handler.  This is do to a misunderstanding of how
completion_done() works and its interaction with a successful wait using
wait_for_completion_timeout().  The vmw_pvscsi driver is expecting
completion_done() to always return true if complete() has been called on
the completion structure.  But completion_done() returns true after
complete() has been called only if no function like
wait_for_completion_timeout() has seen the completion and cleared it as
part of successfully waiting for the completion.

Instead of using completion_done(), vmw_pvscsi should just use the
return value from wait_for_completion_timeout() to know if the wait
timed out or not.

[mkp: bumped driver version per request]

Signed-off-by: David Jeffery <djeffery@redhat.com>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Acked-by: Jim Gill <jgill@vmware.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/vmw_pvscsi.c
drivers/scsi/vmw_pvscsi.h