diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 21:58:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 21:58:04 -0400 |
commit | 89a93f2f4834f8c126e8d9dd6b368d0b9e21ec3d (patch) | |
tree | e731456fec0cab1225ad3e806dc8d3efefa0a78b /include/scsi/scsi_device.h | |
parent | 260eddf4391f162a69d1d163729249635fa7a78f (diff) | |
parent | fe9233fb6914a0eb20166c967e3020f7f0fba2c9 (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: (102 commits)
[SCSI] scsi_dh: fix kconfig related build errors
[SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of
[SCSI] scsi_cmnd.h: remove double inclusion of linux/blkdev.h
[SCSI] make struct scsi_{host,target}_type static
[SCSI] fix locking in host use of blk_plug_device()
[SCSI] zfcp: Cleanup external header file
[SCSI] zfcp: Cleanup code in zfcp_erp.c
[SCSI] zfcp: zfcp_fsf cleanup.
[SCSI] zfcp: consolidate sysfs things into one file.
[SCSI] zfcp: Cleanup of code in zfcp_aux.c
[SCSI] zfcp: Cleanup of code in zfcp_scsi.c
[SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
[SCSI] zfcp: Small QDIO cleanups
[SCSI] zfcp: Adapter reopen for large number of unsolicited status
[SCSI] zfcp: Fix error checking for ELS ADISC requests
[SCSI] zfcp: wait until adapter is finished with ERP during auto-port
[SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver
[SCSI] sg: Add target reset support
[SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC
[SCSI] sd: Move scsi_disk() accessor function to sd.h
...
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r-- | include/scsi/scsi_device.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 00b78763a1bf..6467f78b191f 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -162,9 +162,29 @@ struct scsi_device { | |||
162 | 162 | ||
163 | struct execute_work ew; /* used to get process context on put */ | 163 | struct execute_work ew; /* used to get process context on put */ |
164 | 164 | ||
165 | struct scsi_dh_data *scsi_dh_data; | ||
165 | enum scsi_device_state sdev_state; | 166 | enum scsi_device_state sdev_state; |
166 | unsigned long sdev_data[0]; | 167 | unsigned long sdev_data[0]; |
167 | } __attribute__((aligned(sizeof(unsigned long)))); | 168 | } __attribute__((aligned(sizeof(unsigned long)))); |
169 | |||
170 | struct scsi_device_handler { | ||
171 | /* Used by the infrastructure */ | ||
172 | struct list_head list; /* list of scsi_device_handlers */ | ||
173 | struct notifier_block nb; | ||
174 | |||
175 | /* Filled by the hardware handler */ | ||
176 | struct module *module; | ||
177 | const char *name; | ||
178 | int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *); | ||
179 | int (*activate)(struct scsi_device *); | ||
180 | int (*prep_fn)(struct scsi_device *, struct request *); | ||
181 | }; | ||
182 | |||
183 | struct scsi_dh_data { | ||
184 | struct scsi_device_handler *scsi_dh; | ||
185 | char buf[0]; | ||
186 | }; | ||
187 | |||
168 | #define to_scsi_device(d) \ | 188 | #define to_scsi_device(d) \ |
169 | container_of(d, struct scsi_device, sdev_gendev) | 189 | container_of(d, struct scsi_device, sdev_gendev) |
170 | #define class_to_sdev(d) \ | 190 | #define class_to_sdev(d) \ |
@@ -231,7 +251,9 @@ extern struct scsi_device *__scsi_add_device(struct Scsi_Host *, | |||
231 | uint, uint, uint, void *hostdata); | 251 | uint, uint, uint, void *hostdata); |
232 | extern int scsi_add_device(struct Scsi_Host *host, uint channel, | 252 | extern int scsi_add_device(struct Scsi_Host *host, uint channel, |
233 | uint target, uint lun); | 253 | uint target, uint lun); |
254 | extern int scsi_register_device_handler(struct scsi_device_handler *scsi_dh); | ||
234 | extern void scsi_remove_device(struct scsi_device *); | 255 | extern void scsi_remove_device(struct scsi_device *); |
256 | extern int scsi_unregister_device_handler(struct scsi_device_handler *scsi_dh); | ||
235 | 257 | ||
236 | extern int scsi_device_get(struct scsi_device *); | 258 | extern int scsi_device_get(struct scsi_device *); |
237 | extern void scsi_device_put(struct scsi_device *); | 259 | extern void scsi_device_put(struct scsi_device *); |