diff options
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_device.h | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 9c331258bc27..c60b8ff2f5e4 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -433,6 +433,4 @@ struct scsi_lun { | |||
433 | /* Used to obtain the PCI location of a device */ | 433 | /* Used to obtain the PCI location of a device */ |
434 | #define SCSI_IOCTL_GET_PCI 0x5387 | 434 | #define SCSI_IOCTL_GET_PCI 0x5387 |
435 | 435 | ||
436 | int scsi_execute_in_process_context(void (*fn)(void *data), void *data); | ||
437 | |||
438 | #endif /* _SCSI_SCSI_H */ | 436 | #endif /* _SCSI_SCSI_H */ |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 8d77da932d2c..1ec17ee12815 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/workqueue.h> | ||
7 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
8 | 9 | ||
9 | struct request_queue; | 10 | struct request_queue; |
@@ -137,6 +138,8 @@ struct scsi_device { | |||
137 | struct device sdev_gendev; | 138 | struct device sdev_gendev; |
138 | struct class_device sdev_classdev; | 139 | struct class_device sdev_classdev; |
139 | 140 | ||
141 | struct execute_work ew; /* used to get process context on put */ | ||
142 | |||
140 | enum scsi_device_state sdev_state; | 143 | enum scsi_device_state sdev_state; |
141 | unsigned long sdev_data[0]; | 144 | unsigned long sdev_data[0]; |
142 | } __attribute__((aligned(sizeof(unsigned long)))); | 145 | } __attribute__((aligned(sizeof(unsigned long)))); |
@@ -153,6 +156,11 @@ struct scsi_device { | |||
153 | #define scmd_printk(prefix, scmd, fmt, a...) \ | 156 | #define scmd_printk(prefix, scmd, fmt, a...) \ |
154 | dev_printk(prefix, &(scmd)->device->sdev_gendev, fmt, ##a) | 157 | dev_printk(prefix, &(scmd)->device->sdev_gendev, fmt, ##a) |
155 | 158 | ||
159 | enum scsi_target_state { | ||
160 | STARGET_RUNNING = 1, | ||
161 | STARGET_DEL, | ||
162 | }; | ||
163 | |||
156 | /* | 164 | /* |
157 | * scsi_target: representation of a scsi target, for now, this is only | 165 | * scsi_target: representation of a scsi target, for now, this is only |
158 | * used for single_lun devices. If no one has active IO to the target, | 166 | * used for single_lun devices. If no one has active IO to the target, |
@@ -172,6 +180,8 @@ struct scsi_target { | |||
172 | /* means no lun present */ | 180 | /* means no lun present */ |
173 | 181 | ||
174 | char scsi_level; | 182 | char scsi_level; |
183 | struct execute_work ew; | ||
184 | enum scsi_target_state state; | ||
175 | void *hostdata; /* available to low-level driver */ | 185 | void *hostdata; /* available to low-level driver */ |
176 | unsigned long starget_data[0]; /* for the transport */ | 186 | unsigned long starget_data[0]; /* for the transport */ |
177 | /* starget_data must be the last element!!!! */ | 187 | /* starget_data must be the last element!!!! */ |