[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1512444517.4239.5.camel@Centos6.3-64>
Date: Tue, 05 Dec 2017 11:28:37 +0800
From: Ching Huang <ching2048@...ca.com.tw>
To: martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: James.Bottomley@...senPartnership.com
Subject: [PATCH 18/17] scsi: arcmsr: Fix report command result error when
CHECK_CONDITION
From: Ching Huang <ching2048@...ca.com.tw>
Fix report command result error when CHECK_CONDITION.
Signed-off-by: Ching Huang <ching2048@...ca.com.tw>
---
diff -uprN a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
--- a/drivers/scsi/arcmsr/arcmsr_hba.c 2017-12-05 17:04:52.000000000 +0800
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2017-12-05 19:17:28.000000000 +0800
@@ -1205,7 +1205,7 @@ static void arcmsr_report_sense_info(str
struct scsi_cmnd *pcmd = ccb->pcmd;
struct SENSE_DATA *sensebuffer = (struct SENSE_DATA *)pcmd->sense_buffer;
- pcmd->result = DID_OK << 16;
+ pcmd->result = (DID_OK << 16) | (CHECK_CONDITION << 1);
if (sensebuffer) {
int sense_data_length =
sizeof(struct SENSE_DATA) < SCSI_SENSE_BUFFERSIZE
@@ -1214,6 +1214,7 @@ static void arcmsr_report_sense_info(str
memcpy(sensebuffer, ccb->arcmsr_cdb.SenseData, sense_data_length);
sensebuffer->ErrorCode = SCSI_SENSE_CURRENT_ERRORS;
sensebuffer->Valid = 1;
+ pcmd->result |= (DRIVER_SENSE << 24);
}
}
Powered by blists - more mailing lists