Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Sebastian Ott and committed by
Martin Schwidefsky
c38a90a3 906c9768

+11 -9
-6
drivers/s390/cio/chp.c
··· 54 54 /* Wait queue for configure completion events. */ 55 55 static wait_queue_head_t cfg_wait_queue; 56 56 57 - /* Return channel_path struct for given chpid. */ 58 - static inline struct channel_path *chpid_to_chp(struct chp_id chpid) 59 - { 60 - return channel_subsystems[chpid.cssid]->chps[chpid.id]; 61 - } 62 - 63 57 /* Set vary state for given chpid. */ 64 58 static void set_chp_logically_online(struct chp_id chpid, int onoff) 65 59 {
+6
drivers/s390/cio/chp.h
··· 52 52 void *cmg_chars; 53 53 }; 54 54 55 + /* Return channel_path struct for given chpid. */ 56 + static inline struct channel_path *chpid_to_chp(struct chp_id chpid) 57 + { 58 + return channel_subsystems[chpid.cssid]->chps[chpid.id]; 59 + } 60 + 55 61 int chp_get_status(struct chp_id chpid); 56 62 u8 chp_get_sch_opm(struct subchannel *sch); 57 63 int chp_is_registered(struct chp_id chpid);
+5 -3
drivers/s390/cio/chsc.c
··· 495 495 */ 496 496 int chsc_chp_vary(struct chp_id chpid, int on) 497 497 { 498 + struct channel_path *chp = chpid_to_chp(chpid); 498 499 struct chp_link link; 499 500 500 501 memset(&link, 0, sizeof(struct chp_link)); ··· 505 504 /* 506 505 * Redo PathVerification on the devices the chpid connects to 507 506 */ 508 - 509 - if (on) 507 + if (on) { 508 + /* Try to update the channel path descritor. */ 509 + chsc_determine_base_channel_path_desc(chpid, &chp->desc); 510 510 for_each_subchannel_staged(s390_subchannel_vary_chpid_on, 511 511 __s390_vary_chpid_on, &link); 512 - else 512 + } else 513 513 for_each_subchannel_staged(s390_subchannel_vary_chpid_off, 514 514 NULL, &link); 515 515