diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2007-11-05 05:10:08 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-11-05 05:10:16 -0500 |
commit | 0fc3ddd67a6781238b038165d9dd8c1f9ba81111 (patch) | |
tree | 84058cff756c8424c4ee06edfc3db81fbee80075 | |
parent | 33583c3657ef30cd7f4cb563071ac23cb6ff69a0 (diff) |
[S390] Fix smsgiucv init on no iucv machines
smsgiucv is a driver that relies on iucv to work properly. If
iucv ans smsgiucv are compiled into the kernel and run on an
lpar the following scenario happens:
iucv is initialized early as a subsystem. It checks for z/VM and
returns with EPROTONOTSUPPORT. Later smsgiucv tries to run
driver_register with iucv_bus as bus. As this bus is not
initialized the driver core and list debugging issue several
warnings and oopses.
Solution is to let smsgiucv also check for z/VM and return
EPROTONOTSUPPORT as well.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/net/smsgiucv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c index 3ccca5871fdf..47bb47b48581 100644 --- a/drivers/s390/net/smsgiucv.c +++ b/drivers/s390/net/smsgiucv.c | |||
@@ -148,6 +148,10 @@ static int __init smsg_init(void) | |||
148 | { | 148 | { |
149 | int rc; | 149 | int rc; |
150 | 150 | ||
151 | if (!MACHINE_IS_VM) { | ||
152 | rc = -EPROTONOSUPPORT; | ||
153 | goto out; | ||
154 | } | ||
151 | rc = driver_register(&smsg_driver); | 155 | rc = driver_register(&smsg_driver); |
152 | if (rc != 0) | 156 | if (rc != 0) |
153 | goto out; | 157 | goto out; |