diff options
Diffstat (limited to 'include/scsi/scsi_cmnd.h')
-rw-r--r-- | include/scsi/scsi_cmnd.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 8d20e60a94b7..3e46dfae8194 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -7,10 +7,28 @@ | |||
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/timer.h> | 8 | #include <linux/timer.h> |
9 | #include <linux/scatterlist.h> | 9 | #include <linux/scatterlist.h> |
10 | #include <linux/blkdev.h> | ||
10 | 11 | ||
11 | struct Scsi_Host; | 12 | struct Scsi_Host; |
12 | struct scsi_device; | 13 | struct scsi_device; |
13 | 14 | ||
15 | /* | ||
16 | * MAX_COMMAND_SIZE is: | ||
17 | * The longest fixed-length SCSI CDB as per the SCSI standard. | ||
18 | * fixed-length means: commands that their size can be determined | ||
19 | * by their opcode and the CDB does not carry a length specifier, (unlike | ||
20 | * the VARIABLE_LENGTH_CMD(0x7f) command). This is actually not exactly | ||
21 | * true and the SCSI standard also defines extended commands and | ||
22 | * vendor specific commands that can be bigger than 16 bytes. The kernel | ||
23 | * will support these using the same infrastructure used for VARLEN CDB's. | ||
24 | * So in effect MAX_COMMAND_SIZE means the maximum size command scsi-ml | ||
25 | * supports without specifying a cmd_len by ULD's | ||
26 | */ | ||
27 | #define MAX_COMMAND_SIZE 16 | ||
28 | #if (MAX_COMMAND_SIZE > BLK_MAX_CDB) | ||
29 | # error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB | ||
30 | #endif | ||
31 | |||
14 | struct scsi_data_buffer { | 32 | struct scsi_data_buffer { |
15 | struct sg_table table; | 33 | struct sg_table table; |
16 | unsigned length; | 34 | unsigned length; |
@@ -60,12 +78,11 @@ struct scsi_cmnd { | |||
60 | int allowed; | 78 | int allowed; |
61 | int timeout_per_command; | 79 | int timeout_per_command; |
62 | 80 | ||
63 | unsigned char cmd_len; | 81 | unsigned short cmd_len; |
64 | enum dma_data_direction sc_data_direction; | 82 | enum dma_data_direction sc_data_direction; |
65 | 83 | ||
66 | /* These elements define the operation we are about to perform */ | 84 | /* These elements define the operation we are about to perform */ |
67 | #define MAX_COMMAND_SIZE 16 | 85 | unsigned char *cmnd; |
68 | unsigned char cmnd[MAX_COMMAND_SIZE]; | ||
69 | 86 | ||
70 | struct timer_list eh_timeout; /* Used to time out the command. */ | 87 | struct timer_list eh_timeout; /* Used to time out the command. */ |
71 | 88 | ||