From 723d233193487e0a7a7a2dea1e170395b506ed28 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Tue, 15 Apr 2014 21:30:26 +0000 Subject: [PATCH] Add SYNCHRONIZE_CACHE(16) git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5415 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst_const.h | 4 ++++ scst/src/dev_handlers/scst_vdisk.c | 1 + usr/fileio/common.c | 1 + 3 files changed, 6 insertions(+) diff --git a/scst/include/scst_const.h b/scst/include/scst_const.h index 06bf7e923..036078e41 100644 --- a/scst/include/scst_const.h +++ b/scst/include/scst_const.h @@ -413,6 +413,10 @@ static inline int scst_sense_response_code(const uint8_t *sense) #define WRITE_SAME_16 0x93 #endif +#ifndef SYNCHRONIZE_CACHE_16 +#define SYNCHRONIZE_CACHE_16 0x91 +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) /* * From . See also commit diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 2ef06e5ff..a7fb1b298 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -1399,6 +1399,7 @@ static enum compl_status_e vdisk_invalid_opcode(struct vdisk_cmd_params *p) #define SHARED_OPS \ [SYNCHRONIZE_CACHE] = vdisk_synchronize_cache, \ + [SYNCHRONIZE_CACHE_16] = vdisk_synchronize_cache, \ [MODE_SENSE] = vdisk_exec_mode_sense, \ [MODE_SENSE_10] = vdisk_exec_mode_sense, \ [MODE_SELECT] = vdisk_exec_mode_select, \ diff --git a/usr/fileio/common.c b/usr/fileio/common.c index 96a674144..c756e7736 100644 --- a/usr/fileio/common.c +++ b/usr/fileio/common.c @@ -335,6 +335,7 @@ static int do_exec(struct vdisk_cmd *vcmd) } break; case SYNCHRONIZE_CACHE: + case SYNCHRONIZE_CACHE_16: { int immed = cdb[1] & 0x2; if (data_len == 0)