diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 14:25:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 14:25:31 -0400 |
commit | 2cca775baecbfede2fec20c99add709232311fe7 (patch) | |
tree | b0eefe80881d263ba7976174144ae4e9cf238425 /include | |
parent | eddeb0e2d863e3941d8768e70cb50c6120e61fa0 (diff) | |
parent | 94795b61e84994a3b058f92d041d1fb3d869c7d5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (137 commits)
[SCSI] iscsi: bidi support for iscsi_tcp
[SCSI] iscsi: bidi support at the generic libiscsi level
[SCSI] iscsi: extended cdb support
[SCSI] zfcp: Fix error handling for blocked unit for send FCP command
[SCSI] zfcp: Remove zfcp_erp_wait from slave destory handler to fix deadlock
[SCSI] zfcp: fix 31 bit compile warnings
[SCSI] bsg: no need to set BSG_F_BLOCK bit in bsg_complete_all_commands
[SCSI] bsg: remove minor in struct bsg_device
[SCSI] bsg: use better helper list functions
[SCSI] bsg: replace kobject_get with blk_get_queue
[SCSI] bsg: takes a ref to struct device in fops->open
[SCSI] qla1280: remove version check
[SCSI] libsas: fix endianness bug in sas_ata
[SCSI] zfcp: fix compiler warning caused by poking inside new semaphore (linux-next)
[SCSI] aacraid: Do not describe check_reset parameter with its value
[SCSI] aacraid: Fix down_interruptible() to check the return value
[SCSI] sun3_scsi_vme: add MODULE_LICENSE
[SCSI] st: rename flush_write_buffer()
[SCSI] tgt: use KMEM_CACHE macro
[SCSI] initio: fix big endian problems for auto request sense
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/attribute_container.h | 2 | ||||
-rw-r--r-- | include/linux/mtio.h | 1 | ||||
-rw-r--r-- | include/linux/scatterlist.h | 5 | ||||
-rw-r--r-- | include/linux/transport_class.h | 5 | ||||
-rw-r--r-- | include/scsi/iscsi_proto.h | 6 | ||||
-rw-r--r-- | include/scsi/libsas.h | 2 | ||||
-rw-r--r-- | include/scsi/sas_ata.h | 4 | ||||
-rw-r--r-- | include/scsi/scsi_cmnd.h | 17 | ||||
-rw-r--r-- | include/scsi/scsi_eh.h | 5 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 1 |
10 files changed, 40 insertions, 8 deletions
diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h index f5582332af04..574b201b99d8 100644 --- a/include/linux/attribute_container.h +++ b/include/linux/attribute_container.h | |||
@@ -37,7 +37,7 @@ attribute_container_set_no_classdevs(struct attribute_container *atc) | |||
37 | } | 37 | } |
38 | 38 | ||
39 | int attribute_container_register(struct attribute_container *cont); | 39 | int attribute_container_register(struct attribute_container *cont); |
40 | int attribute_container_unregister(struct attribute_container *cont); | 40 | int __must_check attribute_container_unregister(struct attribute_container *cont); |
41 | void attribute_container_create_device(struct device *dev, | 41 | void attribute_container_create_device(struct device *dev, |
42 | int (*fn)(struct attribute_container *, | 42 | int (*fn)(struct attribute_container *, |
43 | struct device *, | 43 | struct device *, |
diff --git a/include/linux/mtio.h b/include/linux/mtio.h index 6f8d2d45a8fb..ef01d6aa5934 100644 --- a/include/linux/mtio.h +++ b/include/linux/mtio.h | |||
@@ -192,6 +192,7 @@ struct mtpos { | |||
192 | #define MT_ST_SCSI2LOGICAL 0x800 | 192 | #define MT_ST_SCSI2LOGICAL 0x800 |
193 | #define MT_ST_SYSV 0x1000 | 193 | #define MT_ST_SYSV 0x1000 |
194 | #define MT_ST_NOWAIT 0x2000 | 194 | #define MT_ST_NOWAIT 0x2000 |
195 | #define MT_ST_SILI 0x4000 | ||
195 | 196 | ||
196 | /* The mode parameters to be controlled. Parameter chosen with bits 20-28 */ | 197 | /* The mode parameters to be controlled. Parameter chosen with bits 20-28 */ |
197 | #define MT_ST_CLEAR_DEFAULT 0xfffff | 198 | #define MT_ST_CLEAR_DEFAULT 0xfffff |
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index a3d567a974e8..71fc81360048 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -213,6 +213,11 @@ int __sg_alloc_table(struct sg_table *, unsigned int, unsigned int, gfp_t, | |||
213 | sg_alloc_fn *); | 213 | sg_alloc_fn *); |
214 | int sg_alloc_table(struct sg_table *, unsigned int, gfp_t); | 214 | int sg_alloc_table(struct sg_table *, unsigned int, gfp_t); |
215 | 215 | ||
216 | size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents, | ||
217 | void *buf, size_t buflen); | ||
218 | size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, | ||
219 | void *buf, size_t buflen); | ||
220 | |||
216 | /* | 221 | /* |
217 | * Maximum number of entries that will be allocated in one piece, if | 222 | * Maximum number of entries that will be allocated in one piece, if |
218 | * a list larger than this is required then chaining will be utilized. | 223 | * a list larger than this is required then chaining will be utilized. |
diff --git a/include/linux/transport_class.h b/include/linux/transport_class.h index 1d6cc22e5f42..6696cf79c4f7 100644 --- a/include/linux/transport_class.h +++ b/include/linux/transport_class.h | |||
@@ -86,9 +86,10 @@ static inline int transport_container_register(struct transport_container *tc) | |||
86 | return attribute_container_register(&tc->ac); | 86 | return attribute_container_register(&tc->ac); |
87 | } | 87 | } |
88 | 88 | ||
89 | static inline int transport_container_unregister(struct transport_container *tc) | 89 | static inline void transport_container_unregister(struct transport_container *tc) |
90 | { | 90 | { |
91 | return attribute_container_unregister(&tc->ac); | 91 | if (unlikely(attribute_container_unregister(&tc->ac))) |
92 | BUG(); | ||
92 | } | 93 | } |
93 | 94 | ||
94 | int transport_class_register(struct transport_class *); | 95 | int transport_class_register(struct transport_class *); |
diff --git a/include/scsi/iscsi_proto.h b/include/scsi/iscsi_proto.h index 5ffec8ad6964..e0593bfae622 100644 --- a/include/scsi/iscsi_proto.h +++ b/include/scsi/iscsi_proto.h | |||
@@ -112,6 +112,7 @@ struct iscsi_ahs_hdr { | |||
112 | 112 | ||
113 | #define ISCSI_AHSTYPE_CDB 1 | 113 | #define ISCSI_AHSTYPE_CDB 1 |
114 | #define ISCSI_AHSTYPE_RLENGTH 2 | 114 | #define ISCSI_AHSTYPE_RLENGTH 2 |
115 | #define ISCSI_CDB_SIZE 16 | ||
115 | 116 | ||
116 | /* iSCSI PDU Header */ | 117 | /* iSCSI PDU Header */ |
117 | struct iscsi_cmd { | 118 | struct iscsi_cmd { |
@@ -125,7 +126,7 @@ struct iscsi_cmd { | |||
125 | __be32 data_length; | 126 | __be32 data_length; |
126 | __be32 cmdsn; | 127 | __be32 cmdsn; |
127 | __be32 exp_statsn; | 128 | __be32 exp_statsn; |
128 | uint8_t cdb[16]; /* SCSI Command Block */ | 129 | uint8_t cdb[ISCSI_CDB_SIZE]; /* SCSI Command Block */ |
129 | /* Additional Data (Command Dependent) */ | 130 | /* Additional Data (Command Dependent) */ |
130 | }; | 131 | }; |
131 | 132 | ||
@@ -154,7 +155,8 @@ struct iscsi_ecdb_ahdr { | |||
154 | __be16 ahslength; /* CDB length - 15, including reserved byte */ | 155 | __be16 ahslength; /* CDB length - 15, including reserved byte */ |
155 | uint8_t ahstype; | 156 | uint8_t ahstype; |
156 | uint8_t reserved; | 157 | uint8_t reserved; |
157 | uint8_t ecdb[260 - 16]; /* 4-byte aligned extended CDB spillover */ | 158 | /* 4-byte aligned extended CDB spillover */ |
159 | uint8_t ecdb[260 - ISCSI_CDB_SIZE]; | ||
158 | }; | 160 | }; |
159 | 161 | ||
160 | /* SCSI Response Header */ | 162 | /* SCSI Response Header */ |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 39e1cac24bb7..98724ba65a79 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -677,4 +677,6 @@ extern void sas_ssp_task_response(struct device *dev, struct sas_task *task, | |||
677 | struct ssp_response_iu *iu); | 677 | struct ssp_response_iu *iu); |
678 | struct sas_phy *sas_find_local_phy(struct domain_device *dev); | 678 | struct sas_phy *sas_find_local_phy(struct domain_device *dev); |
679 | 679 | ||
680 | int sas_request_addr(struct Scsi_Host *shost, u8 *addr); | ||
681 | |||
680 | #endif /* _SASLIB_H_ */ | 682 | #endif /* _SASLIB_H_ */ |
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h index dd5edc915417..c583193ae929 100644 --- a/include/scsi/sas_ata.h +++ b/include/scsi/sas_ata.h | |||
@@ -47,12 +47,12 @@ static inline int dev_is_sata(struct domain_device *dev) | |||
47 | { | 47 | { |
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
50 | int sas_ata_init_host_and_port(struct domain_device *found_dev, | 50 | static inline int sas_ata_init_host_and_port(struct domain_device *found_dev, |
51 | struct scsi_target *starget) | 51 | struct scsi_target *starget) |
52 | { | 52 | { |
53 | return 0; | 53 | return 0; |
54 | } | 54 | } |
55 | void sas_ata_task_abort(struct sas_task *task) | 55 | static inline void sas_ata_task_abort(struct sas_task *task) |
56 | { | 56 | { |
57 | } | 57 | } |
58 | #endif | 58 | #endif |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index de28aab820b0..8d20e60a94b7 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -130,6 +130,9 @@ extern void scsi_release_buffers(struct scsi_cmnd *cmd); | |||
130 | extern int scsi_dma_map(struct scsi_cmnd *cmd); | 130 | extern int scsi_dma_map(struct scsi_cmnd *cmd); |
131 | extern void scsi_dma_unmap(struct scsi_cmnd *cmd); | 131 | extern void scsi_dma_unmap(struct scsi_cmnd *cmd); |
132 | 132 | ||
133 | struct scsi_cmnd *scsi_allocate_command(gfp_t gfp_mask); | ||
134 | void scsi_free_command(gfp_t gfp_mask, struct scsi_cmnd *cmd); | ||
135 | |||
133 | static inline unsigned scsi_sg_count(struct scsi_cmnd *cmd) | 136 | static inline unsigned scsi_sg_count(struct scsi_cmnd *cmd) |
134 | { | 137 | { |
135 | return cmd->sdb.table.nents; | 138 | return cmd->sdb.table.nents; |
@@ -175,4 +178,18 @@ static inline struct scsi_data_buffer *scsi_out(struct scsi_cmnd *cmd) | |||
175 | return &cmd->sdb; | 178 | return &cmd->sdb; |
176 | } | 179 | } |
177 | 180 | ||
181 | static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, | ||
182 | void *buf, int buflen) | ||
183 | { | ||
184 | return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), | ||
185 | buf, buflen); | ||
186 | } | ||
187 | |||
188 | static inline int scsi_sg_copy_to_buffer(struct scsi_cmnd *cmd, | ||
189 | void *buf, int buflen) | ||
190 | { | ||
191 | return sg_copy_to_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), | ||
192 | buf, buflen); | ||
193 | } | ||
194 | |||
178 | #endif /* _SCSI_SCSI_CMND_H */ | 195 | #endif /* _SCSI_SCSI_CMND_H */ |
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index 25071d5d9bf8..d3a133b4a072 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h | |||
@@ -57,13 +57,16 @@ extern const u8 * scsi_sense_desc_find(const u8 * sense_buffer, int sb_len, | |||
57 | 57 | ||
58 | extern int scsi_get_sense_info_fld(const u8 * sense_buffer, int sb_len, | 58 | extern int scsi_get_sense_info_fld(const u8 * sense_buffer, int sb_len, |
59 | u64 * info_out); | 59 | u64 * info_out); |
60 | 60 | ||
61 | extern void scsi_build_sense_buffer(int desc, u8 *buf, u8 key, u8 asc, u8 ascq); | ||
62 | |||
61 | /* | 63 | /* |
62 | * Reset request from external source | 64 | * Reset request from external source |
63 | */ | 65 | */ |
64 | #define SCSI_TRY_RESET_DEVICE 1 | 66 | #define SCSI_TRY_RESET_DEVICE 1 |
65 | #define SCSI_TRY_RESET_BUS 2 | 67 | #define SCSI_TRY_RESET_BUS 2 |
66 | #define SCSI_TRY_RESET_HOST 3 | 68 | #define SCSI_TRY_RESET_HOST 3 |
69 | #define SCSI_TRY_RESET_TARGET 4 | ||
67 | 70 | ||
68 | extern int scsi_reset_provider(struct scsi_device *, int); | 71 | extern int scsi_reset_provider(struct scsi_device *, int); |
69 | 72 | ||
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 530ff4c553f8..49132862bfaa 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -172,6 +172,7 @@ struct scsi_host_template { | |||
172 | */ | 172 | */ |
173 | int (* eh_abort_handler)(struct scsi_cmnd *); | 173 | int (* eh_abort_handler)(struct scsi_cmnd *); |
174 | int (* eh_device_reset_handler)(struct scsi_cmnd *); | 174 | int (* eh_device_reset_handler)(struct scsi_cmnd *); |
175 | int (* eh_target_reset_handler)(struct scsi_cmnd *); | ||
175 | int (* eh_bus_reset_handler)(struct scsi_cmnd *); | 176 | int (* eh_bus_reset_handler)(struct scsi_cmnd *); |
176 | int (* eh_host_reset_handler)(struct scsi_cmnd *); | 177 | int (* eh_host_reset_handler)(struct scsi_cmnd *); |
177 | 178 | ||