[SCSI] sas_scsi_host: Convert to use the kthread API
[safe/jmp/linux-2.6] / include / scsi / libsas.h
index ca39392..2e6bdc4 100644 (file)
@@ -314,8 +314,7 @@ struct scsi_core {
        struct list_head  task_queue;
        int               task_queue_size;
 
-       struct semaphore  queue_thread_sema;
-       int               queue_thread_kill;
+       struct task_struct *queue_thread;
 };
 
 struct sas_ha_event {
@@ -567,10 +566,9 @@ struct sas_task {
 static inline struct sas_task *sas_alloc_task(gfp_t flags)
 {
        extern struct kmem_cache *sas_task_cache;
-       struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags);
+       struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags);
 
        if (task) {
-               memset(task, 0, sizeof(*task));
                INIT_LIST_HEAD(&task->list);
                spin_lock_init(&task->task_state_lock);
                task->task_state_flags = SAS_TASK_STATE_PENDING;
@@ -660,5 +658,7 @@ void sas_init_dev(struct domain_device *);
 
 void sas_task_abort(struct sas_task *);
 int __sas_task_abort(struct sas_task *);
+int sas_eh_device_reset_handler(struct scsi_cmnd *cmd);
+int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd);
 
 #endif /* _SASLIB_H_ */