Re: [patch 16/17] s390: multiple subchannel sets support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Running linux-2.6.16-rc4 on the hercules s390x emulator we noticed a
boatload of program checks on the stsch instruction, 192K to be exact.
Hercules does not support multiple subchannel sets at this time.
However, __init_channel_subsystem does not recognize the -EIO return
code from css_alloc_subchannel.

Further investigation shows that this would have been avoided if the
response code from the chsc instruction was properly handled.  In this
case chsc_enable_facility should have returned -EINVAL causing
init_channel_subsystem to set max_ssid to zero.  But the response code
0x0002 (invalid request) is not checked and chsc_enable_facility returns
0 causing max_ssid to be set to __MAX_SSID.

I have verified that on a real machine that does not support multiple
channel sets (a 9672) the CHSC_SDA_OC_MSS chsc request gets response
code 0x0002.  The emulator also sets the response code to 0x0002.

Users of the emulator can do `pgmtrace -15' to supress the 3.7 million
or so lines it spits out ;-)

Greg Smith

--- linux-2.6.16-rc4/drivers/s390/cio/css.c.orig	2006-02-23 17:59:08.000000000 -0500
+++ linux-2.6.16-rc4/drivers/s390/cio/css.c	2006-02-24 12:44:09.000000000 -0500
@@ -409,6 +409,9 @@
 		/* -ENXIO: no more subchannels. */
 		case -ENXIO:
 			return ret;
+		/* -EIO: this subchannel set not supported. */
+		case -EIO:
+			return ret;
 		default:
 			return 0;
 		}


--- linux-2.6.16-rc4/drivers/s390/cio/chsc.c.orig	2006-02-23 17:59:08.000000000 -0500
+++ linux-2.6.16-rc4/drivers/s390/cio/chsc.c	2006-02-25 05:43:24.000000000 -0500
@@ -1115,6 +1115,7 @@
 		goto out;
 	}
 	switch (sda_area->response.code) {
+	case 0x0002: /* invalid request */
 	case 0x0003: /* invalid request block */
 	case 0x0007:
 		ret = -EINVAL;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux