aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_ccw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_ccw.c')
-rw-r--r--drivers/s390/scsi/zfcp_ccw.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c
index 285881f07648..1fe1e2eda512 100644
--- a/drivers/s390/scsi/zfcp_ccw.c
+++ b/drivers/s390/scsi/zfcp_ccw.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Registration and callback for the s390 common I/O layer. 4 * Registration and callback for the s390 common I/O layer.
5 * 5 *
6 * Copyright IBM Corporation 2002, 2008 6 * Copyright IBM Corporation 2002, 2009
7 */ 7 */
8 8
9#define KMSG_COMPONENT "zfcp" 9#define KMSG_COMPONENT "zfcp"
@@ -72,8 +72,7 @@ static void zfcp_ccw_remove(struct ccw_device *ccw_device)
72 72
73 list_for_each_entry_safe(port, p, &port_remove_lh, list) { 73 list_for_each_entry_safe(port, p, &port_remove_lh, list) {
74 list_for_each_entry_safe(unit, u, &unit_remove_lh, list) { 74 list_for_each_entry_safe(unit, u, &unit_remove_lh, list) {
75 if (atomic_read(&unit->status) & 75 if (unit->device)
76 ZFCP_STATUS_UNIT_REGISTERED)
77 scsi_remove_device(unit->device); 76 scsi_remove_device(unit->device);
78 zfcp_unit_dequeue(unit); 77 zfcp_unit_dequeue(unit);
79 } 78 }
@@ -109,11 +108,12 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device)
109 /* initialize request counter */ 108 /* initialize request counter */
110 BUG_ON(!zfcp_reqlist_isempty(adapter)); 109 BUG_ON(!zfcp_reqlist_isempty(adapter));
111 adapter->req_no = 0; 110 adapter->req_no = 0;
111 zfcp_fc_nameserver_init(adapter);
112 112
113 zfcp_erp_modify_adapter_status(adapter, 10, NULL, 113 zfcp_erp_modify_adapter_status(adapter, "ccsonl1", NULL,
114 ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET); 114 ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
115 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, 115 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
116 NULL); 116 "ccsonl2", NULL);
117 zfcp_erp_wait(adapter); 117 zfcp_erp_wait(adapter);
118 up(&zfcp_data.config_sema); 118 up(&zfcp_data.config_sema);
119 flush_work(&adapter->scan_work); 119 flush_work(&adapter->scan_work);
@@ -137,7 +137,7 @@ static int zfcp_ccw_set_offline(struct ccw_device *ccw_device)
137 137
138 down(&zfcp_data.config_sema); 138 down(&zfcp_data.config_sema);
139 adapter = dev_get_drvdata(&ccw_device->dev); 139 adapter = dev_get_drvdata(&ccw_device->dev);
140 zfcp_erp_adapter_shutdown(adapter, 0, 86, NULL); 140 zfcp_erp_adapter_shutdown(adapter, 0, "ccsoff1", NULL);
141 zfcp_erp_wait(adapter); 141 zfcp_erp_wait(adapter);
142 zfcp_erp_thread_kill(adapter); 142 zfcp_erp_thread_kill(adapter);
143 up(&zfcp_data.config_sema); 143 up(&zfcp_data.config_sema);
@@ -160,21 +160,21 @@ static int zfcp_ccw_notify(struct ccw_device *ccw_device, int event)
160 case CIO_GONE: 160 case CIO_GONE:
161 dev_warn(&adapter->ccw_device->dev, 161 dev_warn(&adapter->ccw_device->dev,
162 "The FCP device has been detached\n"); 162 "The FCP device has been detached\n");
163 zfcp_erp_adapter_shutdown(adapter, 0, 87, NULL); 163 zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti1", NULL);
164 break; 164 break;
165 case CIO_NO_PATH: 165 case CIO_NO_PATH:
166 dev_warn(&adapter->ccw_device->dev, 166 dev_warn(&adapter->ccw_device->dev,
167 "The CHPID for the FCP device is offline\n"); 167 "The CHPID for the FCP device is offline\n");
168 zfcp_erp_adapter_shutdown(adapter, 0, 88, NULL); 168 zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti2", NULL);
169 break; 169 break;
170 case CIO_OPER: 170 case CIO_OPER:
171 dev_info(&adapter->ccw_device->dev, 171 dev_info(&adapter->ccw_device->dev,
172 "The FCP device is operational again\n"); 172 "The FCP device is operational again\n");
173 zfcp_erp_modify_adapter_status(adapter, 11, NULL, 173 zfcp_erp_modify_adapter_status(adapter, "ccnoti3", NULL,
174 ZFCP_STATUS_COMMON_RUNNING, 174 ZFCP_STATUS_COMMON_RUNNING,
175 ZFCP_SET); 175 ZFCP_SET);
176 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 176 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
177 89, NULL); 177 "ccnoti4", NULL);
178 break; 178 break;
179 } 179 }
180 return 1; 180 return 1;
@@ -190,7 +190,7 @@ static void zfcp_ccw_shutdown(struct ccw_device *cdev)
190 190
191 down(&zfcp_data.config_sema); 191 down(&zfcp_data.config_sema);
192 adapter = dev_get_drvdata(&cdev->dev); 192 adapter = dev_get_drvdata(&cdev->dev);
193 zfcp_erp_adapter_shutdown(adapter, 0, 90, NULL); 193 zfcp_erp_adapter_shutdown(adapter, 0, "ccshut1", NULL);
194 zfcp_erp_wait(adapter); 194 zfcp_erp_wait(adapter);
195 up(&zfcp_data.config_sema); 195 up(&zfcp_data.config_sema);
196} 196}