diff --git a/scst/include/scsi_tgt.h b/scst/include/scsi_tgt.h index cf36fb6a3..af3252221 100644 --- a/scst/include/scsi_tgt.h +++ b/scst/include/scsi_tgt.h @@ -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 */ diff --git a/scst/src/dev_handlers/scst_fileio.c b/scst/src/dev_handlers/scst_fileio.c index 205c84ded..8e5b8ad48 100644 --- a/scst/src/dev_handlers/scst_fileio.c +++ b/scst/src/dev_handlers/scst_fileio.c @@ -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) { diff --git a/scst/src/scst_cdbprobe.h b/scst/src/scst_cdbprobe.h index b4554d402..b8e95c0b6 100644 --- a/scst/src/scst_cdbprobe.h +++ b/scst/src/scst_cdbprobe.h @@ -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", diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 6c44e837b..40383759d 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -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; diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index 419bff376..0f3079f50 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -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++) { diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index b4d9ecc71..07075d7b8 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -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;