From e2e0de9b579d4772c2b86e6c9517723ad1e2b22a Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Fri, 17 Jun 2016 19:45:23 +0200 Subject: s390/cio: use cssid for pgid generation Obtain the real channel subsystem id and use that for the generation of a unique path group id. Note that this change does not affect the channel subsystem id as used in the user-visible naming of subchannels and friends. Signed-off-by: Sebastian Ott Reviewed-by: Dong Jia Shi Reviewed-by: Peter Oberparleiter Reviewed-by: Cornelia Huck Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/css.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/s390/cio/css.c') diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 065c4e1d4cf4..13fea905c61a 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -703,7 +703,8 @@ css_generate_pgid(struct channel_subsystem *css, u32 tod_high) if (css_general_characteristics.mcss) { css->global_pgid.pgid_high.ext_cssid.version = 0x80; - css->global_pgid.pgid_high.ext_cssid.cssid = css->cssid; + css->global_pgid.pgid_high.ext_cssid.cssid = + (css->cssid < 0) ? 0 : css->cssid; } else { css->global_pgid.pgid_high.cpu_addr = stap(); } @@ -794,7 +795,8 @@ static int __init setup_css(int nr) } mutex_init(&css->mutex); css->valid = 1; - css->cssid = nr; + css->cssid = chsc_get_cssid(nr); + dev_set_name(&css->device, "css%x", nr); css->device.release = channel_subsystem_release; tod_high = (u32) (get_tod_clock() >> 32); -- cgit v1.2.3-55-g7522