Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348836
b: refs/heads/master
c: ba82913
h: refs/heads/master
v: v3
  • Loading branch information
Hannes Reinecke authored and Nicholas Bellinger committed Jan 11, 2013
1 parent 7458be5 commit f6f8e2a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18a9df42d53fabfa43b78be1104838cc8b9762e1
refs/heads/master: ba829137bfd167623363548aa385be769c6b2664
10 changes: 10 additions & 0 deletions trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2597,6 +2597,16 @@ transport_send_check_condition_and_sense(struct se_cmd *cmd,
* SENSE KEY values from include/scsi/scsi.h
*/
switch (reason) {
case TCM_NO_SENSE:
/* CURRENT ERROR */
buffer[0] = 0x70;
buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10;
/* Not Ready */
buffer[SPC_SENSE_KEY_OFFSET] = NOT_READY;
/* NO ADDITIONAL SENSE INFORMATION */
buffer[SPC_ASC_KEY_OFFSET] = 0;
buffer[SPC_ASCQ_KEY_OFFSET] = 0;
break;
case TCM_NON_EXISTENT_LUN:
/* CURRENT ERROR */
buffer[0] = 0x70;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/target/target_core_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ typedef unsigned __bitwise__ sense_reason_t;

enum tcm_sense_reason_table {
#define R(x) (__force sense_reason_t )(x)
TCM_NO_SENSE = R(0x00),
TCM_NON_EXISTENT_LUN = R(0x01),
TCM_UNSUPPORTED_SCSI_OPCODE = R(0x02),
TCM_INCORRECT_AMOUNT_OF_DATA = R(0x03),
Expand Down

0 comments on commit f6f8e2a

Please sign in to comment.