mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
target: Introduce TCM_NO_SENSE
Introduce TCM_NO_SENSE, mapping to sense code 'Not ready, no additional sense information'. Signed-off-by: Hannes Reinecke <hare@suse.de> Cc: Nicholas Bellinger <nab@risingtidesystems.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
18a9df42d5
commit
ba829137bf
@ -2597,6 +2597,16 @@ transport_send_check_condition_and_sense(struct se_cmd *cmd,
|
|||||||
* SENSE KEY values from include/scsi/scsi.h
|
* SENSE KEY values from include/scsi/scsi.h
|
||||||
*/
|
*/
|
||||||
switch (reason) {
|
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:
|
case TCM_NON_EXISTENT_LUN:
|
||||||
/* CURRENT ERROR */
|
/* CURRENT ERROR */
|
||||||
buffer[0] = 0x70;
|
buffer[0] = 0x70;
|
||||||
|
@ -174,6 +174,7 @@ typedef unsigned __bitwise__ sense_reason_t;
|
|||||||
|
|
||||||
enum tcm_sense_reason_table {
|
enum tcm_sense_reason_table {
|
||||||
#define R(x) (__force sense_reason_t )(x)
|
#define R(x) (__force sense_reason_t )(x)
|
||||||
|
TCM_NO_SENSE = R(0x00),
|
||||||
TCM_NON_EXISTENT_LUN = R(0x01),
|
TCM_NON_EXISTENT_LUN = R(0x01),
|
||||||
TCM_UNSUPPORTED_SCSI_OPCODE = R(0x02),
|
TCM_UNSUPPORTED_SCSI_OPCODE = R(0x02),
|
||||||
TCM_INCORRECT_AMOUNT_OF_DATA = R(0x03),
|
TCM_INCORRECT_AMOUNT_OF_DATA = R(0x03),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user