aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/scsi/zfcp_aux.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2005-12-01 02:46:32 +0100
committerJames Bottomley <jejb@mulgrave.(none)>2005-12-01 15:59:46 -0600
commitc48a29d065cfa18c3e8699f5e3a84a59ad35e062 (patch)
treec22058a74f61adbdf8663fd24d3ca2018e4f65cd /drivers/s390/scsi/zfcp_aux.c
parent8bdf810f89c3e686ba18a11e2852f32014f1506a (diff)
[SCSI] zfcp: fix spinlock initialization
Move initialization of locks and lists to adapter allocation function. Otherwise we might end up with some uninitialized locks, like e.g. the erp locks which only will be inititialized if an error recovery thread for an adapter will be started. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r--drivers/s390/scsi/zfcp_aux.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index c218b5c944a..5e84c5aa777 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -996,6 +996,20 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device)
spin_lock_init(&adapter->fsf_req_list_lock);
INIT_LIST_HEAD(&adapter->fsf_req_list_head);
+ /* initialize debug locks */
+
+ spin_lock_init(&adapter->erp_dbf_lock);
+ spin_lock_init(&adapter->hba_dbf_lock);
+ spin_lock_init(&adapter->san_dbf_lock);
+ spin_lock_init(&adapter->scsi_dbf_lock);
+
+ /* initialize error recovery stuff */
+
+ rwlock_init(&adapter->erp_lock);
+ sema_init(&adapter->erp_ready_sem, 0);
+ INIT_LIST_HEAD(&adapter->erp_ready_head);
+ INIT_LIST_HEAD(&adapter->erp_running_head);
+
/* initialize abort lock */
rwlock_init(&adapter->abort_lock);