aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/css.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/css.c')
-rw-r--r--drivers/s390/cio/css.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index dfca0ef139fd..1c27a5a06b49 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -109,7 +109,7 @@ css_subchannel_release(struct device *dev)
109 } 109 }
110} 110}
111 111
112int css_sch_device_register(struct subchannel *sch) 112static int css_sch_device_register(struct subchannel *sch)
113{ 113{
114 int ret; 114 int ret;
115 115
@@ -184,8 +184,8 @@ static int css_register_subchannel(struct subchannel *sch)
184 /* make it known to the system */ 184 /* make it known to the system */
185 ret = css_sch_device_register(sch); 185 ret = css_sch_device_register(sch);
186 if (ret) { 186 if (ret) {
187 printk (KERN_WARNING "%s: could not register %s\n", 187 CIO_MSG_EVENT(0, "Could not register sch 0.%x.%04x: %d\n",
188 __func__, sch->dev.bus_id); 188 sch->schid.ssid, sch->schid.sch_no, ret);
189 return ret; 189 return ret;
190 } 190 }
191 return ret; 191 return ret;
@@ -371,15 +371,12 @@ static int __init slow_subchannel_init(void)
371 spin_lock_init(&slow_subchannel_lock); 371 spin_lock_init(&slow_subchannel_lock);
372 slow_subchannel_set = idset_sch_new(); 372 slow_subchannel_set = idset_sch_new();
373 if (!slow_subchannel_set) { 373 if (!slow_subchannel_set) {
374 printk(KERN_WARNING "cio: could not allocate slow subchannel " 374 CIO_MSG_EVENT(0, "could not allocate slow subchannel set\n");
375 "set\n");
376 return -ENOMEM; 375 return -ENOMEM;
377 } 376 }
378 return 0; 377 return 0;
379} 378}
380 379
381subsys_initcall(slow_subchannel_init);
382
383static void css_slow_path_func(struct work_struct *unused) 380static void css_slow_path_func(struct work_struct *unused)
384{ 381{
385 struct subchannel_id schid; 382 struct subchannel_id schid;
@@ -425,8 +422,8 @@ static int reprobe_subchannel(struct subchannel_id schid, void *data)
425 struct subchannel *sch; 422 struct subchannel *sch;
426 int ret; 423 int ret;
427 424
428 CIO_DEBUG(KERN_INFO, 6, "cio: reprobe 0.%x.%04x\n", 425 CIO_MSG_EVENT(6, "cio: reprobe 0.%x.%04x\n",
429 schid.ssid, schid.sch_no); 426 schid.ssid, schid.sch_no);
430 if (need_reprobe) 427 if (need_reprobe)
431 return -EAGAIN; 428 return -EAGAIN;
432 429
@@ -642,9 +639,20 @@ init_channel_subsystem (void)
642{ 639{
643 int ret, i; 640 int ret, i;
644 641
645 if (chsc_determine_css_characteristics() == 0) 642 ret = chsc_determine_css_characteristics();
643 if (ret == -ENOMEM)
644 goto out; /* No need to continue. */
645 if (ret == 0)
646 css_characteristics_avail = 1; 646 css_characteristics_avail = 1;
647 647
648 ret = chsc_alloc_sei_area();
649 if (ret)
650 goto out;
651
652 ret = slow_subchannel_init();
653 if (ret)
654 goto out;
655
648 if ((ret = bus_register(&css_bus_type))) 656 if ((ret = bus_register(&css_bus_type)))
649 goto out; 657 goto out;
650 658
@@ -710,6 +718,10 @@ out_unregister:
710out_bus: 718out_bus:
711 bus_unregister(&css_bus_type); 719 bus_unregister(&css_bus_type);
712out: 720out:
721 chsc_free_sei_area();
722 kfree(slow_subchannel_set);
723 printk(KERN_WARNING"cio: failed to initialize css driver (%d)!\n",
724 ret);
713 return ret; 725 return ret;
714} 726}
715 727