diff options
-rwxr-xr-x | Documentation/target/tcm_mod_builder.py | 8 | ||||
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.c | 6 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.c | 8 | ||||
-rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 13 | ||||
-rw-r--r-- | drivers/target/iscsi/iscsi_target_configfs.c | 16 | ||||
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 6 | ||||
-rw-r--r-- | drivers/target/sbp/sbp_target.c | 6 | ||||
-rw-r--r-- | drivers/target/target_core_configfs.c | 4 | ||||
-rw-r--r-- | drivers/target/target_core_transport.c | 155 | ||||
-rw-r--r-- | drivers/target/tcm_fc/tfc_conf.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/tcm_usb_gadget.c | 6 | ||||
-rw-r--r-- | drivers/vhost/tcm_vhost.c | 7 | ||||
-rw-r--r-- | include/target/target_core_fabric.h | 1 |
13 files changed, 79 insertions, 163 deletions
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py index 13652381cb71..3fe0d812dcec 100755 --- a/Documentation/target/tcm_mod_builder.py +++ b/Documentation/target/tcm_mod_builder.py | |||
@@ -402,7 +402,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
402 | buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n" | 402 | buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n" |
403 | buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n" | 403 | buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n" |
404 | buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n" | 404 | buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n" |
405 | buf += " .set_fabric_sense_len = " + fabric_mod_name + "_set_fabric_sense_len,\n" | ||
406 | buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n" | 405 | buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n" |
407 | buf += " /*\n" | 406 | buf += " /*\n" |
408 | buf += " * Setup function pointers for generic logic in target_core_fabric_configfs.c\n" | 407 | buf += " * Setup function pointers for generic logic in target_core_fabric_configfs.c\n" |
@@ -905,13 +904,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
905 | buf += "}\n\n" | 904 | buf += "}\n\n" |
906 | bufi += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n" | 905 | bufi += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n" |
907 | 906 | ||
908 | if re.search('set_fabric_sense_len\)\(', fo): | ||
909 | buf += "u16 " + fabric_mod_name + "_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)\n" | ||
910 | buf += "{\n" | ||
911 | buf += " return 0;\n" | ||
912 | buf += "}\n\n" | ||
913 | bufi += "u16 " + fabric_mod_name + "_set_fabric_sense_len(struct se_cmd *, u32);\n" | ||
914 | |||
915 | if re.search('is_state_remove\)\(', fo): | 907 | if re.search('is_state_remove\)\(', fo): |
916 | buf += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *se_cmd)\n" | 908 | buf += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *se_cmd)\n" |
917 | buf += "{\n" | 909 | buf += "{\n" |
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 9e949750be3a..cf23c46185b2 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c | |||
@@ -3564,11 +3564,6 @@ static int srpt_get_tcm_cmd_state(struct se_cmd *se_cmd) | |||
3564 | return srpt_get_cmd_state(ioctx); | 3564 | return srpt_get_cmd_state(ioctx); |
3565 | } | 3565 | } |
3566 | 3566 | ||
3567 | static u16 srpt_set_fabric_sense_len(struct se_cmd *cmd, u32 sense_length) | ||
3568 | { | ||
3569 | return 0; | ||
3570 | } | ||
3571 | |||
3572 | /** | 3567 | /** |
3573 | * srpt_parse_i_port_id() - Parse an initiator port ID. | 3568 | * srpt_parse_i_port_id() - Parse an initiator port ID. |
3574 | * @name: ASCII representation of a 128-bit initiator port ID. | 3569 | * @name: ASCII representation of a 128-bit initiator port ID. |
@@ -3948,7 +3943,6 @@ static struct target_core_fabric_ops srpt_template = { | |||
3948 | .queue_data_in = srpt_queue_response, | 3943 | .queue_data_in = srpt_queue_response, |
3949 | .queue_status = srpt_queue_status, | 3944 | .queue_status = srpt_queue_status, |
3950 | .queue_tm_rsp = srpt_queue_response, | 3945 | .queue_tm_rsp = srpt_queue_response, |
3951 | .set_fabric_sense_len = srpt_set_fabric_sense_len, | ||
3952 | /* | 3946 | /* |
3953 | * Setup function pointers for generic logic in | 3947 | * Setup function pointers for generic logic in |
3954 | * target_core_fabric_configfs.c | 3948 | * target_core_fabric_configfs.c |
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 556afd5da9ff..2358c16c4c8e 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c | |||
@@ -735,12 +735,6 @@ static int tcm_qla2xxx_queue_tm_rsp(struct se_cmd *se_cmd) | |||
735 | return 0; | 735 | return 0; |
736 | } | 736 | } |
737 | 737 | ||
738 | static u16 tcm_qla2xxx_set_fabric_sense_len(struct se_cmd *se_cmd, | ||
739 | u32 sense_length) | ||
740 | { | ||
741 | return 0; | ||
742 | } | ||
743 | |||
744 | /* Local pointer to allocated TCM configfs fabric module */ | 738 | /* Local pointer to allocated TCM configfs fabric module */ |
745 | struct target_fabric_configfs *tcm_qla2xxx_fabric_configfs; | 739 | struct target_fabric_configfs *tcm_qla2xxx_fabric_configfs; |
746 | struct target_fabric_configfs *tcm_qla2xxx_npiv_fabric_configfs; | 740 | struct target_fabric_configfs *tcm_qla2xxx_npiv_fabric_configfs; |
@@ -1686,7 +1680,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_ops = { | |||
1686 | .queue_data_in = tcm_qla2xxx_queue_data_in, | 1680 | .queue_data_in = tcm_qla2xxx_queue_data_in, |
1687 | .queue_status = tcm_qla2xxx_queue_status, | 1681 | .queue_status = tcm_qla2xxx_queue_status, |
1688 | .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, | 1682 | .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, |
1689 | .set_fabric_sense_len = tcm_qla2xxx_set_fabric_sense_len, | ||
1690 | /* | 1683 | /* |
1691 | * Setup function pointers for generic logic in | 1684 | * Setup function pointers for generic logic in |
1692 | * target_core_fabric_configfs.c | 1685 | * target_core_fabric_configfs.c |
@@ -1734,7 +1727,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = { | |||
1734 | .queue_data_in = tcm_qla2xxx_queue_data_in, | 1727 | .queue_data_in = tcm_qla2xxx_queue_data_in, |
1735 | .queue_status = tcm_qla2xxx_queue_status, | 1728 | .queue_status = tcm_qla2xxx_queue_status, |
1736 | .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, | 1729 | .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, |
1737 | .set_fabric_sense_len = tcm_qla2xxx_set_fabric_sense_len, | ||
1738 | /* | 1730 | /* |
1739 | * Setup function pointers for generic logic in | 1731 | * Setup function pointers for generic logic in |
1740 | * target_core_fabric_configfs.c | 1732 | * target_core_fabric_configfs.c |
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 97c0f78c3c9c..9cfdeedaadb6 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
@@ -953,7 +953,7 @@ done: | |||
953 | */ | 953 | */ |
954 | transport_init_se_cmd(&cmd->se_cmd, &lio_target_fabric_configfs->tf_ops, | 954 | transport_init_se_cmd(&cmd->se_cmd, &lio_target_fabric_configfs->tf_ops, |
955 | conn->sess->se_sess, hdr->data_length, cmd->data_direction, | 955 | conn->sess->se_sess, hdr->data_length, cmd->data_direction, |
956 | sam_task_attr, &cmd->sense_buffer[0]); | 956 | sam_task_attr, cmd->sense_buffer + 2); |
957 | 957 | ||
958 | pr_debug("Got SCSI Command, ITT: 0x%08x, CmdSN: 0x%08x," | 958 | pr_debug("Got SCSI Command, ITT: 0x%08x, CmdSN: 0x%08x," |
959 | " ExpXferLen: %u, Length: %u, CID: %hu\n", hdr->itt, | 959 | " ExpXferLen: %u, Length: %u, CID: %hu\n", hdr->itt, |
@@ -1700,7 +1700,7 @@ static int iscsit_handle_task_mgt_cmd( | |||
1700 | transport_init_se_cmd(&cmd->se_cmd, | 1700 | transport_init_se_cmd(&cmd->se_cmd, |
1701 | &lio_target_fabric_configfs->tf_ops, | 1701 | &lio_target_fabric_configfs->tf_ops, |
1702 | conn->sess->se_sess, 0, DMA_NONE, | 1702 | conn->sess->se_sess, 0, DMA_NONE, |
1703 | MSG_SIMPLE_TAG, &cmd->sense_buffer[0]); | 1703 | MSG_SIMPLE_TAG, cmd->sense_buffer + 2); |
1704 | 1704 | ||
1705 | switch (function) { | 1705 | switch (function) { |
1706 | case ISCSI_TM_FUNC_ABORT_TASK: | 1706 | case ISCSI_TM_FUNC_ABORT_TASK: |
@@ -3092,15 +3092,18 @@ static int iscsit_send_status( | |||
3092 | if (cmd->se_cmd.sense_buffer && | 3092 | if (cmd->se_cmd.sense_buffer && |
3093 | ((cmd->se_cmd.se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) || | 3093 | ((cmd->se_cmd.se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) || |
3094 | (cmd->se_cmd.se_cmd_flags & SCF_EMULATED_TASK_SENSE))) { | 3094 | (cmd->se_cmd.se_cmd_flags & SCF_EMULATED_TASK_SENSE))) { |
3095 | put_unaligned_be16(cmd->se_cmd.scsi_sense_length, cmd->sense_buffer); | ||
3096 | cmd->se_cmd.scsi_sense_length += sizeof (__be16); | ||
3097 | |||
3095 | padding = -(cmd->se_cmd.scsi_sense_length) & 3; | 3098 | padding = -(cmd->se_cmd.scsi_sense_length) & 3; |
3096 | hton24(hdr->dlength, cmd->se_cmd.scsi_sense_length); | 3099 | hton24(hdr->dlength, cmd->se_cmd.scsi_sense_length); |
3097 | iov[iov_count].iov_base = cmd->se_cmd.sense_buffer; | 3100 | iov[iov_count].iov_base = cmd->sense_buffer; |
3098 | iov[iov_count++].iov_len = | 3101 | iov[iov_count++].iov_len = |
3099 | (cmd->se_cmd.scsi_sense_length + padding); | 3102 | (cmd->se_cmd.scsi_sense_length + padding); |
3100 | tx_size += cmd->se_cmd.scsi_sense_length; | 3103 | tx_size += cmd->se_cmd.scsi_sense_length; |
3101 | 3104 | ||
3102 | if (padding) { | 3105 | if (padding) { |
3103 | memset(cmd->se_cmd.sense_buffer + | 3106 | memset(cmd->sense_buffer + |
3104 | cmd->se_cmd.scsi_sense_length, 0, padding); | 3107 | cmd->se_cmd.scsi_sense_length, 0, padding); |
3105 | tx_size += padding; | 3108 | tx_size += padding; |
3106 | pr_debug("Adding %u bytes of padding to" | 3109 | pr_debug("Adding %u bytes of padding to" |
@@ -3109,7 +3112,7 @@ static int iscsit_send_status( | |||
3109 | 3112 | ||
3110 | if (conn->conn_ops->DataDigest) { | 3113 | if (conn->conn_ops->DataDigest) { |
3111 | iscsit_do_crypto_hash_buf(&conn->conn_tx_hash, | 3114 | iscsit_do_crypto_hash_buf(&conn->conn_tx_hash, |
3112 | cmd->se_cmd.sense_buffer, | 3115 | cmd->sense_buffer, |
3113 | (cmd->se_cmd.scsi_sense_length + padding), | 3116 | (cmd->se_cmd.scsi_sense_length + padding), |
3114 | 0, NULL, (u8 *)&cmd->data_crc); | 3117 | 0, NULL, (u8 *)&cmd->data_crc); |
3115 | 3118 | ||
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c index 518fd4e86409..f86833fcf33c 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c | |||
@@ -1542,21 +1542,6 @@ static int lio_queue_status(struct se_cmd *se_cmd) | |||
1542 | return 0; | 1542 | return 0; |
1543 | } | 1543 | } |
1544 | 1544 | ||
1545 | static u16 lio_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length) | ||
1546 | { | ||
1547 | unsigned char *buffer = se_cmd->sense_buffer; | ||
1548 | /* | ||
1549 | * From RFC-3720 10.4.7. Data Segment - Sense and Response Data Segment | ||
1550 | * 16-bit SenseLength. | ||
1551 | */ | ||
1552 | buffer[0] = ((sense_length >> 8) & 0xff); | ||
1553 | buffer[1] = (sense_length & 0xff); | ||
1554 | /* | ||
1555 | * Return two byte offset into allocated sense_buffer. | ||
1556 | */ | ||
1557 | return 2; | ||
1558 | } | ||
1559 | |||
1560 | static int lio_queue_tm_rsp(struct se_cmd *se_cmd) | 1545 | static int lio_queue_tm_rsp(struct se_cmd *se_cmd) |
1561 | { | 1546 | { |
1562 | struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); | 1547 | struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); |
@@ -1740,7 +1725,6 @@ int iscsi_target_register_configfs(void) | |||
1740 | fabric->tf_ops.queue_data_in = &lio_queue_data_in; | 1725 | fabric->tf_ops.queue_data_in = &lio_queue_data_in; |
1741 | fabric->tf_ops.queue_status = &lio_queue_status; | 1726 | fabric->tf_ops.queue_status = &lio_queue_status; |
1742 | fabric->tf_ops.queue_tm_rsp = &lio_queue_tm_rsp; | 1727 | fabric->tf_ops.queue_tm_rsp = &lio_queue_tm_rsp; |
1743 | fabric->tf_ops.set_fabric_sense_len = &lio_set_fabric_sense_len; | ||
1744 | /* | 1728 | /* |
1745 | * Setup function pointers for generic logic in target_core_fabric_configfs.c | 1729 | * Setup function pointers for generic logic in target_core_fabric_configfs.c |
1746 | */ | 1730 | */ |
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 4ab1d0b43a85..7a0da1ae0040 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
@@ -846,11 +846,6 @@ static int tcm_loop_queue_tm_rsp(struct se_cmd *se_cmd) | |||
846 | return 0; | 846 | return 0; |
847 | } | 847 | } |
848 | 848 | ||
849 | static u16 tcm_loop_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length) | ||
850 | { | ||
851 | return 0; | ||
852 | } | ||
853 | |||
854 | static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba) | 849 | static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba) |
855 | { | 850 | { |
856 | switch (tl_hba->tl_proto_id) { | 851 | switch (tl_hba->tl_proto_id) { |
@@ -1368,7 +1363,6 @@ static int tcm_loop_register_configfs(void) | |||
1368 | fabric->tf_ops.queue_data_in = &tcm_loop_queue_data_in; | 1363 | fabric->tf_ops.queue_data_in = &tcm_loop_queue_data_in; |
1369 | fabric->tf_ops.queue_status = &tcm_loop_queue_status; | 1364 | fabric->tf_ops.queue_status = &tcm_loop_queue_status; |
1370 | fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp; | 1365 | fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp; |
1371 | fabric->tf_ops.set_fabric_sense_len = &tcm_loop_set_fabric_sense_len; | ||
1372 | 1366 | ||
1373 | /* | 1367 | /* |
1374 | * Setup function pointers for generic logic in target_core_fabric_configfs.c | 1368 | * Setup function pointers for generic logic in target_core_fabric_configfs.c |
diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c index cb40a40326cd..4d9797744637 100644 --- a/drivers/target/sbp/sbp_target.c +++ b/drivers/target/sbp/sbp_target.c | |||
@@ -1847,11 +1847,6 @@ static int sbp_queue_tm_rsp(struct se_cmd *se_cmd) | |||
1847 | return 0; | 1847 | return 0; |
1848 | } | 1848 | } |
1849 | 1849 | ||
1850 | static u16 sbp_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length) | ||
1851 | { | ||
1852 | return 0; | ||
1853 | } | ||
1854 | |||
1855 | static int sbp_check_stop_free(struct se_cmd *se_cmd) | 1850 | static int sbp_check_stop_free(struct se_cmd *se_cmd) |
1856 | { | 1851 | { |
1857 | struct sbp_target_request *req = container_of(se_cmd, | 1852 | struct sbp_target_request *req = container_of(se_cmd, |
@@ -2529,7 +2524,6 @@ static struct target_core_fabric_ops sbp_ops = { | |||
2529 | .queue_data_in = sbp_queue_data_in, | 2524 | .queue_data_in = sbp_queue_data_in, |
2530 | .queue_status = sbp_queue_status, | 2525 | .queue_status = sbp_queue_status, |
2531 | .queue_tm_rsp = sbp_queue_tm_rsp, | 2526 | .queue_tm_rsp = sbp_queue_tm_rsp, |
2532 | .set_fabric_sense_len = sbp_set_fabric_sense_len, | ||
2533 | .check_stop_free = sbp_check_stop_free, | 2527 | .check_stop_free = sbp_check_stop_free, |
2534 | 2528 | ||
2535 | .fabric_make_wwn = sbp_make_tport, | 2529 | .fabric_make_wwn = sbp_make_tport, |
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 946d8e952b67..81dbfed16b20 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c | |||
@@ -457,10 +457,6 @@ static int target_fabric_tf_ops_check( | |||
457 | pr_err("Missing tfo->queue_tm_rsp()\n"); | 457 | pr_err("Missing tfo->queue_tm_rsp()\n"); |
458 | return -EINVAL; | 458 | return -EINVAL; |
459 | } | 459 | } |
460 | if (!tfo->set_fabric_sense_len) { | ||
461 | pr_err("Missing tfo->set_fabric_sense_len()\n"); | ||
462 | return -EINVAL; | ||
463 | } | ||
464 | /* | 460 | /* |
465 | * We at least require tfo->fabric_make_wwn(), tfo->fabric_drop_wwn() | 461 | * We at least require tfo->fabric_make_wwn(), tfo->fabric_drop_wwn() |
466 | * tfo->fabric_make_tpg() and tfo->fabric_drop_tpg() in | 462 | * tfo->fabric_make_tpg() and tfo->fabric_drop_tpg() in |
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index fd0d0f03326b..d6d48447f1a4 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
@@ -567,9 +567,7 @@ static void target_complete_failure_work(struct work_struct *work) | |||
567 | */ | 567 | */ |
568 | static unsigned char *transport_get_sense_buffer(struct se_cmd *cmd) | 568 | static unsigned char *transport_get_sense_buffer(struct se_cmd *cmd) |
569 | { | 569 | { |
570 | unsigned char *buffer = cmd->sense_buffer; | ||
571 | struct se_device *dev = cmd->se_dev; | 570 | struct se_device *dev = cmd->se_dev; |
572 | u32 offset = 0; | ||
573 | 571 | ||
574 | WARN_ON(!cmd->se_lun); | 572 | WARN_ON(!cmd->se_lun); |
575 | 573 | ||
@@ -579,14 +577,11 @@ static unsigned char *transport_get_sense_buffer(struct se_cmd *cmd) | |||
579 | if (cmd->se_cmd_flags & SCF_SENT_CHECK_CONDITION) | 577 | if (cmd->se_cmd_flags & SCF_SENT_CHECK_CONDITION) |
580 | return NULL; | 578 | return NULL; |
581 | 579 | ||
582 | offset = cmd->se_tfo->set_fabric_sense_len(cmd, TRANSPORT_SENSE_BUFFER); | 580 | cmd->scsi_sense_length = TRANSPORT_SENSE_BUFFER; |
583 | |||
584 | /* Automatically padded */ | ||
585 | cmd->scsi_sense_length = TRANSPORT_SENSE_BUFFER + offset; | ||
586 | 581 | ||
587 | pr_debug("HBA_[%u]_PLUG[%s]: Requesting sense for SAM STATUS: 0x%02x\n", | 582 | pr_debug("HBA_[%u]_PLUG[%s]: Requesting sense for SAM STATUS: 0x%02x\n", |
588 | dev->se_hba->hba_id, dev->transport->name, cmd->scsi_status); | 583 | dev->se_hba->hba_id, dev->transport->name, cmd->scsi_status); |
589 | return &buffer[offset]; | 584 | return cmd->sense_buffer; |
590 | } | 585 | } |
591 | 586 | ||
592 | void target_complete_cmd(struct se_cmd *cmd, u8 scsi_status) | 587 | void target_complete_cmd(struct se_cmd *cmd, u8 scsi_status) |
@@ -2804,7 +2799,6 @@ int transport_send_check_condition_and_sense( | |||
2804 | { | 2799 | { |
2805 | unsigned char *buffer = cmd->sense_buffer; | 2800 | unsigned char *buffer = cmd->sense_buffer; |
2806 | unsigned long flags; | 2801 | unsigned long flags; |
2807 | int offset; | ||
2808 | u8 asc = 0, ascq = 0; | 2802 | u8 asc = 0, ascq = 0; |
2809 | 2803 | ||
2810 | spin_lock_irqsave(&cmd->t_state_lock, flags); | 2804 | spin_lock_irqsave(&cmd->t_state_lock, flags); |
@@ -2820,14 +2814,7 @@ int transport_send_check_condition_and_sense( | |||
2820 | 2814 | ||
2821 | if (!from_transport) | 2815 | if (!from_transport) |
2822 | cmd->se_cmd_flags |= SCF_EMULATED_TASK_SENSE; | 2816 | cmd->se_cmd_flags |= SCF_EMULATED_TASK_SENSE; |
2823 | /* | 2817 | |
2824 | * Data Segment and SenseLength of the fabric response PDU. | ||
2825 | * | ||
2826 | * TRANSPORT_SENSE_BUFFER is now set to SCSI_SENSE_BUFFERSIZE | ||
2827 | * from include/scsi/scsi_cmnd.h | ||
2828 | */ | ||
2829 | offset = cmd->se_tfo->set_fabric_sense_len(cmd, | ||
2830 | TRANSPORT_SENSE_BUFFER); | ||
2831 | /* | 2818 | /* |
2832 | * Actual SENSE DATA, see SPC-3 7.23.2 SPC_SENSE_KEY_OFFSET uses | 2819 | * Actual SENSE DATA, see SPC-3 7.23.2 SPC_SENSE_KEY_OFFSET uses |
2833 | * SENSE KEY values from include/scsi/scsi.h | 2820 | * SENSE KEY values from include/scsi/scsi.h |
@@ -2835,151 +2822,151 @@ int transport_send_check_condition_and_sense( | |||
2835 | switch (reason) { | 2822 | switch (reason) { |
2836 | case TCM_NON_EXISTENT_LUN: | 2823 | case TCM_NON_EXISTENT_LUN: |
2837 | /* CURRENT ERROR */ | 2824 | /* CURRENT ERROR */ |
2838 | buffer[offset] = 0x70; | 2825 | buffer[0] = 0x70; |
2839 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2826 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2840 | /* ILLEGAL REQUEST */ | 2827 | /* ILLEGAL REQUEST */ |
2841 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | 2828 | buffer[SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; |
2842 | /* LOGICAL UNIT NOT SUPPORTED */ | 2829 | /* LOGICAL UNIT NOT SUPPORTED */ |
2843 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x25; | 2830 | buffer[SPC_ASC_KEY_OFFSET] = 0x25; |
2844 | break; | 2831 | break; |
2845 | case TCM_UNSUPPORTED_SCSI_OPCODE: | 2832 | case TCM_UNSUPPORTED_SCSI_OPCODE: |
2846 | case TCM_SECTOR_COUNT_TOO_MANY: | 2833 | case TCM_SECTOR_COUNT_TOO_MANY: |
2847 | /* CURRENT ERROR */ | 2834 | /* CURRENT ERROR */ |
2848 | buffer[offset] = 0x70; | 2835 | buffer[0] = 0x70; |
2849 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2836 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2850 | /* ILLEGAL REQUEST */ | 2837 | /* ILLEGAL REQUEST */ |
2851 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | 2838 | buffer[SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; |
2852 | /* INVALID COMMAND OPERATION CODE */ | 2839 | /* INVALID COMMAND OPERATION CODE */ |
2853 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x20; | 2840 | buffer[SPC_ASC_KEY_OFFSET] = 0x20; |
2854 | break; | 2841 | break; |
2855 | case TCM_UNKNOWN_MODE_PAGE: | 2842 | case TCM_UNKNOWN_MODE_PAGE: |
2856 | /* CURRENT ERROR */ | 2843 | /* CURRENT ERROR */ |
2857 | buffer[offset] = 0x70; | 2844 | buffer[0] = 0x70; |
2858 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2845 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2859 | /* ILLEGAL REQUEST */ | 2846 | /* ILLEGAL REQUEST */ |
2860 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | 2847 | buffer[SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; |
2861 | /* INVALID FIELD IN CDB */ | 2848 | /* INVALID FIELD IN CDB */ |
2862 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x24; | 2849 | buffer[SPC_ASC_KEY_OFFSET] = 0x24; |
2863 | break; | 2850 | break; |
2864 | case TCM_CHECK_CONDITION_ABORT_CMD: | 2851 | case TCM_CHECK_CONDITION_ABORT_CMD: |
2865 | /* CURRENT ERROR */ | 2852 | /* CURRENT ERROR */ |
2866 | buffer[offset] = 0x70; | 2853 | buffer[0] = 0x70; |
2867 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2854 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2868 | /* ABORTED COMMAND */ | 2855 | /* ABORTED COMMAND */ |
2869 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | 2856 | buffer[SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; |
2870 | /* BUS DEVICE RESET FUNCTION OCCURRED */ | 2857 | /* BUS DEVICE RESET FUNCTION OCCURRED */ |
2871 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x29; | 2858 | buffer[SPC_ASC_KEY_OFFSET] = 0x29; |
2872 | buffer[offset+SPC_ASCQ_KEY_OFFSET] = 0x03; | 2859 | buffer[SPC_ASCQ_KEY_OFFSET] = 0x03; |
2873 | break; | 2860 | break; |
2874 | case TCM_INCORRECT_AMOUNT_OF_DATA: | 2861 | case TCM_INCORRECT_AMOUNT_OF_DATA: |
2875 | /* CURRENT ERROR */ | 2862 | /* CURRENT ERROR */ |
2876 | buffer[offset] = 0x70; | 2863 | buffer[0] = 0x70; |
2877 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2864 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2878 | /* ABORTED COMMAND */ | 2865 | /* ABORTED COMMAND */ |
2879 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | 2866 | buffer[SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; |
2880 | /* WRITE ERROR */ | 2867 | /* WRITE ERROR */ |
2881 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x0c; | 2868 | buffer[SPC_ASC_KEY_OFFSET] = 0x0c; |
2882 | /* NOT ENOUGH UNSOLICITED DATA */ | 2869 | /* NOT ENOUGH UNSOLICITED DATA */ |
2883 | buffer[offset+SPC_ASCQ_KEY_OFFSET] = 0x0d; | 2870 | buffer[SPC_ASCQ_KEY_OFFSET] = 0x0d; |
2884 | break; | 2871 | break; |
2885 | case TCM_INVALID_CDB_FIELD: | 2872 | case TCM_INVALID_CDB_FIELD: |
2886 | /* CURRENT ERROR */ | 2873 | /* CURRENT ERROR */ |
2887 | buffer[offset] = 0x70; | 2874 | buffer[0] = 0x70; |
2888 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2875 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2889 | /* ILLEGAL REQUEST */ | 2876 | /* ILLEGAL REQUEST */ |
2890 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | 2877 | buffer[SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; |
2891 | /* INVALID FIELD IN CDB */ | 2878 | /* INVALID FIELD IN CDB */ |
2892 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x24; | 2879 | buffer[SPC_ASC_KEY_OFFSET] = 0x24; |
2893 | break; | 2880 | break; |
2894 | case TCM_INVALID_PARAMETER_LIST: | 2881 | case TCM_INVALID_PARAMETER_LIST: |
2895 | /* CURRENT ERROR */ | 2882 | /* CURRENT ERROR */ |
2896 | buffer[offset] = 0x70; | 2883 | buffer[0] = 0x70; |
2897 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2884 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2898 | /* ILLEGAL REQUEST */ | 2885 | /* ILLEGAL REQUEST */ |
2899 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | 2886 | buffer[SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; |
2900 | /* INVALID FIELD IN PARAMETER LIST */ | 2887 | /* INVALID FIELD IN PARAMETER LIST */ |
2901 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x26; | 2888 | buffer[SPC_ASC_KEY_OFFSET] = 0x26; |
2902 | break; | 2889 | break; |
2903 | case TCM_UNEXPECTED_UNSOLICITED_DATA: | 2890 | case TCM_UNEXPECTED_UNSOLICITED_DATA: |
2904 | /* CURRENT ERROR */ | 2891 | /* CURRENT ERROR */ |
2905 | buffer[offset] = 0x70; | 2892 | buffer[0] = 0x70; |
2906 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2893 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2907 | /* ABORTED COMMAND */ | 2894 | /* ABORTED COMMAND */ |
2908 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | 2895 | buffer[SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; |
2909 | /* WRITE ERROR */ | 2896 | /* WRITE ERROR */ |
2910 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x0c; | 2897 | buffer[SPC_ASC_KEY_OFFSET] = 0x0c; |
2911 | /* UNEXPECTED_UNSOLICITED_DATA */ | 2898 | /* UNEXPECTED_UNSOLICITED_DATA */ |
2912 | buffer[offset+SPC_ASCQ_KEY_OFFSET] = 0x0c; | 2899 | buffer[SPC_ASCQ_KEY_OFFSET] = 0x0c; |
2913 | break; | 2900 | break; |
2914 | case TCM_SERVICE_CRC_ERROR: | 2901 | case TCM_SERVICE_CRC_ERROR: |
2915 | /* CURRENT ERROR */ | 2902 | /* CURRENT ERROR */ |
2916 | buffer[offset] = 0x70; | 2903 | buffer[0] = 0x70; |
2917 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2904 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2918 | /* ABORTED COMMAND */ | 2905 | /* ABORTED COMMAND */ |
2919 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | 2906 | buffer[SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; |
2920 | /* PROTOCOL SERVICE CRC ERROR */ | 2907 | /* PROTOCOL SERVICE CRC ERROR */ |
2921 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x47; | 2908 | buffer[SPC_ASC_KEY_OFFSET] = 0x47; |
2922 | /* N/A */ | 2909 | /* N/A */ |
2923 | buffer[offset+SPC_ASCQ_KEY_OFFSET] = 0x05; | 2910 | buffer[SPC_ASCQ_KEY_OFFSET] = 0x05; |
2924 | break; | 2911 | break; |
2925 | case TCM_SNACK_REJECTED: | 2912 | case TCM_SNACK_REJECTED: |
2926 | /* CURRENT ERROR */ | 2913 | /* CURRENT ERROR */ |
2927 | buffer[offset] = 0x70; | 2914 | buffer[0] = 0x70; |
2928 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2915 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2929 | /* ABORTED COMMAND */ | 2916 | /* ABORTED COMMAND */ |
2930 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | 2917 | buffer[SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; |
2931 | /* READ ERROR */ | 2918 | /* READ ERROR */ |
2932 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x11; | 2919 | buffer[SPC_ASC_KEY_OFFSET] = 0x11; |
2933 | /* FAILED RETRANSMISSION REQUEST */ | 2920 | /* FAILED RETRANSMISSION REQUEST */ |
2934 | buffer[offset+SPC_ASCQ_KEY_OFFSET] = 0x13; | 2921 | buffer[SPC_ASCQ_KEY_OFFSET] = 0x13; |
2935 | break; | 2922 | break; |
2936 | case TCM_WRITE_PROTECTED: | 2923 | case TCM_WRITE_PROTECTED: |
2937 | /* CURRENT ERROR */ | 2924 | /* CURRENT ERROR */ |
2938 | buffer[offset] = 0x70; | 2925 | buffer[0] = 0x70; |
2939 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2926 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2940 | /* DATA PROTECT */ | 2927 | /* DATA PROTECT */ |
2941 | buffer[offset+SPC_SENSE_KEY_OFFSET] = DATA_PROTECT; | 2928 | buffer[SPC_SENSE_KEY_OFFSET] = DATA_PROTECT; |
2942 | /* WRITE PROTECTED */ | 2929 | /* WRITE PROTECTED */ |
2943 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x27; | 2930 | buffer[SPC_ASC_KEY_OFFSET] = 0x27; |
2944 | break; | 2931 | break; |
2945 | case TCM_ADDRESS_OUT_OF_RANGE: | 2932 | case TCM_ADDRESS_OUT_OF_RANGE: |
2946 | /* CURRENT ERROR */ | 2933 | /* CURRENT ERROR */ |
2947 | buffer[offset] = 0x70; | 2934 | buffer[0] = 0x70; |
2948 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2935 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2949 | /* ILLEGAL REQUEST */ | 2936 | /* ILLEGAL REQUEST */ |
2950 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | 2937 | buffer[SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; |
2951 | /* LOGICAL BLOCK ADDRESS OUT OF RANGE */ | 2938 | /* LOGICAL BLOCK ADDRESS OUT OF RANGE */ |
2952 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x21; | 2939 | buffer[SPC_ASC_KEY_OFFSET] = 0x21; |
2953 | break; | 2940 | break; |
2954 | case TCM_CHECK_CONDITION_UNIT_ATTENTION: | 2941 | case TCM_CHECK_CONDITION_UNIT_ATTENTION: |
2955 | /* CURRENT ERROR */ | 2942 | /* CURRENT ERROR */ |
2956 | buffer[offset] = 0x70; | 2943 | buffer[0] = 0x70; |
2957 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2944 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2958 | /* UNIT ATTENTION */ | 2945 | /* UNIT ATTENTION */ |
2959 | buffer[offset+SPC_SENSE_KEY_OFFSET] = UNIT_ATTENTION; | 2946 | buffer[SPC_SENSE_KEY_OFFSET] = UNIT_ATTENTION; |
2960 | core_scsi3_ua_for_check_condition(cmd, &asc, &ascq); | 2947 | core_scsi3_ua_for_check_condition(cmd, &asc, &ascq); |
2961 | buffer[offset+SPC_ASC_KEY_OFFSET] = asc; | 2948 | buffer[SPC_ASC_KEY_OFFSET] = asc; |
2962 | buffer[offset+SPC_ASCQ_KEY_OFFSET] = ascq; | 2949 | buffer[SPC_ASCQ_KEY_OFFSET] = ascq; |
2963 | break; | 2950 | break; |
2964 | case TCM_CHECK_CONDITION_NOT_READY: | 2951 | case TCM_CHECK_CONDITION_NOT_READY: |
2965 | /* CURRENT ERROR */ | 2952 | /* CURRENT ERROR */ |
2966 | buffer[offset] = 0x70; | 2953 | buffer[0] = 0x70; |
2967 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2954 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2968 | /* Not Ready */ | 2955 | /* Not Ready */ |
2969 | buffer[offset+SPC_SENSE_KEY_OFFSET] = NOT_READY; | 2956 | buffer[SPC_SENSE_KEY_OFFSET] = NOT_READY; |
2970 | transport_get_sense_codes(cmd, &asc, &ascq); | 2957 | transport_get_sense_codes(cmd, &asc, &ascq); |
2971 | buffer[offset+SPC_ASC_KEY_OFFSET] = asc; | 2958 | buffer[SPC_ASC_KEY_OFFSET] = asc; |
2972 | buffer[offset+SPC_ASCQ_KEY_OFFSET] = ascq; | 2959 | buffer[SPC_ASCQ_KEY_OFFSET] = ascq; |
2973 | break; | 2960 | break; |
2974 | case TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE: | 2961 | case TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE: |
2975 | default: | 2962 | default: |
2976 | /* CURRENT ERROR */ | 2963 | /* CURRENT ERROR */ |
2977 | buffer[offset] = 0x70; | 2964 | buffer[0] = 0x70; |
2978 | buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | 2965 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; |
2979 | /* ILLEGAL REQUEST */ | 2966 | /* ILLEGAL REQUEST */ |
2980 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | 2967 | buffer[SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; |
2981 | /* LOGICAL UNIT COMMUNICATION FAILURE */ | 2968 | /* LOGICAL UNIT COMMUNICATION FAILURE */ |
2982 | buffer[offset+SPC_ASC_KEY_OFFSET] = 0x80; | 2969 | buffer[SPC_ASC_KEY_OFFSET] = 0x80; |
2983 | break; | 2970 | break; |
2984 | } | 2971 | } |
2985 | /* | 2972 | /* |
@@ -2990,7 +2977,7 @@ int transport_send_check_condition_and_sense( | |||
2990 | * Automatically padded, this value is encoded in the fabric's | 2977 | * Automatically padded, this value is encoded in the fabric's |
2991 | * data_length response PDU containing the SCSI defined sense data. | 2978 | * data_length response PDU containing the SCSI defined sense data. |
2992 | */ | 2979 | */ |
2993 | cmd->scsi_sense_length = TRANSPORT_SENSE_BUFFER + offset; | 2980 | cmd->scsi_sense_length = TRANSPORT_SENSE_BUFFER; |
2994 | 2981 | ||
2995 | after_reason: | 2982 | after_reason: |
2996 | return cmd->se_tfo->queue_status(cmd); | 2983 | return cmd->se_tfo->queue_status(cmd); |
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c index 4f97701350a8..b74feb0d5133 100644 --- a/drivers/target/tcm_fc/tfc_conf.c +++ b/drivers/target/tcm_fc/tfc_conf.c | |||
@@ -495,11 +495,6 @@ static void ft_set_default_node_attr(struct se_node_acl *se_nacl) | |||
495 | { | 495 | { |
496 | } | 496 | } |
497 | 497 | ||
498 | static u16 ft_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_len) | ||
499 | { | ||
500 | return 0; | ||
501 | } | ||
502 | |||
503 | static u32 ft_tpg_get_inst_index(struct se_portal_group *se_tpg) | 498 | static u32 ft_tpg_get_inst_index(struct se_portal_group *se_tpg) |
504 | { | 499 | { |
505 | struct ft_tpg *tpg = se_tpg->se_tpg_fabric_ptr; | 500 | struct ft_tpg *tpg = se_tpg->se_tpg_fabric_ptr; |
@@ -537,7 +532,6 @@ static struct target_core_fabric_ops ft_fabric_ops = { | |||
537 | .queue_data_in = ft_queue_data_in, | 532 | .queue_data_in = ft_queue_data_in, |
538 | .queue_status = ft_queue_status, | 533 | .queue_status = ft_queue_status, |
539 | .queue_tm_rsp = ft_queue_tm_resp, | 534 | .queue_tm_rsp = ft_queue_tm_resp, |
540 | .set_fabric_sense_len = ft_set_fabric_sense_len, | ||
541 | /* | 535 | /* |
542 | * Setup function pointers for generic logic in | 536 | * Setup function pointers for generic logic in |
543 | * target_core_fabric_configfs.c | 537 | * target_core_fabric_configfs.c |
diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c index b7ac43b08851..575c82437e4a 100644 --- a/drivers/usb/gadget/tcm_usb_gadget.c +++ b/drivers/usb/gadget/tcm_usb_gadget.c | |||
@@ -1475,11 +1475,6 @@ static int usbg_queue_tm_rsp(struct se_cmd *se_cmd) | |||
1475 | return 0; | 1475 | return 0; |
1476 | } | 1476 | } |
1477 | 1477 | ||
1478 | static u16 usbg_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length) | ||
1479 | { | ||
1480 | return 0; | ||
1481 | } | ||
1482 | |||
1483 | static const char *usbg_check_wwn(const char *name) | 1478 | static const char *usbg_check_wwn(const char *name) |
1484 | { | 1479 | { |
1485 | const char *n; | 1480 | const char *n; |
@@ -1905,7 +1900,6 @@ static struct target_core_fabric_ops usbg_ops = { | |||
1905 | .queue_data_in = usbg_send_read_response, | 1900 | .queue_data_in = usbg_send_read_response, |
1906 | .queue_status = usbg_send_status_response, | 1901 | .queue_status = usbg_send_status_response, |
1907 | .queue_tm_rsp = usbg_queue_tm_rsp, | 1902 | .queue_tm_rsp = usbg_queue_tm_rsp, |
1908 | .set_fabric_sense_len = usbg_set_fabric_sense_len, | ||
1909 | .check_stop_free = usbg_check_stop_free, | 1903 | .check_stop_free = usbg_check_stop_free, |
1910 | 1904 | ||
1911 | .fabric_make_wwn = usbg_make_tport, | 1905 | .fabric_make_wwn = usbg_make_tport, |
diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index 94e6e04aecf2..89dc99baca80 100644 --- a/drivers/vhost/tcm_vhost.c +++ b/drivers/vhost/tcm_vhost.c | |||
@@ -330,12 +330,6 @@ static int tcm_vhost_queue_tm_rsp(struct se_cmd *se_cmd) | |||
330 | return 0; | 330 | return 0; |
331 | } | 331 | } |
332 | 332 | ||
333 | static u16 tcm_vhost_set_fabric_sense_len(struct se_cmd *se_cmd, | ||
334 | u32 sense_length) | ||
335 | { | ||
336 | return 0; | ||
337 | } | ||
338 | |||
339 | static void vhost_scsi_free_cmd(struct tcm_vhost_cmd *tv_cmd) | 333 | static void vhost_scsi_free_cmd(struct tcm_vhost_cmd *tv_cmd) |
340 | { | 334 | { |
341 | struct se_cmd *se_cmd = &tv_cmd->tvc_se_cmd; | 335 | struct se_cmd *se_cmd = &tv_cmd->tvc_se_cmd; |
@@ -1526,7 +1520,6 @@ static struct target_core_fabric_ops tcm_vhost_ops = { | |||
1526 | .queue_data_in = tcm_vhost_queue_data_in, | 1520 | .queue_data_in = tcm_vhost_queue_data_in, |
1527 | .queue_status = tcm_vhost_queue_status, | 1521 | .queue_status = tcm_vhost_queue_status, |
1528 | .queue_tm_rsp = tcm_vhost_queue_tm_rsp, | 1522 | .queue_tm_rsp = tcm_vhost_queue_tm_rsp, |
1529 | .set_fabric_sense_len = tcm_vhost_set_fabric_sense_len, | ||
1530 | /* | 1523 | /* |
1531 | * Setup callers for generic logic in target_core_fabric_configfs.c | 1524 | * Setup callers for generic logic in target_core_fabric_configfs.c |
1532 | */ | 1525 | */ |
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index a218d02f8295..85a5d7a99543 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h | |||
@@ -62,7 +62,6 @@ struct target_core_fabric_ops { | |||
62 | int (*queue_data_in)(struct se_cmd *); | 62 | int (*queue_data_in)(struct se_cmd *); |
63 | int (*queue_status)(struct se_cmd *); | 63 | int (*queue_status)(struct se_cmd *); |
64 | int (*queue_tm_rsp)(struct se_cmd *); | 64 | int (*queue_tm_rsp)(struct se_cmd *); |
65 | u16 (*set_fabric_sense_len)(struct se_cmd *, u32); | ||
66 | /* | 65 | /* |
67 | * fabric module calls for target_core_fabric_configfs.c | 66 | * fabric module calls for target_core_fabric_configfs.c |
68 | */ | 67 | */ |