aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 11:19:33 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 11:19:33 -0400
commitdf3d80f5a5c74168be42788364d13cf6c83c7b9c (patch)
tree892a964c2fd28d028f2fb7471e8543d3f4006a58 /include/scsi
parent3d06f7a5f74a813cee817c4b30b5e6f0398da0be (diff)
parentc8e91b0a8fc8493e3bf3efcb3c8f866e9453cf1c (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (207 commits) [SCSI] gdth: fix CONFIG_ISA build failure [SCSI] esp_scsi: remove __dev{init,exit} [SCSI] gdth: !use_sg cleanup and use of scsi accessors [SCSI] gdth: Move members from SCp to gdth_cmndinfo, stage 2 [SCSI] gdth: Setup proper per-command private data [SCSI] gdth: Remove gdth_ctr_tab[] [SCSI] gdth: switch to modern scsi host registration [SCSI] gdth: gdth_interrupt() gdth_get_status() & gdth_wait() fixes [SCSI] gdth: clean up host private data [SCSI] gdth: Remove virt hosts [SCSI] gdth: Reorder scsi_host_template intitializers [SCSI] gdth: kill gdth_{read,write}[bwl] wrappers [SCSI] gdth: Remove 2.4.x support, in-kernel changelog [SCSI] gdth: split out pci probing [SCSI] gdth: split out eisa probing [SCSI] gdth: split out isa probing gdth: Make one abuse of scsi_cmnd less obvious [SCSI] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation [SCSI] usb storage: use scsi_eh API in REQUEST_SENSE execution [SCSI] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE ...
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libsrp.h2
-rw-r--r--include/scsi/scsi_cmnd.h13
-rw-r--r--include/scsi/scsi_dbg.h2
-rw-r--r--include/scsi/scsi_driver.h10
-rw-r--r--include/scsi/scsi_eh.h23
-rw-r--r--include/scsi/scsi_host.h14
-rw-r--r--include/scsi/scsi_tgt.h8
-rw-r--r--include/scsi/scsi_tgt_if.h35
-rw-r--r--include/scsi/scsi_transport.h12
-rw-r--r--include/scsi/scsi_transport_fc.h6
-rw-r--r--include/scsi/scsi_transport_iscsi.h2
-rw-r--r--include/scsi/scsi_transport_srp.h39
-rw-r--r--include/scsi/sd.h14
13 files changed, 139 insertions, 41 deletions
diff --git a/include/scsi/libsrp.h b/include/scsi/libsrp.h
index d143171896ae..ba615e4c1d7c 100644
--- a/include/scsi/libsrp.h
+++ b/include/scsi/libsrp.h
@@ -59,7 +59,7 @@ extern void srp_target_free(struct srp_target *);
59extern struct iu_entry *srp_iu_get(struct srp_target *); 59extern struct iu_entry *srp_iu_get(struct srp_target *);
60extern void srp_iu_put(struct iu_entry *); 60extern void srp_iu_put(struct iu_entry *);
61 61
62extern int srp_cmd_queue(struct Scsi_Host *, struct srp_cmd *, void *, u64); 62extern int srp_cmd_queue(struct Scsi_Host *, struct srp_cmd *, void *, u64, u64);
63extern int srp_transfer_data(struct scsi_cmnd *, struct srp_cmd *, 63extern int srp_transfer_data(struct scsi_cmnd *, struct srp_cmd *,
64 srp_rdma_t, int, int); 64 srp_rdma_t, int, int);
65 65
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 53e170586c26..65ab5145a09b 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -33,20 +33,17 @@ struct scsi_cmnd {
33 struct list_head list; /* scsi_cmnd participates in queue lists */ 33 struct list_head list; /* scsi_cmnd participates in queue lists */
34 struct list_head eh_entry; /* entry for the host eh_cmd_q */ 34 struct list_head eh_entry; /* entry for the host eh_cmd_q */
35 int eh_eflags; /* Used by error handlr */ 35 int eh_eflags; /* Used by error handlr */
36 void (*done) (struct scsi_cmnd *); /* Mid-level done function */
37 36
38 /* 37 /*
39 * A SCSI Command is assigned a nonzero serial_number before passed 38 * A SCSI Command is assigned a nonzero serial_number before passed
40 * to the driver's queue command function. The serial_number is 39 * to the driver's queue command function. The serial_number is
41 * cleared when scsi_done is entered indicating that the command 40 * cleared when scsi_done is entered indicating that the command
42 * has been completed. It currently doesn't have much use other 41 * has been completed. It is a bug for LLDDs to use this number
43 * than printk's. Some lldd's use this number for other purposes. 42 * for purposes other than printk (and even that is only useful
44 * It's almost certain that such usages are either incorrect or 43 * for debugging).
45 * meaningless. Please kill all usages other than printk's. Also,
46 * as this number is always identical to ->pid, please convert
47 * printk's to use ->pid, so that we can kill this field.
48 */ 44 */
49 unsigned long serial_number; 45 unsigned long serial_number;
46
50 /* 47 /*
51 * This is set to jiffies as it was when the command was first 48 * This is set to jiffies as it was when the command was first
52 * allocated. It is used to time how long the command has 49 * allocated. It is used to time how long the command has
@@ -116,7 +113,6 @@ struct scsi_cmnd {
116 int result; /* Status code from lower level driver */ 113 int result; /* Status code from lower level driver */
117 114
118 unsigned char tag; /* SCSI-II queued command tag */ 115 unsigned char tag; /* SCSI-II queued command tag */
119 unsigned long pid; /* Process ID, starts at 0. Unique per host. */
120}; 116};
121 117
122extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); 118extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t);
@@ -124,7 +120,6 @@ extern struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *, gfp_t);
124extern void scsi_put_command(struct scsi_cmnd *); 120extern void scsi_put_command(struct scsi_cmnd *);
125extern void __scsi_put_command(struct Scsi_Host *, struct scsi_cmnd *, 121extern void __scsi_put_command(struct Scsi_Host *, struct scsi_cmnd *,
126 struct device *); 122 struct device *);
127extern void scsi_io_completion(struct scsi_cmnd *, unsigned int);
128extern void scsi_finish_command(struct scsi_cmnd *cmd); 123extern void scsi_finish_command(struct scsi_cmnd *cmd);
129extern void scsi_req_abort_cmd(struct scsi_cmnd *cmd); 124extern void scsi_req_abort_cmd(struct scsi_cmnd *cmd);
130 125
diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h
index 5a43a4cd96c6..e89844cc2cd3 100644
--- a/include/scsi/scsi_dbg.h
+++ b/include/scsi/scsi_dbg.h
@@ -9,6 +9,8 @@ extern void __scsi_print_command(unsigned char *);
9extern void scsi_show_extd_sense(unsigned char, unsigned char); 9extern void scsi_show_extd_sense(unsigned char, unsigned char);
10extern void scsi_show_sense_hdr(struct scsi_sense_hdr *); 10extern void scsi_show_sense_hdr(struct scsi_sense_hdr *);
11extern void scsi_print_sense_hdr(const char *, struct scsi_sense_hdr *); 11extern void scsi_print_sense_hdr(const char *, struct scsi_sense_hdr *);
12extern void scsi_cmd_print_sense_hdr(struct scsi_cmnd *, const char *,
13 struct scsi_sense_hdr *);
12extern void scsi_print_sense(char *, struct scsi_cmnd *); 14extern void scsi_print_sense(char *, struct scsi_cmnd *);
13extern void __scsi_print_sense(const char *name, 15extern void __scsi_print_sense(const char *name,
14 const unsigned char *sense_buffer, 16 const unsigned char *sense_buffer,
diff --git a/include/scsi/scsi_driver.h b/include/scsi/scsi_driver.h
index 3465f31a21c4..1f5ca7f62116 100644
--- a/include/scsi/scsi_driver.h
+++ b/include/scsi/scsi_driver.h
@@ -5,14 +5,17 @@
5 5
6struct module; 6struct module;
7struct scsi_cmnd; 7struct scsi_cmnd;
8struct scsi_device;
9struct request;
10struct request_queue;
8 11
9 12
10struct scsi_driver { 13struct scsi_driver {
11 struct module *owner; 14 struct module *owner;
12 struct device_driver gendrv; 15 struct device_driver gendrv;
13 16
14 int (*init_command)(struct scsi_cmnd *);
15 void (*rescan)(struct device *); 17 void (*rescan)(struct device *);
18 int (*done)(struct scsi_cmnd *);
16}; 19};
17#define to_scsi_driver(drv) \ 20#define to_scsi_driver(drv) \
18 container_of((drv), struct scsi_driver, gendrv) 21 container_of((drv), struct scsi_driver, gendrv)
@@ -25,4 +28,9 @@ extern int scsi_register_interface(struct class_interface *);
25#define scsi_unregister_interface(intf) \ 28#define scsi_unregister_interface(intf) \
26 class_interface_unregister(intf) 29 class_interface_unregister(intf)
27 30
31int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req);
32int scsi_setup_fs_cmnd(struct scsi_device *sdev, struct request *req);
33int scsi_prep_state_check(struct scsi_device *sdev, struct request *req);
34int scsi_prep_return(struct request_queue *q, struct request *req, int ret);
35
28#endif /* _SCSI_SCSI_DRIVER_H */ 36#endif /* _SCSI_SCSI_DRIVER_H */
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h
index c5c0f6762a01..44224ba4dd90 100644
--- a/include/scsi/scsi_eh.h
+++ b/include/scsi/scsi_eh.h
@@ -1,7 +1,7 @@
1#ifndef _SCSI_SCSI_EH_H 1#ifndef _SCSI_SCSI_EH_H
2#define _SCSI_SCSI_EH_H 2#define _SCSI_SCSI_EH_H
3 3
4struct scsi_cmnd; 4#include <scsi/scsi_cmnd.h>
5struct scsi_device; 5struct scsi_device;
6struct Scsi_Host; 6struct Scsi_Host;
7 7
@@ -65,4 +65,25 @@ extern int scsi_get_sense_info_fld(const u8 * sense_buffer, int sb_len,
65 65
66extern int scsi_reset_provider(struct scsi_device *, int); 66extern int scsi_reset_provider(struct scsi_device *, int);
67 67
68struct scsi_eh_save {
69 int result;
70 enum dma_data_direction data_direction;
71 unsigned char cmd_len;
72 unsigned char cmnd[MAX_COMMAND_SIZE];
73
74 void *buffer;
75 unsigned bufflen;
76 unsigned short use_sg;
77 int resid;
78
79 struct scatterlist sense_sgl;
80};
81
82extern void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd,
83 struct scsi_eh_save *ses, unsigned char *cmnd,
84 int cmnd_size, unsigned sense_bytes);
85
86extern void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd,
87 struct scsi_eh_save *ses);
88
68#endif /* _SCSI_SCSI_EH_H */ 89#endif /* _SCSI_SCSI_EH_H */
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 3b8a6a85c2f8..7d210cd6c38d 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -32,6 +32,9 @@ struct blk_queue_tags;
32#define SG_NONE 0 32#define SG_NONE 0
33#define SG_ALL 0xff 33#define SG_ALL 0xff
34 34
35#define MODE_UNKNOWN 0x00
36#define MODE_INITIATOR 0x01
37#define MODE_TARGET 0x02
35 38
36#define DISABLE_CLUSTERING 0 39#define DISABLE_CLUSTERING 0
37#define ENABLE_CLUSTERING 1 40#define ENABLE_CLUSTERING 1
@@ -145,9 +148,6 @@ struct scsi_host_template {
145 int (* transfer_response)(struct scsi_cmnd *, 148 int (* transfer_response)(struct scsi_cmnd *,
146 void (*done)(struct scsi_cmnd *)); 149 void (*done)(struct scsi_cmnd *));
147 150
148 /* Used as callback for the completion of task management request. */
149 int (* tsk_mgmt_response)(u64 mid, int result);
150
151 /* 151 /*
152 * This is an error handling strategy routine. You don't need to 152 * This is an error handling strategy routine. You don't need to
153 * define one of these if you don't want to - there is a default 153 * define one of these if you don't want to - there is a default
@@ -408,6 +408,11 @@ struct scsi_host_template {
408 unsigned char present; 408 unsigned char present;
409 409
410 /* 410 /*
411 * This specifies the mode that a LLD supports.
412 */
413 unsigned supported_mode:2;
414
415 /*
411 * true if this host adapter uses unchecked DMA onto an ISA bus. 416 * true if this host adapter uses unchecked DMA onto an ISA bus.
412 */ 417 */
413 unsigned unchecked_isa_dma:1; 418 unsigned unchecked_isa_dma:1;
@@ -575,8 +580,9 @@ struct Scsi_Host {
575 * Used to assign serial numbers to the cmds. 580 * Used to assign serial numbers to the cmds.
576 * Protected by the host lock. 581 * Protected by the host lock.
577 */ 582 */
578 unsigned long cmd_serial_number, cmd_pid; 583 unsigned long cmd_serial_number;
579 584
585 unsigned active_mode:2;
580 unsigned unchecked_isa_dma:1; 586 unsigned unchecked_isa_dma:1;
581 unsigned use_clustering:1; 587 unsigned use_clustering:1;
582 unsigned use_blk_tcq:1; 588 unsigned use_blk_tcq:1;
diff --git a/include/scsi/scsi_tgt.h b/include/scsi/scsi_tgt.h
index 4f4427937af2..d0fefb96158f 100644
--- a/include/scsi/scsi_tgt.h
+++ b/include/scsi/scsi_tgt.h
@@ -11,9 +11,11 @@ struct scsi_lun;
11extern struct Scsi_Host *scsi_tgt_cmd_to_host(struct scsi_cmnd *); 11extern struct Scsi_Host *scsi_tgt_cmd_to_host(struct scsi_cmnd *);
12extern int scsi_tgt_alloc_queue(struct Scsi_Host *); 12extern int scsi_tgt_alloc_queue(struct Scsi_Host *);
13extern void scsi_tgt_free_queue(struct Scsi_Host *); 13extern void scsi_tgt_free_queue(struct Scsi_Host *);
14extern int scsi_tgt_queue_command(struct scsi_cmnd *, struct scsi_lun *, u64); 14extern int scsi_tgt_queue_command(struct scsi_cmnd *, u64, struct scsi_lun *, u64);
15extern int scsi_tgt_tsk_mgmt_request(struct Scsi_Host *, int, u64, struct scsi_lun *, 15extern int scsi_tgt_tsk_mgmt_request(struct Scsi_Host *, u64, int, u64,
16 void *); 16 struct scsi_lun *, void *);
17extern struct scsi_cmnd *scsi_host_get_command(struct Scsi_Host *, 17extern struct scsi_cmnd *scsi_host_get_command(struct Scsi_Host *,
18 enum dma_data_direction, gfp_t); 18 enum dma_data_direction, gfp_t);
19extern void scsi_host_put_command(struct Scsi_Host *, struct scsi_cmnd *); 19extern void scsi_host_put_command(struct Scsi_Host *, struct scsi_cmnd *);
20extern int scsi_tgt_it_nexus_create(struct Scsi_Host *, u64, char *);
21extern int scsi_tgt_it_nexus_destroy(struct Scsi_Host *, u64);
diff --git a/include/scsi/scsi_tgt_if.h b/include/scsi/scsi_tgt_if.h
index 4cf9dff29a2f..f2ee7c238a45 100644
--- a/include/scsi/scsi_tgt_if.h
+++ b/include/scsi/scsi_tgt_if.h
@@ -23,13 +23,15 @@
23#define __SCSI_TARGET_IF_H 23#define __SCSI_TARGET_IF_H
24 24
25/* user -> kernel */ 25/* user -> kernel */
26#define TGT_UEVENT_CMD_RSP 0x0001 26#define TGT_UEVENT_CMD_RSP 0x0001
27#define TGT_UEVENT_TSK_MGMT_RSP 0x0002 27#define TGT_UEVENT_IT_NEXUS_RSP 0x0002
28#define TGT_UEVENT_TSK_MGMT_RSP 0x0003
28 29
29/* kernel -> user */ 30/* kernel -> user */
30#define TGT_KEVENT_CMD_REQ 0x1001 31#define TGT_KEVENT_CMD_REQ 0x1001
31#define TGT_KEVENT_CMD_DONE 0x1002 32#define TGT_KEVENT_CMD_DONE 0x1002
32#define TGT_KEVENT_TSK_MGMT_REQ 0x1003 33#define TGT_KEVENT_IT_NEXUS_REQ 0x1003
34#define TGT_KEVENT_TSK_MGMT_REQ 0x1004
33 35
34struct tgt_event_hdr { 36struct tgt_event_hdr {
35 uint16_t version; 37 uint16_t version;
@@ -46,6 +48,7 @@ struct tgt_event {
46 struct { 48 struct {
47 int host_no; 49 int host_no;
48 int result; 50 int result;
51 aligned_u64 itn_id;
49 aligned_u64 tag; 52 aligned_u64 tag;
50 aligned_u64 uaddr; 53 aligned_u64 uaddr;
51 aligned_u64 sense_uaddr; 54 aligned_u64 sense_uaddr;
@@ -55,15 +58,22 @@ struct tgt_event {
55 } cmd_rsp; 58 } cmd_rsp;
56 struct { 59 struct {
57 int host_no; 60 int host_no;
58 aligned_u64 mid;
59 int result; 61 int result;
62 aligned_u64 itn_id;
63 aligned_u64 mid;
60 } tsk_mgmt_rsp; 64 } tsk_mgmt_rsp;
61 65 struct {
66 __s32 host_no;
67 __s32 result;
68 aligned_u64 itn_id;
69 __u32 function;
70 } it_nexus_rsp;
62 71
63 /* kernel -> user */ 72 /* kernel -> user */
64 struct { 73 struct {
65 int host_no; 74 int host_no;
66 uint32_t data_len; 75 uint32_t data_len;
76 aligned_u64 itn_id;
67 uint8_t scb[16]; 77 uint8_t scb[16];
68 uint8_t lun[8]; 78 uint8_t lun[8];
69 int attribute; 79 int attribute;
@@ -71,16 +81,25 @@ struct tgt_event {
71 } cmd_req; 81 } cmd_req;
72 struct { 82 struct {
73 int host_no; 83 int host_no;
74 aligned_u64 tag;
75 int result; 84 int result;
85 aligned_u64 itn_id;
86 aligned_u64 tag;
76 } cmd_done; 87 } cmd_done;
77 struct { 88 struct {
78 int host_no; 89 int host_no;
79 int function; 90 int function;
91 aligned_u64 itn_id;
80 aligned_u64 tag; 92 aligned_u64 tag;
81 uint8_t lun[8]; 93 uint8_t lun[8];
82 aligned_u64 mid; 94 aligned_u64 mid;
83 } tsk_mgmt_req; 95 } tsk_mgmt_req;
96 struct {
97 __s32 host_no;
98 __u32 function;
99 aligned_u64 itn_id;
100 __u32 max_cmds;
101 __u8 initiator_id[16];
102 } it_nexus_req;
84 } p; 103 } p;
85} __attribute__ ((aligned (sizeof(uint64_t)))); 104} __attribute__ ((aligned (sizeof(uint64_t))));
86 105
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h
index 3c18baa65a72..0dfef752f0e2 100644
--- a/include/scsi/scsi_transport.h
+++ b/include/scsi/scsi_transport.h
@@ -65,6 +65,18 @@ struct scsi_transport_template {
65 * EH_NOT_HANDLED Begin normal error recovery 65 * EH_NOT_HANDLED Begin normal error recovery
66 */ 66 */
67 enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); 67 enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *);
68
69 /*
70 * Used as callback for the completion of i_t_nexus request
71 * for target drivers.
72 */
73 int (* it_nexus_response)(struct Scsi_Host *, u64, int);
74
75 /*
76 * Used as callback for the completion of task management
77 * request for target drivers.
78 */
79 int (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64, int);
68}; 80};
69 81
70#define transport_class_to_shost(tc) \ 82#define transport_class_to_shost(tc) \
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index a0d80bcaa93d..e466d886e192 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
@@ -589,6 +589,10 @@ struct fc_function_template {
589 int (*vport_disable)(struct fc_vport *, bool); 589 int (*vport_disable)(struct fc_vport *, bool);
590 int (*vport_delete)(struct fc_vport *); 590 int (*vport_delete)(struct fc_vport *);
591 591
592 /* target-mode drivers' functions */
593 int (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64, int);
594 int (* it_nexus_response)(struct Scsi_Host *, u64, int);
595
592 /* allocation lengths for host-specific data */ 596 /* allocation lengths for host-specific data */
593 u32 dd_fcrport_size; 597 u32 dd_fcrport_size;
594 u32 dd_fcvport_size; 598 u32 dd_fcvport_size;
@@ -632,6 +636,8 @@ struct fc_function_template {
632 unsigned long show_host_fabric_name:1; 636 unsigned long show_host_fabric_name:1;
633 unsigned long show_host_symbolic_name:1; 637 unsigned long show_host_symbolic_name:1;
634 unsigned long show_host_system_hostname:1; 638 unsigned long show_host_system_hostname:1;
639
640 unsigned long disable_target_scan:1;
635}; 641};
636 642
637 643
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 706c0cd36c14..7ff6199cbd55 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -24,6 +24,8 @@
24#define SCSI_TRANSPORT_ISCSI_H 24#define SCSI_TRANSPORT_ISCSI_H
25 25
26#include <linux/device.h> 26#include <linux/device.h>
27#include <linux/list.h>
28#include <linux/mutex.h>
27#include <scsi/iscsi_if.h> 29#include <scsi/iscsi_if.h>
28 30
29struct scsi_transport_template; 31struct scsi_transport_template;
diff --git a/include/scsi/scsi_transport_srp.h b/include/scsi/scsi_transport_srp.h
new file mode 100644
index 000000000000..9c60ca1c08c5
--- /dev/null
+++ b/include/scsi/scsi_transport_srp.h
@@ -0,0 +1,39 @@
1#ifndef SCSI_TRANSPORT_SRP_H
2#define SCSI_TRANSPORT_SRP_H
3
4#include <linux/transport_class.h>
5#include <linux/types.h>
6#include <linux/mutex.h>
7
8#define SRP_RPORT_ROLE_INITIATOR 0
9#define SRP_RPORT_ROLE_TARGET 1
10
11struct srp_rport_identifiers {
12 u8 port_id[16];
13 u8 roles;
14};
15
16struct srp_rport {
17 struct device dev;
18
19 u8 port_id[16];
20 u8 roles;
21};
22
23struct srp_function_template {
24 /* for target drivers */
25 int (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64, int);
26 int (* it_nexus_response)(struct Scsi_Host *, u64, int);
27};
28
29extern struct scsi_transport_template *
30srp_attach_transport(struct srp_function_template *);
31extern void srp_release_transport(struct scsi_transport_template *);
32
33extern struct srp_rport *srp_rport_add(struct Scsi_Host *,
34 struct srp_rport_identifiers *);
35extern void srp_rport_del(struct srp_rport *);
36
37extern void srp_remove_host(struct Scsi_Host *);
38
39#endif
diff --git a/include/scsi/sd.h b/include/scsi/sd.h
index ce02ad1f5185..f7513313ef0d 100644
--- a/include/scsi/sd.h
+++ b/include/scsi/sd.h
@@ -47,20 +47,6 @@ struct scsi_disk {
47}; 47};
48#define to_scsi_disk(obj) container_of(obj,struct scsi_disk,cdev) 48#define to_scsi_disk(obj) container_of(obj,struct scsi_disk,cdev)
49 49
50static int sd_revalidate_disk(struct gendisk *disk);
51static void sd_rw_intr(struct scsi_cmnd * SCpnt);
52static int sd_probe(struct device *);
53static int sd_remove(struct device *);
54static void sd_shutdown(struct device *dev);
55static int sd_suspend(struct device *dev, pm_message_t state);
56static int sd_resume(struct device *dev);
57static void sd_rescan(struct device *);
58static int sd_init_command(struct scsi_cmnd *);
59static void sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer);
60static void scsi_disk_release(struct class_device *cdev);
61static void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *);
62static void sd_print_result(struct scsi_disk *, int);
63
64#define sd_printk(prefix, sdsk, fmt, a...) \ 50#define sd_printk(prefix, sdsk, fmt, a...) \
65 (sdsk)->disk ? \ 51 (sdsk)->disk ? \
66 sdev_printk(prefix, (sdsk)->device, "[%s] " fmt, \ 52 sdev_printk(prefix, (sdsk)->device, "[%s] " fmt, \