aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/cio/device.c10
-rw-r--r--drivers/s390/scsi/zfcp_ccw.c10
-rw-r--r--include/asm-s390/ccwdev.h2
3 files changed, 16 insertions, 6 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 3943a4fde22..7fb271c60c2 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -1433,12 +1433,22 @@ ccw_device_remove (struct device *dev)
1433 return 0; 1433 return 0;
1434} 1434}
1435 1435
1436static void ccw_device_shutdown(struct device *dev)
1437{
1438 struct ccw_device *cdev;
1439
1440 cdev = to_ccwdev(dev);
1441 if (cdev->drv && cdev->drv->shutdown)
1442 cdev->drv->shutdown(cdev);
1443}
1444
1436struct bus_type ccw_bus_type = { 1445struct bus_type ccw_bus_type = {
1437 .name = "ccw", 1446 .name = "ccw",
1438 .match = ccw_bus_match, 1447 .match = ccw_bus_match,
1439 .uevent = ccw_uevent, 1448 .uevent = ccw_uevent,
1440 .probe = ccw_device_probe, 1449 .probe = ccw_device_probe,
1441 .remove = ccw_device_remove, 1450 .remove = ccw_device_remove,
1451 .shutdown = ccw_device_shutdown,
1442}; 1452};
1443 1453
1444/** 1454/**
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c
index 1c8f71a5985..c0d1c0eb320 100644
--- a/drivers/s390/scsi/zfcp_ccw.c
+++ b/drivers/s390/scsi/zfcp_ccw.c
@@ -28,7 +28,7 @@ static void zfcp_ccw_remove(struct ccw_device *);
28static int zfcp_ccw_set_online(struct ccw_device *); 28static int zfcp_ccw_set_online(struct ccw_device *);
29static int zfcp_ccw_set_offline(struct ccw_device *); 29static int zfcp_ccw_set_offline(struct ccw_device *);
30static int zfcp_ccw_notify(struct ccw_device *, int); 30static int zfcp_ccw_notify(struct ccw_device *, int);
31static void zfcp_ccw_shutdown(struct device *); 31static void zfcp_ccw_shutdown(struct ccw_device *);
32 32
33static struct ccw_device_id zfcp_ccw_device_id[] = { 33static struct ccw_device_id zfcp_ccw_device_id[] = {
34 {CCW_DEVICE_DEVTYPE(ZFCP_CONTROL_UNIT_TYPE, 34 {CCW_DEVICE_DEVTYPE(ZFCP_CONTROL_UNIT_TYPE,
@@ -51,9 +51,7 @@ static struct ccw_driver zfcp_ccw_driver = {
51 .set_online = zfcp_ccw_set_online, 51 .set_online = zfcp_ccw_set_online,
52 .set_offline = zfcp_ccw_set_offline, 52 .set_offline = zfcp_ccw_set_offline,
53 .notify = zfcp_ccw_notify, 53 .notify = zfcp_ccw_notify,
54 .driver = { 54 .shutdown = zfcp_ccw_shutdown,
55 .shutdown = zfcp_ccw_shutdown,
56 },
57}; 55};
58 56
59MODULE_DEVICE_TABLE(ccw, zfcp_ccw_device_id); 57MODULE_DEVICE_TABLE(ccw, zfcp_ccw_device_id);
@@ -277,12 +275,12 @@ zfcp_ccw_register(void)
277 * Makes sure that QDIO queues are down when the system gets stopped. 275 * Makes sure that QDIO queues are down when the system gets stopped.
278 */ 276 */
279static void 277static void
280zfcp_ccw_shutdown(struct device *dev) 278zfcp_ccw_shutdown(struct ccw_device *cdev)
281{ 279{
282 struct zfcp_adapter *adapter; 280 struct zfcp_adapter *adapter;
283 281
284 down(&zfcp_data.config_sema); 282 down(&zfcp_data.config_sema);
285 adapter = dev_get_drvdata(dev); 283 adapter = dev_get_drvdata(&cdev->dev);
286 zfcp_erp_adapter_shutdown(adapter, 0); 284 zfcp_erp_adapter_shutdown(adapter, 0);
287 zfcp_erp_wait(adapter); 285 zfcp_erp_wait(adapter);
288 up(&zfcp_data.config_sema); 286 up(&zfcp_data.config_sema);
diff --git a/include/asm-s390/ccwdev.h b/include/asm-s390/ccwdev.h
index 8e961aa4b39..066aa70518c 100644
--- a/include/asm-s390/ccwdev.h
+++ b/include/asm-s390/ccwdev.h
@@ -102,6 +102,7 @@ struct ccw_device {
102 * @set_online: called when setting device online 102 * @set_online: called when setting device online
103 * @set_offline: called when setting device offline 103 * @set_offline: called when setting device offline
104 * @notify: notify driver of device state changes 104 * @notify: notify driver of device state changes
105 * @shutdown: called at device shutdown
105 * @driver: embedded device driver structure 106 * @driver: embedded device driver structure
106 * @name: device driver name 107 * @name: device driver name
107 */ 108 */
@@ -113,6 +114,7 @@ struct ccw_driver {
113 int (*set_online) (struct ccw_device *); 114 int (*set_online) (struct ccw_device *);
114 int (*set_offline) (struct ccw_device *); 115 int (*set_offline) (struct ccw_device *);
115 int (*notify) (struct ccw_device *, int); 116 int (*notify) (struct ccw_device *, int);
117 void (*shutdown) (struct ccw_device *);
116 struct device_driver driver; 118 struct device_driver driver;
117 char *name; 119 char *name;
118}; 120};