From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 09/34] cio: Introduce ccw_bus_type.shutdown.
Date: Thu, 04 Oct 2007 13:27:15 +0200 [thread overview]
Message-ID: <20071004112827.021050079@de.ibm.com> (raw)
In-Reply-To: 20071004112706.574737175@de.ibm.com
[-- Attachment #1: 009-cio-shutdown.diff --]
[-- Type: text/plain, Size: 3453 bytes --]
From: Cornelia Huck <cornelia.huck@de.ibm.com>
Introduce a shutdown method for the ccw bus that calls the driver
specific shutdown method in struct ccw_driver.
Switch zfcp to the new ccw_driver shutdown method.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/cio/device.c | 10 ++++++++++
drivers/s390/scsi/zfcp_ccw.c | 10 ++++------
include/asm-s390/ccwdev.h | 2 ++
3 files changed, 16 insertions(+), 6 deletions(-)
Index: quilt-2.6/drivers/s390/cio/device.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/device.c
+++ quilt-2.6/drivers/s390/cio/device.c
@@ -1433,12 +1433,22 @@ ccw_device_remove (struct device *dev)
return 0;
}
+static void ccw_device_shutdown(struct device *dev)
+{
+ struct ccw_device *cdev;
+
+ cdev = to_ccwdev(dev);
+ if (cdev->drv && cdev->drv->shutdown)
+ cdev->drv->shutdown(cdev);
+}
+
struct bus_type ccw_bus_type = {
.name = "ccw",
.match = ccw_bus_match,
.uevent = ccw_uevent,
.probe = ccw_device_probe,
.remove = ccw_device_remove,
+ .shutdown = ccw_device_shutdown,
};
/**
Index: quilt-2.6/drivers/s390/scsi/zfcp_ccw.c
===================================================================
--- quilt-2.6.orig/drivers/s390/scsi/zfcp_ccw.c
+++ quilt-2.6/drivers/s390/scsi/zfcp_ccw.c
@@ -28,7 +28,7 @@ static void zfcp_ccw_remove(struct ccw_d
static int zfcp_ccw_set_online(struct ccw_device *);
static int zfcp_ccw_set_offline(struct ccw_device *);
static int zfcp_ccw_notify(struct ccw_device *, int);
-static void zfcp_ccw_shutdown(struct device *);
+static void zfcp_ccw_shutdown(struct ccw_device *);
static struct ccw_device_id zfcp_ccw_device_id[] = {
{CCW_DEVICE_DEVTYPE(ZFCP_CONTROL_UNIT_TYPE,
@@ -51,9 +51,7 @@ static struct ccw_driver zfcp_ccw_driver
.set_online = zfcp_ccw_set_online,
.set_offline = zfcp_ccw_set_offline,
.notify = zfcp_ccw_notify,
- .driver = {
- .shutdown = zfcp_ccw_shutdown,
- },
+ .shutdown = zfcp_ccw_shutdown,
};
MODULE_DEVICE_TABLE(ccw, zfcp_ccw_device_id);
@@ -277,12 +275,12 @@ zfcp_ccw_register(void)
* Makes sure that QDIO queues are down when the system gets stopped.
*/
static void
-zfcp_ccw_shutdown(struct device *dev)
+zfcp_ccw_shutdown(struct ccw_device *cdev)
{
struct zfcp_adapter *adapter;
down(&zfcp_data.config_sema);
- adapter = dev_get_drvdata(dev);
+ adapter = dev_get_drvdata(&cdev->dev);
zfcp_erp_adapter_shutdown(adapter, 0);
zfcp_erp_wait(adapter);
up(&zfcp_data.config_sema);
Index: quilt-2.6/include/asm-s390/ccwdev.h
===================================================================
--- quilt-2.6.orig/include/asm-s390/ccwdev.h
+++ quilt-2.6/include/asm-s390/ccwdev.h
@@ -102,6 +102,7 @@ struct ccw_device {
* @set_online: called when setting device online
* @set_offline: called when setting device offline
* @notify: notify driver of device state changes
+ * @shutdown: called at device shutdown
* @driver: embedded device driver structure
* @name: device driver name
*/
@@ -113,6 +114,7 @@ struct ccw_driver {
int (*set_online) (struct ccw_device *);
int (*set_offline) (struct ccw_device *);
int (*notify) (struct ccw_device *, int);
+ void (*shutdown) (struct ccw_device *);
struct device_driver driver;
char *name;
};
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2007-10-04 11:41 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-04 11:27 [patch 00/34] s390 patches for 2.6.24 Martin Schwidefsky
2007-10-04 11:27 ` [patch 01/34] cio: rename css to channel_subsystems Martin Schwidefsky
2007-10-04 11:27 ` [patch 02/34] cio: remove subchannel_add_files() Martin Schwidefsky
2007-10-04 11:27 ` [patch 03/34] cio: Fix some coding style issues in cmf Martin Schwidefsky
2007-10-04 11:27 ` [patch 04/34] cio: Kerneldoc comments for cmf Martin Schwidefsky
2007-10-04 11:27 ` [patch 05/34] cio: Add docbook comments Martin Schwidefsky
2007-10-04 11:27 ` [patch 06/34] cio: Add s390-drivers book Martin Schwidefsky
2007-10-04 11:27 ` [patch 07/34] cio: Minor style fixes Martin Schwidefsky
2007-10-04 11:27 ` [patch 08/34] cio: Disable channel path measurements on shutdown/reboot Martin Schwidefsky
2007-10-04 11:27 ` Martin Schwidefsky [this message]
2007-10-04 11:27 ` [patch 10/34] cio: Disable channel measurements (cmf) " Martin Schwidefsky
2007-10-04 11:27 ` [patch 11/34] cio: Fix device attributes for early devices Martin Schwidefsky
2007-10-04 11:27 ` [patch 12/34] Add Documentation/s390/00-INDEX Martin Schwidefsky
2007-10-04 11:27 ` [patch 13/34] cio: Documentation update Martin Schwidefsky
2007-10-04 11:27 ` [patch 14/34] zcrypt: make init/exit functions static Martin Schwidefsky
2007-10-04 11:27 ` [patch 15/34] zcrypt: remove duplicated struct CPRBX definition Martin Schwidefsky
2007-10-04 11:27 ` [patch 16/34] zcrypt: fix ap_reset_domain() Martin Schwidefsky
2007-10-04 11:27 ` [patch 17/34] appldata_base: Misc cpuinit annotations and bugfix Martin Schwidefsky
2007-10-04 11:27 ` [patch 18/34] appldata_base: Remove module_exit function and modular stuff Martin Schwidefsky
2007-10-04 11:27 ` [patch 19/34] disassembler: fix output for insns with 6 operands Martin Schwidefsky
2007-10-04 11:27 ` [patch 20/34] disassembler: Remove redundant variable assignment Martin Schwidefsky
2007-10-04 11:27 ` [patch 21/34] Get rid of a bunch of sparse warnings again Martin Schwidefsky
2007-10-04 11:27 ` [patch 22/34] remove packed attribute from ext_int_info_t Martin Schwidefsky
2007-10-04 11:27 ` [patch 23/34] Get rid of ARCH_KMALLOC_MINALIGN Martin Schwidefsky
2007-10-04 11:27 ` [patch 24/34] qdio: dont cast function pointers and use them to call functions Martin Schwidefsky
2007-10-04 11:27 ` [patch 25/34] is_power_of_2 in drivers/s390/block/dasd_int.h Martin Schwidefsky
2007-10-04 11:27 ` [patch 26/34] qdio: change QDIO performance_stats error message priority Martin Schwidefsky
2007-10-04 11:27 ` [patch 27/34] Force link error if xchg/cmpxchg gets called with unsupported size Martin Schwidefsky
2007-10-04 11:27 ` [patch 28/34] Use IPL CLEAR for reipl under z/VM Martin Schwidefsky
2007-10-04 11:27 ` [patch 29/34] Remove obsolete recommendation for 8M ramdisk size Martin Schwidefsky
2007-10-04 11:27 ` [patch 30/34] zcore: fix inline assembly in memcpy_real() Martin Schwidefsky
2007-10-04 11:27 ` [patch 31/34] Make vmalloc area start at address > 4GB Martin Schwidefsky
2007-10-04 11:27 ` [patch 32/34] cpcmd: fix inline assembly usage Martin Schwidefsky
2007-10-04 11:27 ` [patch 33/34] tape: Fix medium state handling Martin Schwidefsky
2007-10-04 11:27 ` [patch 34/34] vmwatchdog: fix broken inline assembly Martin Schwidefsky
2007-10-04 19:10 ` [patch 00/34] s390 patches for 2.6.24 Sam Ravnborg
2007-10-05 8:30 ` Martin Schwidefsky
2007-10-04 19:15 ` [PATCH 1/2] s390: beautify vmlinux.lds Sam Ravnborg
2007-10-04 19:18 ` [PATCH 2/2] s390: use PAGE_SIZE in vmlinux.lds Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071004112827.021050079@de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox