Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165335
b: refs/heads/master
c: b0a285d
h: refs/heads/master
i:
  165333: 66af07f
  165331: d2b5e7e
  165327: 199b99f
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Sep 22, 2009
1 parent bc74a9f commit c2bab9d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 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: b827d1c8b65b27a293433e7c4723c7dfd6c4b848
refs/heads/master: b0a285d31bd475fdd4312e457288be558b705e55
26 changes: 13 additions & 13 deletions trunk/drivers/s390/cio/css.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

int css_init_done = 0;
static int need_reprobe = 0;
static int max_ssid = 0;
int max_ssid;

struct channel_subsystem *channel_subsystems[__MAX_CSSID + 1];

Expand Down Expand Up @@ -879,6 +879,18 @@ static int __init css_bus_init(void)
if (ret)
goto out;

/* Try to enable MSS. */
ret = chsc_enable_facility(CHSC_SDA_OC_MSS);
switch (ret) {
case 0: /* Success. */
max_ssid = __MAX_SSID;
break;
case -ENOMEM:
goto out;
default:
max_ssid = 0;
}

ret = slow_subchannel_init();
if (ret)
goto out;
Expand All @@ -890,17 +902,6 @@ static int __init css_bus_init(void)
if ((ret = bus_register(&css_bus_type)))
goto out;

/* Try to enable MSS. */
ret = chsc_enable_facility(CHSC_SDA_OC_MSS);
switch (ret) {
case 0: /* Success. */
max_ssid = __MAX_SSID;
break;
case -ENOMEM:
goto out_bus;
default:
max_ssid = 0;
}
/* Setup css structure. */
for (i = 0; i <= __MAX_CSSID; i++) {
struct channel_subsystem *css;
Expand Down Expand Up @@ -966,7 +967,6 @@ static int __init css_bus_init(void)
&dev_attr_cm_enable);
device_unregister(&css->device);
}
out_bus:
bus_unregister(&css_bus_type);
out:
crw_unregister_handler(CRW_RSC_CSS);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/s390/cio/css.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ extern void css_sch_device_unregister(struct subchannel *);
extern int css_probe_device(struct subchannel_id);
extern struct subchannel *get_subchannel_by_schid(struct subchannel_id);
extern int css_init_done;
extern int max_ssid;
int for_each_subchannel_staged(int (*fn_known)(struct subchannel *, void *),
int (*fn_unknown)(struct subchannel_id,
void *), void *data);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/cio/idset.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static inline int idset_get_first(struct idset *set, int *ssid, int *id)

struct idset *idset_sch_new(void)
{
return idset_new(__MAX_SSID + 1, __MAX_SUBCHANNEL + 1);
return idset_new(max_ssid + 1, __MAX_SUBCHANNEL + 1);
}

void idset_sch_add(struct idset *set, struct subchannel_id schid)
Expand Down

0 comments on commit c2bab9d

Please sign in to comment.