aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2010-10-25 10:10:31 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-10-25 10:10:18 -0400
commitc38a90a34cfc880eb2f7234c511cdb7d8bdebc45 (patch)
treecf10e8b31b59c3f4734fd8254468f4cc83efdcaf /drivers/s390
parent906c9768c7750ce76b85597174b9c3599a6ca9f6 (diff)
[S390] cio: update descriptor in chsc_chp_vary
Update the channel path descriptor at the beginning of to the vary_on operation. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/cio/chp.c6
-rw-r--r--drivers/s390/cio/chp.h6
-rw-r--r--drivers/s390/cio/chsc.c8
3 files changed, 11 insertions, 9 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c
index b1addd78689d..2d32233943a9 100644
--- a/drivers/s390/cio/chp.c
+++ b/drivers/s390/cio/chp.c
@@ -54,12 +54,6 @@ static struct work_struct cfg_work;
54/* Wait queue for configure completion events. */ 54/* Wait queue for configure completion events. */
55static wait_queue_head_t cfg_wait_queue; 55static wait_queue_head_t cfg_wait_queue;
56 56
57/* Return channel_path struct for given chpid. */
58static inline struct channel_path *chpid_to_chp(struct chp_id chpid)
59{
60 return channel_subsystems[chpid.cssid]->chps[chpid.id];
61}
62
63/* Set vary state for given chpid. */ 57/* Set vary state for given chpid. */
64static void set_chp_logically_online(struct chp_id chpid, int onoff) 58static void set_chp_logically_online(struct chp_id chpid, int onoff)
65{ 59{
diff --git a/drivers/s390/cio/chp.h b/drivers/s390/cio/chp.h
index 695ec20f1c59..12b4903d6fe3 100644
--- a/drivers/s390/cio/chp.h
+++ b/drivers/s390/cio/chp.h
@@ -52,6 +52,12 @@ struct channel_path {
52 void *cmg_chars; 52 void *cmg_chars;
53}; 53};
54 54
55/* Return channel_path struct for given chpid. */
56static inline struct channel_path *chpid_to_chp(struct chp_id chpid)
57{
58 return channel_subsystems[chpid.cssid]->chps[chpid.id];
59}
60
55int chp_get_status(struct chp_id chpid); 61int chp_get_status(struct chp_id chpid);
56u8 chp_get_sch_opm(struct subchannel *sch); 62u8 chp_get_sch_opm(struct subchannel *sch);
57int chp_is_registered(struct chp_id chpid); 63int chp_is_registered(struct chp_id chpid);
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index 27aca3906a53..44d7cc2f9738 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -495,6 +495,7 @@ __s390_vary_chpid_on(struct subchannel_id schid, void *data)
495 */ 495 */
496int chsc_chp_vary(struct chp_id chpid, int on) 496int chsc_chp_vary(struct chp_id chpid, int on)
497{ 497{
498 struct channel_path *chp = chpid_to_chp(chpid);
498 struct chp_link link; 499 struct chp_link link;
499 500
500 memset(&link, 0, sizeof(struct chp_link)); 501 memset(&link, 0, sizeof(struct chp_link));
@@ -504,11 +505,12 @@ int chsc_chp_vary(struct chp_id chpid, int on)
504 /* 505 /*
505 * Redo PathVerification on the devices the chpid connects to 506 * Redo PathVerification on the devices the chpid connects to
506 */ 507 */
507 508 if (on) {
508 if (on) 509 /* Try to update the channel path descritor. */
510 chsc_determine_base_channel_path_desc(chpid, &chp->desc);
509 for_each_subchannel_staged(s390_subchannel_vary_chpid_on, 511 for_each_subchannel_staged(s390_subchannel_vary_chpid_on,
510 __s390_vary_chpid_on, &link); 512 __s390_vary_chpid_on, &link);
511 else 513 } else
512 for_each_subchannel_staged(s390_subchannel_vary_chpid_off, 514 for_each_subchannel_staged(s390_subchannel_vary_chpid_off,
513 NULL, &link); 515 NULL, &link);
514 516