Skip to content

Commit fa576b4

Browse files
Ching Huangmartinkpetersen
authored andcommitted
scsi: arcmsr: Fix command result for CHECK_CONDITION
Fix report command result error when CHECK_CONDITION. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent bc81192 commit fa576b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/scsi/arcmsr/arcmsr_hba.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ static void arcmsr_report_sense_info(struct CommandControlBlock *ccb)
12051205

12061206
struct scsi_cmnd *pcmd = ccb->pcmd;
12071207
struct SENSE_DATA *sensebuffer = (struct SENSE_DATA *)pcmd->sense_buffer;
1208-
pcmd->result = DID_OK << 16;
1208+
pcmd->result = (DID_OK << 16) | (CHECK_CONDITION << 1);
12091209
if (sensebuffer) {
12101210
int sense_data_length =
12111211
sizeof(struct SENSE_DATA) < SCSI_SENSE_BUFFERSIZE
@@ -1214,6 +1214,7 @@ static void arcmsr_report_sense_info(struct CommandControlBlock *ccb)
12141214
memcpy(sensebuffer, ccb->arcmsr_cdb.SenseData, sense_data_length);
12151215
sensebuffer->ErrorCode = SCSI_SENSE_CURRENT_ERRORS;
12161216
sensebuffer->Valid = 1;
1217+
pcmd->result |= (DRIVER_SENSE << 24);
12171218
}
12181219
}
12191220

0 commit comments

Comments
 (0)