- Minor cleanup
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 15 Dec 2006 11:45:24 +0000 (11:45 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 15 Dec 2006 11:45:24 +0000 (11:45 +0000)
 - Corrected definition PERSISTENT_RESERV_IN and PERSISTENT_RESERV_OUT

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@61 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scst/include/scsi_tgt.h
scst/src/dev_handlers/scst_fileio.c
scst/src/scst_cdbprobe.h
scst/src/scst_lib.c
scst/src/scst_mem.c
scst/src/scst_targ.c

index cf36fb6..af32522 100644 (file)
@@ -701,7 +701,8 @@ struct scst_tgt_template
 
        /*
         * Those functions can be used to export the driver's statistics and
-        * other infos to the world outside the kernel.
+        * other infos to the world outside the kernel as well as to get some
+        * management commands from it.
         *
         * OPTIONAL
         */
@@ -844,7 +845,8 @@ struct scst_dev_type
 
        /*
         * Those functions can be used to export the handler's statistics and
-        * other infos to the world outside the kernel.
+        * other infos to the world outside the kernel as well as to get some
+        * management commands from it.
         *
         * OPTIONAL
         */
@@ -1076,13 +1078,6 @@ struct scst_cmd
         */
        unsigned int mem_checked:1;
 
-       /*
-        * Set if target driver may need to call dma_sync_sg() or similar
-        * function before transferring cmd' data to the target device
-        * via DMA.
-        */
-       unsigned int may_need_dma_sync:1;
-
        /*
         * Set if scst_cmd_init_stage1_done() called and the target
         * want that preprocessing_done() will be called
@@ -1098,6 +1093,13 @@ struct scst_cmd
        /* Set if the cmd's must not use sgv cache for data buffer */
        unsigned int no_sgv:1;
 
+       /*
+        * Set if target driver may need to call dma_sync_sg() or similar
+        * function before transferring cmd' data to the target device
+        * via DMA.
+        */
+       unsigned int may_need_dma_sync:1;
+
        /**************************************************************/
 
        unsigned long cmd_flags;        /* cmd's async flags */
index 205c84d..8e5b8ad 100644 (file)
@@ -2642,7 +2642,6 @@ out_free_vdev:
        goto out_up;
 }
 
-
 /* scst_fileio_mutex supposed to be held */
 static int cdrom_fileio_open(char *p, char *name)
 {
index b4554d4..b8e95c0 100644 (file)
@@ -351,10 +351,10 @@ static const struct scst_sdbops scst_scsi_op_table[] = {
         SCST_DATA_READ, FLAG_NONE, 7, get_trans_len_2},
        {0x5D, "     O          ", "SEND CUE SHEET",
         SCST_DATA_WRITE, FLAG_NONE, 6, get_trans_len_3},
-       {0x5E, "                ", "PERSISTENT_RESERV_IN",
-        SCST_DATA_NONE, FLAG_NONE, 0, get_trans_len_none},
-       {0x5F, "                ", "PERSISTENT_RESERV_OUT",
-        SCST_DATA_NONE, FLAG_NONE, 0, get_trans_len_none},
+       {0x5E, "OOOOO OOOO      ", "PERSISTENT_RESERV_IN",
+        SCST_DATA_READ, FLAG_NONE, 5, get_trans_len_4},
+       {0x5F, "OOOOO OOOO      ", "PERSISTENT_RESERV_OUT",
+         SCST_DATA_WRITE, FLAG_NONE, 5, get_trans_len_4},
 
        /* 16-bytes length CDB */
        {0x80, "O   OO O        ", "XDWRITE EXTENDED",
index 6c44e83..4038375 100644 (file)
@@ -209,7 +209,7 @@ struct scst_acg_dev *scst_alloc_acg_dev(struct scst_acg *acg,
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)
        memset(res, 0, sizeof(*res));
 #endif
-       
+
        res->dev = dev;
        res->acg = acg;
        res->lun = lun;
index 419bff3..0f3079f 100644 (file)
@@ -410,7 +410,7 @@ int sgv_pool_init(struct sgv_pool *pool, const char *name, int clustered)
        memset(pool, 0, sizeof(*pool));
        pool->clustered = clustered;
 
-       TRACE_MEM("sizeof(*obj)=%d, clustered=%d, sizeof(obj->trans_tbl[0])=%d",
+       TRACE_MEM("sizeof(*obj)=%zd, clustered=%d, sizeof(obj->trans_tbl[0])=%zd",
                sizeof(*obj), clustered, sizeof(obj->trans_tbl[0]));
 
        for(i = 0; i < SGV_POOL_ELEMENTS; i++) {
index b4d9ecc..07075d7 100644 (file)
@@ -395,7 +395,7 @@ static int scst_parse_cmd(struct scst_cmd *cmd)
        if (scst_cmd_is_expected_set(cmd)) {
                if (cmd->expected_transfer_len < cmd->bufflen) {
                        TRACE(TRACE_SCSI, "cmd->expected_transfer_len(%d) < "
-                               "cmd->bufflen(%d), using expected_transfer_len "
+                               "cmd->bufflen(%zd), using expected_transfer_len "
                                "instead", cmd->expected_transfer_len,
                                cmd->bufflen);
                        cmd->bufflen = cmd->expected_transfer_len;