Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63105
b: refs/heads/master
c: 4434a38
h: refs/heads/master
i:
  63103: fce669c
v: v3
  • Loading branch information
Cornelia Huck authored and Martin Schwidefsky committed Jul 27, 2007
1 parent f77ef96 commit 21ec860
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 303fa9e39605c1d56971dd22cd04d2186dc42c98
refs/heads/master: 4434a38c37dd30e5cd01456a136367a43d8da2dd
10 changes: 6 additions & 4 deletions trunk/drivers/s390/cio/chsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,7 @@ int chsc_get_channel_measurement_chars(struct channel_path *chp)
return ret;
}

static int __init
chsc_alloc_sei_area(void)
int __init chsc_alloc_sei_area(void)
{
sei_page = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
if (!sei_page)
Expand All @@ -1000,6 +999,11 @@ chsc_alloc_sei_area(void)
return (sei_page ? 0 : -ENOMEM);
}

void __init chsc_free_sei_area(void)
{
kfree(sei_page);
}

int __init
chsc_enable_facility(int operation_code)
{
Expand Down Expand Up @@ -1051,8 +1055,6 @@ chsc_enable_facility(int operation_code)
return ret;
}

subsys_initcall(chsc_alloc_sei_area);

struct css_general_char css_general_characteristics;
struct css_chsc_char css_chsc_characteristics;

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/s390/cio/chsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ extern int chsc_get_ssd_info(struct subchannel_id schid,
struct chsc_ssd_info *ssd);
extern int chsc_determine_css_characteristics(void);
extern int css_characteristics_avail;
extern int chsc_alloc_sei_area(void);
extern void chsc_free_sei_area(void);

extern int chsc_enable_facility(int);
struct channel_subsystem;
Expand Down
19 changes: 16 additions & 3 deletions trunk/drivers/s390/cio/css.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,6 @@ static int __init slow_subchannel_init(void)
return 0;
}

subsys_initcall(slow_subchannel_init);

static void css_slow_path_func(struct work_struct *unused)
{
struct subchannel_id schid;
Expand Down Expand Up @@ -641,9 +639,20 @@ init_channel_subsystem (void)
{
int ret, i;

if (chsc_determine_css_characteristics() == 0)
ret = chsc_determine_css_characteristics();
if (ret == -ENOMEM)
goto out; /* No need to continue. */
if (ret == 0)
css_characteristics_avail = 1;

ret = chsc_alloc_sei_area();
if (ret)
goto out;

ret = slow_subchannel_init();
if (ret)
goto out;

if ((ret = bus_register(&css_bus_type)))
goto out;

Expand Down Expand Up @@ -709,6 +718,10 @@ init_channel_subsystem (void)
out_bus:
bus_unregister(&css_bus_type);
out:
chsc_free_sei_area();
kfree(slow_subchannel_set);
printk(KERN_WARNING"cio: failed to initialize css driver (%d)!\n",
ret);
return ret;
}

Expand Down

0 comments on commit 21ec860

Please sign in to comment.