diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/scsi_cmnd.h | 6 | ||||
-rw-r--r-- | include/scsi/scsi_dbg.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_eh.h | 3 | ||||
-rw-r--r-- | include/scsi/scsi_request.h | 54 | ||||
-rw-r--r-- | include/scsi/sg_request.h | 26 |
5 files changed, 0 insertions, 91 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 7602b9b15a03..b0caabec1bd1 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -9,7 +9,6 @@ | |||
9 | struct request; | 9 | struct request; |
10 | struct scatterlist; | 10 | struct scatterlist; |
11 | struct scsi_device; | 11 | struct scsi_device; |
12 | struct scsi_request; | ||
13 | 12 | ||
14 | 13 | ||
15 | /* embedded in scsi_cmnd */ | 14 | /* embedded in scsi_cmnd */ |
@@ -29,13 +28,8 @@ struct scsi_pointer { | |||
29 | }; | 28 | }; |
30 | 29 | ||
31 | struct scsi_cmnd { | 30 | struct scsi_cmnd { |
32 | int sc_magic; | ||
33 | |||
34 | struct scsi_device *device; | 31 | struct scsi_device *device; |
35 | struct scsi_request *sc_request; | ||
36 | |||
37 | struct list_head list; /* scsi_cmnd participates in queue lists */ | 32 | struct list_head list; /* scsi_cmnd participates in queue lists */ |
38 | |||
39 | struct list_head eh_entry; /* entry for the host eh_cmd_q */ | 33 | struct list_head eh_entry; /* entry for the host eh_cmd_q */ |
40 | int eh_eflags; /* Used by error handlr */ | 34 | int eh_eflags; /* Used by error handlr */ |
41 | void (*done) (struct scsi_cmnd *); /* Mid-level done function */ | 35 | void (*done) (struct scsi_cmnd *); /* Mid-level done function */ |
diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h index 4d69dee66d4d..3bbbfbe8cbfc 100644 --- a/include/scsi/scsi_dbg.h +++ b/include/scsi/scsi_dbg.h | |||
@@ -2,14 +2,12 @@ | |||
2 | #define _SCSI_SCSI_DBG_H | 2 | #define _SCSI_SCSI_DBG_H |
3 | 3 | ||
4 | struct scsi_cmnd; | 4 | struct scsi_cmnd; |
5 | struct scsi_request; | ||
6 | struct scsi_sense_hdr; | 5 | struct scsi_sense_hdr; |
7 | 6 | ||
8 | extern void scsi_print_command(struct scsi_cmnd *); | 7 | extern void scsi_print_command(struct scsi_cmnd *); |
9 | extern void scsi_print_sense_hdr(const char *, struct scsi_sense_hdr *); | 8 | extern void scsi_print_sense_hdr(const char *, struct scsi_sense_hdr *); |
10 | extern void __scsi_print_command(unsigned char *); | 9 | extern void __scsi_print_command(unsigned char *); |
11 | extern void scsi_print_sense(const char *, struct scsi_cmnd *); | 10 | extern void scsi_print_sense(const char *, struct scsi_cmnd *); |
12 | extern void scsi_print_req_sense(const char *, struct scsi_request *); | ||
13 | extern void __scsi_print_sense(const char *name, | 11 | extern void __scsi_print_sense(const char *name, |
14 | const unsigned char *sense_buffer, | 12 | const unsigned char *sense_buffer, |
15 | int sense_len); | 13 | int sense_len); |
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index d160880b2a87..c5c0f6762a01 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | struct scsi_cmnd; | 4 | struct scsi_cmnd; |
5 | struct scsi_device; | 5 | struct scsi_device; |
6 | struct scsi_request; | ||
7 | struct Scsi_Host; | 6 | struct Scsi_Host; |
8 | 7 | ||
9 | /* | 8 | /* |
@@ -43,8 +42,6 @@ extern void scsi_report_device_reset(struct Scsi_Host *, int, int); | |||
43 | extern int scsi_block_when_processing_errors(struct scsi_device *); | 42 | extern int scsi_block_when_processing_errors(struct scsi_device *); |
44 | extern int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, | 43 | extern int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, |
45 | struct scsi_sense_hdr *sshdr); | 44 | struct scsi_sense_hdr *sshdr); |
46 | extern int scsi_request_normalize_sense(struct scsi_request *sreq, | ||
47 | struct scsi_sense_hdr *sshdr); | ||
48 | extern int scsi_command_normalize_sense(struct scsi_cmnd *cmd, | 45 | extern int scsi_command_normalize_sense(struct scsi_cmnd *cmd, |
49 | struct scsi_sense_hdr *sshdr); | 46 | struct scsi_sense_hdr *sshdr); |
50 | 47 | ||
diff --git a/include/scsi/scsi_request.h b/include/scsi/scsi_request.h deleted file mode 100644 index 98d69fdb851c..000000000000 --- a/include/scsi/scsi_request.h +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | #ifndef _SCSI_SCSI_REQUEST_H | ||
2 | #define _SCSI_SCSI_REQUEST_H | ||
3 | |||
4 | #include <scsi/scsi_cmnd.h> | ||
5 | |||
6 | struct request; | ||
7 | struct scsi_cmnd; | ||
8 | struct scsi_device; | ||
9 | struct Scsi_Host; | ||
10 | |||
11 | |||
12 | /* | ||
13 | * This is essentially a slimmed down version of Scsi_Cmnd. The point of | ||
14 | * having this is that requests that are injected into the queue as result | ||
15 | * of things like ioctls and character devices shouldn't be using a | ||
16 | * Scsi_Cmnd until such a time that the command is actually at the head | ||
17 | * of the queue and being sent to the driver. | ||
18 | */ | ||
19 | struct scsi_request { | ||
20 | int sr_magic; | ||
21 | int sr_result; /* Status code from lower level driver */ | ||
22 | unsigned char sr_sense_buffer[SCSI_SENSE_BUFFERSIZE]; /* obtained by REQUEST SENSE | ||
23 | * when CHECK CONDITION is | ||
24 | * received on original command | ||
25 | * (auto-sense) */ | ||
26 | |||
27 | struct Scsi_Host *sr_host; | ||
28 | struct scsi_device *sr_device; | ||
29 | struct scsi_cmnd *sr_command; | ||
30 | struct request *sr_request; /* A copy of the command we are | ||
31 | working on */ | ||
32 | unsigned sr_bufflen; /* Size of data buffer */ | ||
33 | void *sr_buffer; /* Data buffer */ | ||
34 | int sr_allowed; | ||
35 | enum dma_data_direction sr_data_direction; | ||
36 | unsigned char sr_cmd_len; | ||
37 | unsigned char sr_cmnd[MAX_COMMAND_SIZE]; | ||
38 | void (*sr_done) (struct scsi_cmnd *); /* Mid-level done function */ | ||
39 | int sr_timeout_per_command; | ||
40 | unsigned short sr_use_sg; /* Number of pieces of scatter-gather */ | ||
41 | unsigned short sr_sglist_len; /* size of malloc'd scatter-gather list */ | ||
42 | unsigned sr_underflow; /* Return error if less than | ||
43 | this amount is transferred */ | ||
44 | void *upper_private_data; /* reserved for owner (usually upper | ||
45 | level driver) of this request */ | ||
46 | }; | ||
47 | |||
48 | extern struct scsi_request *scsi_allocate_request(struct scsi_device *, gfp_t); | ||
49 | extern void scsi_release_request(struct scsi_request *); | ||
50 | extern void scsi_do_req(struct scsi_request *, const void *cmnd, | ||
51 | void *buffer, unsigned bufflen, | ||
52 | void (*done) (struct scsi_cmnd *), | ||
53 | int timeout, int retries); | ||
54 | #endif /* _SCSI_SCSI_REQUEST_H */ | ||
diff --git a/include/scsi/sg_request.h b/include/scsi/sg_request.h deleted file mode 100644 index 57ff525bdd3b..000000000000 --- a/include/scsi/sg_request.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | typedef struct scsi_request Scsi_Request; | ||
2 | |||
3 | static Scsi_Request *dummy_cmdp; /* only used for sizeof */ | ||
4 | |||
5 | typedef struct sg_scatter_hold { /* holding area for scsi scatter gather info */ | ||
6 | unsigned short k_use_sg; /* Count of kernel scatter-gather pieces */ | ||
7 | unsigned short sglist_len; /* size of malloc'd scatter-gather list ++ */ | ||
8 | unsigned bufflen; /* Size of (aggregate) data buffer */ | ||
9 | unsigned b_malloc_len; /* actual len malloc'ed in buffer */ | ||
10 | void *buffer; /* Data buffer or scatter list (k_use_sg>0) */ | ||
11 | char dio_in_use; /* 0->indirect IO (or mmap), 1->dio */ | ||
12 | unsigned char cmd_opcode; /* first byte of command */ | ||
13 | } Sg_scatter_hold; | ||
14 | |||
15 | typedef struct sg_request { /* SG_MAX_QUEUE requests outstanding per file */ | ||
16 | Scsi_Request *my_cmdp; /* != 0 when request with lower levels */ | ||
17 | struct sg_request *nextrp; /* NULL -> tail request (slist) */ | ||
18 | struct sg_fd *parentfp; /* NULL -> not in use */ | ||
19 | Sg_scatter_hold data; /* hold buffer, perhaps scatter list */ | ||
20 | sg_io_hdr_t header; /* scsi command+info, see <scsi/sg.h> */ | ||
21 | unsigned char sense_b[sizeof (dummy_cmdp->sr_sense_buffer)]; | ||
22 | char res_used; /* 1 -> using reserve buffer, 0 -> not ... */ | ||
23 | char orphan; /* 1 -> drop on sight, 0 -> normal */ | ||
24 | char sg_io_owned; /* 1 -> packet belongs to SG_IO */ | ||
25 | volatile char done; /* 0->before bh, 1->before read, 2->read */ | ||
26 | } Sg_request; | ||