]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] fix the new host byte settings (DID_TARGET_FAILURE and DID_NEXUS_FAILURE)
authorMoger, Babu <Babu.Moger@netapp.com>
Tue, 24 Jan 2012 20:38:46 +0000 (20:38 +0000)
committerJames Bottomley <JBottomley@Parallels.com>
Sun, 19 Feb 2012 14:08:59 +0000 (08:08 -0600)
commit36e0607e0d011cdaef6c003ef2b0a18412646bc3
tree1c010bb75da085c84cf5223035b2624dc6fbd7d6
parent9b847ec2cad5a17694683f99cd2a87ab3d2db3c6
[SCSI] fix the new host byte settings (DID_TARGET_FAILURE and DID_NEXUS_FAILURE)

This patch fixes the host byte settings DID_TARGET_FAILURE and
DID_NEXUS_FAILURE.  The function __scsi_error_from_host_byte, tries to reset
the host byte to DID_OK. But that does not happen because of the OR operation.

Here is the flow.

scsi_softirq_done-> scsi_decide_disposition -> __scsi_error_from_host_byte

Let's take an example with DID_NEXUS_FAILURE. In scsi_decide_disposition,
result will be set as DID_NEXUS_FAILURE (=0x11). Then in
__scsi_error_from_host_byte, when we do OR with DID_OK.  Purpose is to reset
it back to DID_OK. But that does not happen.  This patch fixes this issue.

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c