summaryrefslogtreecommitdiff
path: root/include/target
diff options
context:
space:
mode:
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_base.h15
-rw-r--r--include/target/target_core_fabric.h14
2 files changed, 22 insertions, 7 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index b62d5fcce950..002b0fc57587 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -8,6 +8,7 @@
#include <linux/percpu-refcount.h>
#include <linux/semaphore.h> /* struct semaphore */
#include <linux/completion.h>
+#include <scsi/scsi_common.h>
#define TARGET_CORE_VERSION "v5.0"
@@ -46,10 +47,6 @@
/* Used by transport_get_inquiry_vpd_device_ident() */
#define INQUIRY_VPD_DEVICE_IDENTIFIER_LEN 254
-#define INQUIRY_VENDOR_LEN 8
-#define INQUIRY_MODEL_LEN 16
-#define INQUIRY_REVISION_LEN 4
-
/* Attempts before moving from SHORT to LONG */
#define PYX_TRANSPORT_WINDOW_CLOSED_THRESHOLD 3
#define PYX_TRANSPORT_WINDOW_CLOSED_WAIT_SHORT 3 /* In milliseconds */
@@ -111,6 +108,15 @@
/* Peripheral Device Text Identification Information */
#define PD_TEXT_ID_INFO_LEN 256
+enum target_compl_type {
+ /* Use the fabric driver's default completion type */
+ TARGET_FABRIC_DEFAULT_COMPL,
+ /* Complete from the backend calling context */
+ TARGET_DIRECT_COMPL,
+ /* Defer completion to the LIO workqueue */
+ TARGET_QUEUE_COMPL,
+};
+
enum target_submit_type {
/* Use the fabric driver's default submission type */
TARGET_FABRIC_DEFAULT_SUBMIT,
@@ -741,6 +747,7 @@ struct se_dev_attrib {
u32 atomic_granularity;
u32 atomic_max_with_boundary;
u32 atomic_max_boundary;
+ u8 complete_type;
u8 submit_type;
struct se_device *da_dev;
struct config_group da_group;
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
index 3378ff9ee271..390ace5bb252 100644
--- a/include/target/target_core_fabric.h
+++ b/include/target/target_core_fabric.h
@@ -95,6 +95,8 @@ struct target_core_fabric_ops {
struct se_lun *);
void (*fabric_pre_unlink)(struct se_portal_group *,
struct se_lun *);
+ void (*fabric_post_unlink)(struct se_portal_group *se_tpg,
+ struct se_lun *lun);
struct se_tpg_np *(*fabric_make_np)(struct se_portal_group *,
struct config_group *, const char *);
void (*fabric_drop_np)(struct se_tpg_np *);
@@ -119,14 +121,20 @@ struct target_core_fabric_ops {
*/
unsigned int write_pending_must_be_called:1;
/*
+ * Set this if the driver does not require calling queue_data_in
+ * queue_status and check_stop_free from a worker thread when
+ * completing successful commands.
+ */
+ unsigned int direct_compl_supp:1;
+ /*
* Set this if the driver supports submitting commands to the backend
* from target_submit/target_submit_cmd.
*/
unsigned int direct_submit_supp:1;
- /*
- * Set this to a target_submit_type value.
- */
+ /* Set this to a target_submit_type value. */
u8 default_submit_type;
+ /* Set this to the target_compl_type value. */
+ u8 default_compl_type;
};
int target_register_template(const struct target_core_fabric_ops *fo);