staging: Remove logger and alarm-dev from android Makefile
[deliverable/linux.git] / drivers / target / target_core_pscsi.c
index 7c8291f0bbbce5f519bce28b1c6db8d4269a62bd..1045dcd7bf651b679ee355a19401065d559976b1 100644 (file)
@@ -44,6 +44,7 @@
 
 #include <target/target_core_base.h>
 #include <target/target_core_backend.h>
+#include <target/target_core_backend_configfs.h>
 
 #include "target_core_alua.h"
 #include "target_core_pscsi.h"
@@ -1094,7 +1095,7 @@ pscsi_execute_cmd(struct se_cmd *cmd)
        req->retries = PS_RETRY;
 
        blk_execute_rq_nowait(pdv->pdv_sd->request_queue, NULL, req,
-                       (cmd->sam_task_attr == MSG_HEAD_TAG),
+                       (cmd->sam_task_attr == TCM_HEAD_TAG),
                        pscsi_req_done);
 
        return 0;
@@ -1165,6 +1166,26 @@ static void pscsi_req_done(struct request *req, int uptodate)
        kfree(pt);
 }
 
+DEF_TB_DEV_ATTRIB_RO(pscsi, hw_pi_prot_type);
+TB_DEV_ATTR_RO(pscsi, hw_pi_prot_type);
+
+DEF_TB_DEV_ATTRIB_RO(pscsi, hw_block_size);
+TB_DEV_ATTR_RO(pscsi, hw_block_size);
+
+DEF_TB_DEV_ATTRIB_RO(pscsi, hw_max_sectors);
+TB_DEV_ATTR_RO(pscsi, hw_max_sectors);
+
+DEF_TB_DEV_ATTRIB_RO(pscsi, hw_queue_depth);
+TB_DEV_ATTR_RO(pscsi, hw_queue_depth);
+
+static struct configfs_attribute *pscsi_backend_dev_attrs[] = {
+       &pscsi_dev_attrib_hw_pi_prot_type.attr,
+       &pscsi_dev_attrib_hw_block_size.attr,
+       &pscsi_dev_attrib_hw_max_sectors.attr,
+       &pscsi_dev_attrib_hw_queue_depth.attr,
+       NULL,
+};
+
 static struct se_subsystem_api pscsi_template = {
        .name                   = "pscsi",
        .owner                  = THIS_MODULE,
@@ -1185,6 +1206,11 @@ static struct se_subsystem_api pscsi_template = {
 
 static int __init pscsi_module_init(void)
 {
+       struct target_backend_cits *tbc = &pscsi_template.tb_cits;
+
+       target_core_setup_sub_cits(&pscsi_template);
+       tbc->tb_dev_attrib_cit.ct_attrs = pscsi_backend_dev_attrs;
+
        return transport_subsystem_register(&pscsi_template);
 }
 
This page took 0.035018 seconds and 5 git commands to generate.