diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2009-03-02 07:09:04 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-03-12 13:58:20 -0400 |
commit | 5ffd51a5e495a2a002efd523aef0001912b080bd (patch) | |
tree | 422e72fe3674c230a9d8e5cebe71f902ac7f0bec /drivers/s390/scsi/zfcp_ccw.c | |
parent | cf13c08223148e525d28f4a740f2e73518ec6abe (diff) |
[SCSI] zfcp: replace current ERP logging with a more convenient version
The current number based id ERP logging is replaced by a string
based tag version. The benefit is an easier location of the code in
question and the removal of the lengthy array referencing the
individual messages.
The string (7 bytes) based version does not use more space since those
bytes were "used" anyway due to the alignment of the structure.
The encoding of the 7 byte string is as follows
[0-1] = filename
[2-5] = task/function
[6] = section
Due to the character of this string (fixed length) a string
termination is not required here.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_ccw.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index 683ac4ed5e56..3aeef289fe7c 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -109,10 +109,10 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device) | |||
109 | BUG_ON(!zfcp_reqlist_isempty(adapter)); | 109 | BUG_ON(!zfcp_reqlist_isempty(adapter)); |
110 | adapter->req_no = 0; | 110 | adapter->req_no = 0; |
111 | 111 | ||
112 | zfcp_erp_modify_adapter_status(adapter, 10, NULL, | 112 | zfcp_erp_modify_adapter_status(adapter, "ccsonl1", NULL, |
113 | ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET); | 113 | ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET); |
114 | zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, | 114 | zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, |
115 | NULL); | 115 | "ccsonl2", NULL); |
116 | zfcp_erp_wait(adapter); | 116 | zfcp_erp_wait(adapter); |
117 | up(&zfcp_data.config_sema); | 117 | up(&zfcp_data.config_sema); |
118 | flush_work(&adapter->scan_work); | 118 | flush_work(&adapter->scan_work); |
@@ -136,7 +136,7 @@ static int zfcp_ccw_set_offline(struct ccw_device *ccw_device) | |||
136 | 136 | ||
137 | down(&zfcp_data.config_sema); | 137 | down(&zfcp_data.config_sema); |
138 | adapter = dev_get_drvdata(&ccw_device->dev); | 138 | adapter = dev_get_drvdata(&ccw_device->dev); |
139 | zfcp_erp_adapter_shutdown(adapter, 0, 86, NULL); | 139 | zfcp_erp_adapter_shutdown(adapter, 0, "ccsoff1", NULL); |
140 | zfcp_erp_wait(adapter); | 140 | zfcp_erp_wait(adapter); |
141 | zfcp_erp_thread_kill(adapter); | 141 | zfcp_erp_thread_kill(adapter); |
142 | up(&zfcp_data.config_sema); | 142 | up(&zfcp_data.config_sema); |
@@ -159,21 +159,21 @@ static int zfcp_ccw_notify(struct ccw_device *ccw_device, int event) | |||
159 | case CIO_GONE: | 159 | case CIO_GONE: |
160 | dev_warn(&adapter->ccw_device->dev, | 160 | dev_warn(&adapter->ccw_device->dev, |
161 | "The FCP device has been detached\n"); | 161 | "The FCP device has been detached\n"); |
162 | zfcp_erp_adapter_shutdown(adapter, 0, 87, NULL); | 162 | zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti1", NULL); |
163 | break; | 163 | break; |
164 | case CIO_NO_PATH: | 164 | case CIO_NO_PATH: |
165 | dev_warn(&adapter->ccw_device->dev, | 165 | dev_warn(&adapter->ccw_device->dev, |
166 | "The CHPID for the FCP device is offline\n"); | 166 | "The CHPID for the FCP device is offline\n"); |
167 | zfcp_erp_adapter_shutdown(adapter, 0, 88, NULL); | 167 | zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti2", NULL); |
168 | break; | 168 | break; |
169 | case CIO_OPER: | 169 | case CIO_OPER: |
170 | dev_info(&adapter->ccw_device->dev, | 170 | dev_info(&adapter->ccw_device->dev, |
171 | "The FCP device is operational again\n"); | 171 | "The FCP device is operational again\n"); |
172 | zfcp_erp_modify_adapter_status(adapter, 11, NULL, | 172 | zfcp_erp_modify_adapter_status(adapter, "ccnoti3", NULL, |
173 | ZFCP_STATUS_COMMON_RUNNING, | 173 | ZFCP_STATUS_COMMON_RUNNING, |
174 | ZFCP_SET); | 174 | ZFCP_SET); |
175 | zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, | 175 | zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, |
176 | 89, NULL); | 176 | "ccnoti4", NULL); |
177 | break; | 177 | break; |
178 | } | 178 | } |
179 | return 1; | 179 | return 1; |
@@ -189,7 +189,7 @@ static void zfcp_ccw_shutdown(struct ccw_device *cdev) | |||
189 | 189 | ||
190 | down(&zfcp_data.config_sema); | 190 | down(&zfcp_data.config_sema); |
191 | adapter = dev_get_drvdata(&cdev->dev); | 191 | adapter = dev_get_drvdata(&cdev->dev); |
192 | zfcp_erp_adapter_shutdown(adapter, 0, 90, NULL); | 192 | zfcp_erp_adapter_shutdown(adapter, 0, "ccshut1", NULL); |
193 | zfcp_erp_wait(adapter); | 193 | zfcp_erp_wait(adapter); |
194 | up(&zfcp_data.config_sema); | 194 | up(&zfcp_data.config_sema); |
195 | } | 195 | } |