aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_def.h
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2009-08-18 09:43:25 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-09-05 09:49:37 -0400
commit347c6a965dc110c91a77f65181fc011ee257a4a6 (patch)
tree9f25d7da6b49f9d23029edc0221fe4f27fe61745 /drivers/s390/scsi/zfcp_def.h
parentea945ff84c2ce1089edb7914ffdd998c24c25903 (diff)
[SCSI] zfcp: Use kthread API for zfcp erp thread
Switch the creation of the zfcp erp thread from the deprecated kernel_thread API to the kthread API. This allows also the removal of some flags in zfcp since the kthread API handles thread creation and shutdown internally. To allow the usage of the kthread_stop function, replace the erp ready semaphore with a waitqueue for waiting until erp actions arrive on the ready queue. Reviewed-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_def.h')
-rw-r--r--drivers/s390/scsi/zfcp_def.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 9a8ff0553421..ce65d88e280c 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -222,8 +222,6 @@ struct zfcp_ls_adisc {
222#define ZFCP_STATUS_ADAPTER_QDIOUP 0x00000002 222#define ZFCP_STATUS_ADAPTER_QDIOUP 0x00000002
223#define ZFCP_STATUS_ADAPTER_XCONFIG_OK 0x00000008 223#define ZFCP_STATUS_ADAPTER_XCONFIG_OK 0x00000008
224#define ZFCP_STATUS_ADAPTER_HOST_CON_INIT 0x00000010 224#define ZFCP_STATUS_ADAPTER_HOST_CON_INIT 0x00000010
225#define ZFCP_STATUS_ADAPTER_ERP_THREAD_UP 0x00000020
226#define ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL 0x00000080
227#define ZFCP_STATUS_ADAPTER_ERP_PENDING 0x00000100 225#define ZFCP_STATUS_ADAPTER_ERP_PENDING 0x00000100
228#define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200 226#define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200
229 227
@@ -481,10 +479,9 @@ struct zfcp_adapter {
481 atomic_t status; /* status of this adapter */ 479 atomic_t status; /* status of this adapter */
482 struct list_head erp_ready_head; /* error recovery for this 480 struct list_head erp_ready_head; /* error recovery for this
483 adapter/devices */ 481 adapter/devices */
482 wait_queue_head_t erp_ready_wq;
484 struct list_head erp_running_head; 483 struct list_head erp_running_head;
485 rwlock_t erp_lock; 484 rwlock_t erp_lock;
486 struct semaphore erp_ready_sem;
487 wait_queue_head_t erp_thread_wqh;
488 wait_queue_head_t erp_done_wqh; 485 wait_queue_head_t erp_done_wqh;
489 struct zfcp_erp_action erp_action; /* pending error recovery */ 486 struct zfcp_erp_action erp_action; /* pending error recovery */
490 atomic_t erp_counter; 487 atomic_t erp_counter;
@@ -492,6 +489,7 @@ struct zfcp_adapter {
492 actions */ 489 actions */
493 u32 erp_low_mem_count; /* nr of erp actions waiting 490 u32 erp_low_mem_count; /* nr of erp actions waiting
494 for memory */ 491 for memory */
492 struct task_struct *erp_thread;
495 struct zfcp_wka_ports *gs; /* generic services */ 493 struct zfcp_wka_ports *gs; /* generic services */
496 struct zfcp_dbf *dbf; /* debug traces */ 494 struct zfcp_dbf *dbf; /* debug traces */
497 struct zfcp_adapter_mempool pool; /* Adapter memory pools */ 495 struct zfcp_adapter_mempool pool; /* Adapter memory pools */