diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-07-14 03:59:02 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-07-14 04:02:11 -0400 |
commit | 99611f87176b2a908d8c66ab19a5fc550a3cd13a (patch) | |
tree | 2c9898f347d00aeab5ffcbf74c90469efb86043e /drivers/s390/cio/device.c | |
parent | 6ef556ccc8fd256259745c4f0d0ab65aaf703824 (diff) |
[S390] cio: Repair chpid event handling.
Passing the affected chpid in chp_event() worked only by
chance since chpid is the first element in res_acc_data.
Make it work properly by generalizing res_acc_data as
chp_link and always passing around a properly filled out
chp_link structure in chp_event().
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r-- | drivers/s390/cio/device.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 67e7a3123954..522d47afc950 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -128,7 +128,8 @@ static int io_subchannel_probe(struct subchannel *); | |||
128 | static int io_subchannel_remove(struct subchannel *); | 128 | static int io_subchannel_remove(struct subchannel *); |
129 | static void io_subchannel_shutdown(struct subchannel *); | 129 | static void io_subchannel_shutdown(struct subchannel *); |
130 | static int io_subchannel_sch_event(struct subchannel *, int); | 130 | static int io_subchannel_sch_event(struct subchannel *, int); |
131 | static int io_subchannel_chp_event(struct subchannel *, void *, int); | 131 | static int io_subchannel_chp_event(struct subchannel *, struct chp_link *, |
132 | int); | ||
132 | 133 | ||
133 | static struct css_driver io_subchannel_driver = { | 134 | static struct css_driver io_subchannel_driver = { |
134 | .owner = THIS_MODULE, | 135 | .owner = THIS_MODULE, |
@@ -1329,14 +1330,12 @@ static void io_subchannel_terminate_path(struct subchannel *sch, u8 mask) | |||
1329 | 1330 | ||
1330 | } | 1331 | } |
1331 | 1332 | ||
1332 | static int io_subchannel_chp_event(struct subchannel *sch, void *data, | 1333 | static int io_subchannel_chp_event(struct subchannel *sch, |
1333 | int event) | 1334 | struct chp_link *link, int event) |
1334 | { | 1335 | { |
1335 | int mask; | 1336 | int mask; |
1336 | struct res_acc_data *res_data; | ||
1337 | 1337 | ||
1338 | res_data = data; | 1338 | mask = chp_ssd_get_mask(&sch->ssd_info, link); |
1339 | mask = chp_ssd_get_mask(&sch->ssd_info, res_data); | ||
1340 | if (!mask) | 1339 | if (!mask) |
1341 | return 0; | 1340 | return 0; |
1342 | switch (event) { | 1341 | switch (event) { |