diff options
author | David Disseldorp <ddiss@suse.de> | 2017-01-02 18:04:06 +0100 |
---|---|---|
committer | Bart Van Assche <bart.vanassche@sandisk.com> | 2017-01-10 08:41:13 -0800 |
commit | f184210bca6c9d0091ff5e5629dea4cbb8a17c0f (patch) | |
tree | 52f839810a5504d80b7ef6310c95b9dcedb7ecb4 /drivers/target/target_core_xcopy.h | |
parent | 94aae4caacda89a1bdb7198b260f4ca3595b7ed7 (diff) |
target: check XCOPY segment descriptor CSCD IDs
Ensure that the segment descriptor CSCD descriptor ID values correspond
to CSCD descriptor entries located in the XCOPY command parameter list.
SPC4r37 6.4.6.1 Table 150 specifies this range as 0000h to 07FFh, where
the CSCD descriptor location in the parameter list can be located via:
16 + (id * 32)
Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
[ bvanassche: inserted "; " in the format string of an error message
and also moved a "||" operator from the start of a line to the end
of the previous line ]
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Diffstat (limited to 'drivers/target/target_core_xcopy.h')
-rw-r--r-- | drivers/target/target_core_xcopy.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/target/target_core_xcopy.h b/drivers/target/target_core_xcopy.h index 4d3d4dd060f2..e2d141140342 100644 --- a/drivers/target/target_core_xcopy.h +++ b/drivers/target/target_core_xcopy.h @@ -5,6 +5,12 @@ #define XCOPY_NAA_IEEE_REGEX_LEN 16 #define XCOPY_MAX_SECTORS 1024 +/* + * SPC4r37 6.4.6.1 + * Table 150 — CSCD descriptor ID values + */ +#define XCOPY_CSCD_DESC_ID_LIST_OFF_MAX 0x07FF + enum xcopy_origin_list { XCOL_SOURCE_RECV_OP = 0x01, XCOL_DEST_RECV_OP = 0x02, |