- Minor cleanup

- Corrected definition PERSISTENT_RESERV_IN and PERSISTENT_RESERV_OUT


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@61 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2006-12-15 11:45:24 +00:00
parent 0e04ac351a
commit 32c3fd4e19
6 changed files with 18 additions and 17 deletions

View 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 */

View 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)
{

View 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",

View 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;

View 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++) {

View 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;