Skip to content

Commit

Permalink
[S390] Fix smsgiucv init on no iucv machines
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Borntraeger authored and Martin Schwidefsky committed Nov 5, 2007
1 parent 33583c3 commit 0fc3ddd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/s390/net/smsgiucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ static int __init smsg_init(void)
{
int rc;

if (!MACHINE_IS_VM) {
rc = -EPROTONOSUPPORT;
goto out;
}
rc = driver_register(&smsg_driver);
if (rc != 0)
goto out;
Expand Down

0 comments on commit 0fc3ddd

Please sign in to comment.