summaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi.h
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2015-05-08 10:07:48 +0200
committerJames Bottomley <JBottomley@Odin.com>2015-06-01 07:32:43 -0700
commit07e3842055c391e611dd907c81760f4c705f9acb (patch)
tree56005ced37b31c082fa984981a8073a241ff3839 /include/scsi/scsi.h
parentc5f1ac8b94bd10f97f5aa1a3279ad8e8bbc6311a (diff)
downloadlinux-07e3842055c391e611dd907c81760f4c705f9acb.tar.bz2
Move code that is used both by initiator and target drivers
Move the functions that are used by both the initiator and target subsystems into scsi_common.c/.h. This change will allow to remove the initiator SCSI header include directives from most SCSI target source files in a later patch. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'include/scsi/scsi.h')
-rw-r--r--include/scsi/scsi.h19
1 files changed, 1 insertions, 18 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index f238e6e8b45f..e0a3398b1547 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -8,6 +8,7 @@
#include <linux/types.h>
#include <linux/scatterlist.h>
#include <linux/kernel.h>
+#include <scsi/scsi_common.h>
#include <scsi/scsi_proto.h>
struct scsi_cmnd;
@@ -47,22 +48,6 @@ enum scsi_timeouts {
*/
#define SCAN_WILD_CARD ~0
-static inline unsigned
-scsi_varlen_cdb_length(const void *hdr)
-{
- return ((struct scsi_varlen_cdb_hdr *)hdr)->additional_cdb_length + 8;
-}
-
-extern const unsigned char scsi_command_size_tbl[8];
-#define COMMAND_SIZE(opcode) scsi_command_size_tbl[((opcode) >> 5) & 7]
-
-static inline unsigned
-scsi_command_size(const unsigned char *cmnd)
-{
- return (cmnd[0] == VARIABLE_LENGTH_CMD) ?
- scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]);
-}
-
#ifdef CONFIG_ACPI
struct acpi_bus_type;
@@ -96,8 +81,6 @@ static inline int scsi_status_is_good(int status)
(status == SAM_STAT_COMMAND_TERMINATED));
}
-/* Returns a human-readable name for the device */
-extern const char * scsi_device_type(unsigned type);
/*
* standard mode-select header prepended to all mode-select commands