diff options
author | Peter Oberparleiter <peter.oberparleiter@de.ibm.com> | 2009-12-07 06:51:17 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-12-07 06:51:29 -0500 |
commit | 5d6e6b6f6f3eac10a7f5a15e961bac3b36824d9d (patch) | |
tree | b64af704c59b0820c0537bd0bed45caa0d5e26b7 /drivers/s390/cio/css.c | |
parent | 60e4dac1abdf49ccdb7545ec406325f08423d848 (diff) |
[S390] cio: introduce parent-initiated device move
Change the initiative to update subchannel-ccw device associations
to the subchannel: when there is an indication that the internal
association no longer reflects the current hardware state, mark
each affected subchannel as requiring attention. Once processing
reaches a subchannel, determine the correct association for that
subchannel at that time and perform the necessary device_move
operations.
This change fixes problems with the previous approach which would
leave devices in an inconsistent state when a new hardware change
occurred while a device_move was already scheduled.
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/css.c')
-rw-r--r-- | drivers/s390/cio/css.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 91c25706fa83..b4df5a56cfe2 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -376,8 +376,8 @@ static int css_evaluate_new_subchannel(struct subchannel_id schid, int slow) | |||
376 | /* Unusable - ignore. */ | 376 | /* Unusable - ignore. */ |
377 | return 0; | 377 | return 0; |
378 | } | 378 | } |
379 | CIO_MSG_EVENT(4, "Evaluating schid 0.%x.%04x, event %d, unknown, " | 379 | CIO_MSG_EVENT(4, "event: sch 0.%x.%04x, new\n", schid.ssid, |
380 | "slow path.\n", schid.ssid, schid.sch_no, CIO_OPER); | 380 | schid.sch_no); |
381 | 381 | ||
382 | return css_probe_device(schid); | 382 | return css_probe_device(schid); |
383 | } | 383 | } |
@@ -394,6 +394,10 @@ static int css_evaluate_known_subchannel(struct subchannel *sch, int slow) | |||
394 | "Got subchannel machine check but " | 394 | "Got subchannel machine check but " |
395 | "no sch_event handler provided.\n"); | 395 | "no sch_event handler provided.\n"); |
396 | } | 396 | } |
397 | if (ret != 0 && ret != -EAGAIN) { | ||
398 | CIO_MSG_EVENT(2, "eval: sch 0.%x.%04x, rc=%d\n", | ||
399 | sch->schid.ssid, sch->schid.sch_no, ret); | ||
400 | } | ||
397 | return ret; | 401 | return ret; |
398 | } | 402 | } |
399 | 403 | ||
@@ -684,6 +688,7 @@ static int __init setup_css(int nr) | |||
684 | css->pseudo_subchannel->dev.parent = &css->device; | 688 | css->pseudo_subchannel->dev.parent = &css->device; |
685 | css->pseudo_subchannel->dev.release = css_subchannel_release; | 689 | css->pseudo_subchannel->dev.release = css_subchannel_release; |
686 | dev_set_name(&css->pseudo_subchannel->dev, "defunct"); | 690 | dev_set_name(&css->pseudo_subchannel->dev, "defunct"); |
691 | mutex_init(&css->pseudo_subchannel->reg_mutex); | ||
687 | ret = cio_create_sch_lock(css->pseudo_subchannel); | 692 | ret = cio_create_sch_lock(css->pseudo_subchannel); |
688 | if (ret) { | 693 | if (ret) { |
689 | kfree(css->pseudo_subchannel); | 694 | kfree(css->pseudo_subchannel); |