diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2005-11-30 20:46:32 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-01 16:59:46 -0500 |
commit | c48a29d065cfa18c3e8699f5e3a84a59ad35e062 (patch) | |
tree | c22058a74f61adbdf8663fd24d3ca2018e4f65cd /drivers/s390/scsi/zfcp_dbf.c | |
parent | 8bdf810f89c3e686ba18a11e2852f32014f1506a (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_dbf.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index 826fb3b00605..95599719f8ab 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -926,7 +926,6 @@ int zfcp_adapter_debug_register(struct zfcp_adapter *adapter) | |||
926 | char dbf_name[DEBUG_MAX_NAME_LEN]; | 926 | char dbf_name[DEBUG_MAX_NAME_LEN]; |
927 | 927 | ||
928 | /* debug feature area which records recovery activity */ | 928 | /* debug feature area which records recovery activity */ |
929 | spin_lock_init(&adapter->erp_dbf_lock); | ||
930 | sprintf(dbf_name, "zfcp_%s_erp", zfcp_get_busid_by_adapter(adapter)); | 929 | sprintf(dbf_name, "zfcp_%s_erp", zfcp_get_busid_by_adapter(adapter)); |
931 | adapter->erp_dbf = debug_register(dbf_name, dbfsize, 2, | 930 | adapter->erp_dbf = debug_register(dbf_name, dbfsize, 2, |
932 | sizeof(struct zfcp_erp_dbf_record)); | 931 | sizeof(struct zfcp_erp_dbf_record)); |
@@ -936,7 +935,6 @@ int zfcp_adapter_debug_register(struct zfcp_adapter *adapter) | |||
936 | debug_set_level(adapter->erp_dbf, 3); | 935 | debug_set_level(adapter->erp_dbf, 3); |
937 | 936 | ||
938 | /* debug feature area which records HBA (FSF and QDIO) conditions */ | 937 | /* debug feature area which records HBA (FSF and QDIO) conditions */ |
939 | spin_lock_init(&adapter->hba_dbf_lock); | ||
940 | sprintf(dbf_name, "zfcp_%s_hba", zfcp_get_busid_by_adapter(adapter)); | 938 | sprintf(dbf_name, "zfcp_%s_hba", zfcp_get_busid_by_adapter(adapter)); |
941 | adapter->hba_dbf = debug_register(dbf_name, dbfsize, 1, | 939 | adapter->hba_dbf = debug_register(dbf_name, dbfsize, 1, |
942 | sizeof(struct zfcp_hba_dbf_record)); | 940 | sizeof(struct zfcp_hba_dbf_record)); |
@@ -947,7 +945,6 @@ int zfcp_adapter_debug_register(struct zfcp_adapter *adapter) | |||
947 | debug_set_level(adapter->hba_dbf, 3); | 945 | debug_set_level(adapter->hba_dbf, 3); |
948 | 946 | ||
949 | /* debug feature area which records SAN command failures and recovery */ | 947 | /* debug feature area which records SAN command failures and recovery */ |
950 | spin_lock_init(&adapter->san_dbf_lock); | ||
951 | sprintf(dbf_name, "zfcp_%s_san", zfcp_get_busid_by_adapter(adapter)); | 948 | sprintf(dbf_name, "zfcp_%s_san", zfcp_get_busid_by_adapter(adapter)); |
952 | adapter->san_dbf = debug_register(dbf_name, dbfsize, 1, | 949 | adapter->san_dbf = debug_register(dbf_name, dbfsize, 1, |
953 | sizeof(struct zfcp_san_dbf_record)); | 950 | sizeof(struct zfcp_san_dbf_record)); |
@@ -958,7 +955,6 @@ int zfcp_adapter_debug_register(struct zfcp_adapter *adapter) | |||
958 | debug_set_level(adapter->san_dbf, 6); | 955 | debug_set_level(adapter->san_dbf, 6); |
959 | 956 | ||
960 | /* debug feature area which records SCSI command failures and recovery */ | 957 | /* debug feature area which records SCSI command failures and recovery */ |
961 | spin_lock_init(&adapter->scsi_dbf_lock); | ||
962 | sprintf(dbf_name, "zfcp_%s_scsi", zfcp_get_busid_by_adapter(adapter)); | 958 | sprintf(dbf_name, "zfcp_%s_scsi", zfcp_get_busid_by_adapter(adapter)); |
963 | adapter->scsi_dbf = debug_register(dbf_name, dbfsize, 1, | 959 | adapter->scsi_dbf = debug_register(dbf_name, dbfsize, 1, |
964 | sizeof(struct zfcp_scsi_dbf_record)); | 960 | sizeof(struct zfcp_scsi_dbf_record)); |