]> git.baikalelectronics.ru Git - kernel.git/commit
target: check XCOPY segment descriptor CSCD IDs
authorDavid Disseldorp <ddiss@suse.de>
Mon, 2 Jan 2017 17:04:06 +0000 (18:04 +0100)
committerBart Van Assche <bart.vanassche@sandisk.com>
Tue, 10 Jan 2017 16:41:13 +0000 (08:41 -0800)
commit9346b3343b5d550cae88c26f3d92a54164054bd5
tree52f839810a5504d80b7ef6310c95b9dcedb7ecb4
parent129a5584bf74fd67f9608be08042067170b92247
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>
drivers/target/target_core_xcopy.c
drivers/target/target_core_xcopy.h