mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
- 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:
@@ -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 */
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user