9 #define KMSG_COMPONENT "zfcp"
10 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
12 #include <linux/module.h>
16 #define ZFCP_MODEL_PRIV 0x4
28 kref_get(&adapter->
ref);
29 spin_unlock_irqrestore(&zfcp_ccw_adapter_ref_lock, flags);
39 spin_unlock_irqrestore(&zfcp_ccw_adapter_ref_lock, flags);
92 static int zfcp_ccw_probe(
struct ccw_device *cdev)
106 static void zfcp_ccw_remove(
struct ccw_device *cdev)
124 list_move(&unit->
list, &unit_remove_lh);
126 list_move(&port->list, &port_remove_lh);
160 if (IS_ERR(adapter)) {
162 "Setting up data structures for the "
163 "FCP adapter failed\n");
164 return PTR_ERR(adapter);
166 kref_get(&adapter->
ref);
173 zfcp_ccw_activate(cdev, 0,
"ccsonl1");
192 static int zfcp_ccw_offline_sync(
struct ccw_device *cdev,
int set,
char *tag)
214 static int zfcp_ccw_set_offline(
struct ccw_device *cdev)
216 return zfcp_ccw_offline_sync(cdev, 0,
"ccsoff1");
241 dev_warn(&cdev->
dev,
"The FCP device has been detached\n");
246 "The CHPID for the FCP device is offline\n");
255 dev_info(&cdev->
dev,
"The FCP device is operational again\n");
262 dev_warn(&cdev->
dev,
"The FCP device did not respond within "
263 "the specified time\n");
276 static void zfcp_ccw_shutdown(
struct ccw_device *cdev)
290 static int zfcp_ccw_suspend(
struct ccw_device *cdev)
296 static int zfcp_ccw_thaw(
struct ccw_device *cdev)
302 zfcp_ccw_activate(cdev, 0,
"ccthaw1");
306 static int zfcp_ccw_resume(
struct ccw_device *cdev)
317 .ids = zfcp_ccw_device_id,
318 .probe = zfcp_ccw_probe,
319 .remove = zfcp_ccw_remove,
320 .set_online = zfcp_ccw_set_online,
321 .set_offline = zfcp_ccw_set_offline,
322 .notify = zfcp_ccw_notify,
323 .shutdown = zfcp_ccw_shutdown,
324 .freeze = zfcp_ccw_suspend,
325 .thaw = zfcp_ccw_thaw,
326 .restore = zfcp_ccw_resume,