scsi_error: fix invalid setting of host byte
authorUlrich Obergfell <uobergfe@redhat.com>
Wed, 4 Jun 2014 11:34:57 +0000 (13:34 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 24 Jun 2014 15:00:12 +0000 (17:00 +0200)
commit8922a908908ff947f1f211e07e2e97f1169ad3cb
treea1e892598591ccbea088344ae55e359c0ead64c9
parent8b8f5d9715845f9ae2b89ce406e71877965b29ca
scsi_error: fix invalid setting of host byte

After scsi_try_to_abort_cmd returns, the eh_abort_handler may have
already found that the command has completed in the device, causing
the host_byte to be nonzero (e.g. it could be DID_ABORT).  When
this happens, ORing DID_TIME_OUT into the host byte will corrupt
the result field and initiate an unwanted command retry.

Fix this by using set_host_byte instead, following the model of
commit 2082ebc45af9c9c648383b8cde0dc1948eadbf31.

Cc: stable@vger.kernel.org
Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
[Fix all instances according to review comments. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/scsi/scsi_error.c