]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[S390] cio: update descriptor in chsc_chp_vary
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Mon, 25 Oct 2010 14:10:31 +0000 (16:10 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 25 Oct 2010 14:10:18 +0000 (16:10 +0200)
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>
drivers/s390/cio/chp.c
drivers/s390/cio/chp.h
drivers/s390/cio/chsc.c

index b1addd78689dc0f57b44964944e3de3598d2a443..2d32233943a917c7f6ae9949122a78e3f962a60c 100644 (file)
@@ -54,12 +54,6 @@ static struct work_struct cfg_work;
 /* Wait queue for configure completion events. */
 static wait_queue_head_t cfg_wait_queue;
 
-/* Return channel_path struct for given chpid. */
-static inline struct channel_path *chpid_to_chp(struct chp_id chpid)
-{
-       return channel_subsystems[chpid.cssid]->chps[chpid.id];
-}
-
 /* Set vary state for given chpid. */
 static void set_chp_logically_online(struct chp_id chpid, int onoff)
 {
index 695ec20f1c598f22ee560f03f6fd647bc2cdcbad..12b4903d6fe373f171b83a8a8a7d9ffc2e9a8b26 100644 (file)
@@ -52,6 +52,12 @@ struct channel_path {
        void *cmg_chars;
 };
 
+/* Return channel_path struct for given chpid. */
+static inline struct channel_path *chpid_to_chp(struct chp_id chpid)
+{
+       return channel_subsystems[chpid.cssid]->chps[chpid.id];
+}
+
 int chp_get_status(struct chp_id chpid);
 u8 chp_get_sch_opm(struct subchannel *sch);
 int chp_is_registered(struct chp_id chpid);
index 27aca3906a53550e10d87730c42da1a2a4a129a6..44d7cc2f9738dcf389c0dba5ad53bcd49730beb3 100644 (file)
@@ -495,6 +495,7 @@ __s390_vary_chpid_on(struct subchannel_id schid, void *data)
  */
 int chsc_chp_vary(struct chp_id chpid, int on)
 {
+       struct channel_path *chp = chpid_to_chp(chpid);
        struct chp_link link;
 
        memset(&link, 0, sizeof(struct chp_link));
@@ -504,11 +505,12 @@ int chsc_chp_vary(struct chp_id chpid, int on)
        /*
         * Redo PathVerification on the devices the chpid connects to
         */
-
-       if (on)
+       if (on) {
+               /* Try to update the channel path descritor. */
+               chsc_determine_base_channel_path_desc(chpid, &chp->desc);
                for_each_subchannel_staged(s390_subchannel_vary_chpid_on,
                                           __s390_vary_chpid_on, &link);
-       else
+       else
                for_each_subchannel_staged(s390_subchannel_vary_chpid_off,
                                           NULL, &link);