aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r--drivers/s390/scsi/zfcp_aux.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 90aa53fc4f3e..7507067351bd 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -891,7 +891,7 @@ zfcp_unit_dequeue(struct zfcp_unit *unit)
891/* 891/*
892 * Allocates a combined QTCB/fsf_req buffer for erp actions and fcp/SCSI 892 * Allocates a combined QTCB/fsf_req buffer for erp actions and fcp/SCSI
893 * commands. 893 * commands.
894 * It also genrates fcp-nameserver request/response buffer and unsolicited 894 * It also genrates fcp-nameserver request/response buffer and unsolicited
895 * status read fsf_req buffers. 895 * status read fsf_req buffers.
896 * 896 *
897 * locks: must only be called with zfcp_data.config_sema taken 897 * locks: must only be called with zfcp_data.config_sema taken
@@ -982,7 +982,7 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device)
982 struct zfcp_adapter *adapter; 982 struct zfcp_adapter *adapter;
983 983
984 /* 984 /*
985 * Note: It is safe to release the list_lock, as any list changes 985 * Note: It is safe to release the list_lock, as any list changes
986 * are protected by the config_sema, which must be held to get here 986 * are protected by the config_sema, which must be held to get here
987 */ 987 */
988 988
@@ -1038,6 +1038,10 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device)
1038 spin_lock_init(&adapter->san_dbf_lock); 1038 spin_lock_init(&adapter->san_dbf_lock);
1039 spin_lock_init(&adapter->scsi_dbf_lock); 1039 spin_lock_init(&adapter->scsi_dbf_lock);
1040 1040
1041 retval = zfcp_adapter_debug_register(adapter);
1042 if (retval)
1043 goto debug_register_failed;
1044
1041 /* initialize error recovery stuff */ 1045 /* initialize error recovery stuff */
1042 1046
1043 rwlock_init(&adapter->erp_lock); 1047 rwlock_init(&adapter->erp_lock);
@@ -1058,7 +1062,6 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device)
1058 /* mark adapter unusable as long as sysfs registration is not complete */ 1062 /* mark adapter unusable as long as sysfs registration is not complete */
1059 atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status); 1063 atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status);
1060 1064
1061 adapter->ccw_device = ccw_device;
1062 dev_set_drvdata(&ccw_device->dev, adapter); 1065 dev_set_drvdata(&ccw_device->dev, adapter);
1063 1066
1064 if (zfcp_sysfs_adapter_create_files(&ccw_device->dev)) 1067 if (zfcp_sysfs_adapter_create_files(&ccw_device->dev))
@@ -1085,6 +1088,8 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device)
1085 generic_services_failed: 1088 generic_services_failed:
1086 zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); 1089 zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev);
1087 sysfs_failed: 1090 sysfs_failed:
1091 zfcp_adapter_debug_unregister(adapter);
1092 debug_register_failed:
1088 dev_set_drvdata(&ccw_device->dev, NULL); 1093 dev_set_drvdata(&ccw_device->dev, NULL);
1089 zfcp_reqlist_free(adapter); 1094 zfcp_reqlist_free(adapter);
1090 failed_low_mem_buffers: 1095 failed_low_mem_buffers:
@@ -1130,6 +1135,8 @@ zfcp_adapter_dequeue(struct zfcp_adapter *adapter)
1130 goto out; 1135 goto out;
1131 } 1136 }
1132 1137
1138 zfcp_adapter_debug_unregister(adapter);
1139
1133 /* remove specified adapter data structure from list */ 1140 /* remove specified adapter data structure from list */
1134 write_lock_irq(&zfcp_data.config_lock); 1141 write_lock_irq(&zfcp_data.config_lock);
1135 list_del(&adapter->list); 1142 list_del(&adapter->list);