Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67610
b: refs/heads/master
c: a55360d
h: refs/heads/master
v: v3
  • Loading branch information
Cornelia Huck authored and Martin Schwidefsky committed Oct 12, 2007
1 parent 2f72a4a commit 38d72c5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0ea22c3d912de6044f83b07dcc26ee006106139
refs/heads/master: a55360df406cca797ac07d722688dd7ec29bf46e
29 changes: 29 additions & 0 deletions trunk/drivers/s390/cio/css.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/list.h>
#include <linux/reboot.h>

#include "css.h"
#include "cio.h"
Expand Down Expand Up @@ -632,6 +633,29 @@ static int __init setup_css(int nr)
return 0;
}

static int css_reboot_event(struct notifier_block *this,
unsigned long event,
void *ptr)
{
int ret, i;

ret = NOTIFY_DONE;
for (i = 0; i <= __MAX_CSSID; i++) {
struct channel_subsystem *css;

css = channel_subsystems[i];
if (css->cm_enabled)
if (chsc_secm(css, 0))
ret = NOTIFY_BAD;
}

return ret;
}

static struct notifier_block css_reboot_notifier = {
.notifier_call = css_reboot_event,
};

/*
* Now that the driver core is running, we can setup our channel subsystem.
* The struct subchannel's are created during probing (except for the
Expand Down Expand Up @@ -697,12 +721,17 @@ init_channel_subsystem (void)
if (ret)
goto out_file;
}
ret = register_reboot_notifier(&css_reboot_notifier);
if (ret)
goto out_pseudo;
css_init_done = 1;

ctl_set_bit(6, 28);

for_each_subchannel(__init_channel_subsystem, NULL);
return 0;
out_pseudo:
device_unregister(&channel_subsystems[i]->pseudo_subchannel->dev);
out_file:
device_remove_file(&channel_subsystems[i]->device,
&dev_attr_cm_enable);
Expand Down

0 comments on commit 38d72c5

Please sign in to comment.