From ba929992522b6d1f866b7021bc50da66f8fdd743 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 8 May 2015 10:11:12 +0200 Subject: target: Minimize SCSI header #include directives Only include SCSI initiator header files in target code that needs these header files, namely the SCSI pass-through code and the tcm_loop driver. Change SCSI_SENSE_BUFFERSIZE into TRANSPORT_SENSE_BUFFER in target code because the former is intended for initiator code and the latter for target code. With this patch the only initiator include directives in target code that remain are as follows: $ git grep -nHE 'include .scsi/(scsi.h|scsi_host.h|scsi_device.h|scsi_cmnd.h)' drivers/target drivers/infiniband/ulp/{isert,srpt} drivers/usb/gadget/legacy/tcm_*.[ch] drivers/{vhost,xen} include/{target,trace/events/target.h} drivers/target/loopback/tcm_loop.c:29:#include drivers/target/loopback/tcm_loop.c:31:#include drivers/target/loopback/tcm_loop.c:32:#include drivers/target/loopback/tcm_loop.c:33:#include drivers/target/target_core_pscsi.c:39:#include drivers/target/target_core_pscsi.c:40:#include drivers/xen/xen-scsiback.c:52:#include /* SG_ALL */ Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: James Bottomley --- include/target/iscsi/iscsi_target_core.h | 1 - include/target/target_core_base.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'include/target') diff --git a/include/target/iscsi/iscsi_target_core.h b/include/target/iscsi/iscsi_target_core.h index 54e7af301888..006983b296dd 100644 --- a/include/target/iscsi/iscsi_target_core.h +++ b/include/target/iscsi/iscsi_target_core.h @@ -5,7 +5,6 @@ #include #include #include -#include #include #include diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 020377429043..aec6f6a4477c 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #include @@ -25,7 +24,7 @@ * From include/scsi/scsi_cmnd.h:SCSI_SENSE_BUFFERSIZE, currently * defined 96, but the real limit is 252 (or 260 including the header) */ -#define TRANSPORT_SENSE_BUFFER SCSI_SENSE_BUFFERSIZE +#define TRANSPORT_SENSE_BUFFER 96 /* Used by transport_send_check_condition_and_sense() */ #define SPC_SENSE_KEY_OFFSET 2 #define SPC_ADD_SENSE_LEN_OFFSET 7 -- cgit v1.2.3