blob: 9e9d4a157a4cff1aa43465013a62e86d40a8ec27 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * drivers/s390/cio/css.c
3 * driver for channel subsystem
Cornelia Huckfb6958a2006-01-06 00:19:25 -08004 * $Revision: 1.93 $
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 *
6 * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
7 * IBM Corporation
8 * Author(s): Arnd Bergmann (arndb@de.ibm.com)
9 * Cornelia Huck (cohuck@de.ibm.com)
10 */
11#include <linux/module.h>
12#include <linux/init.h>
13#include <linux/device.h>
14#include <linux/slab.h>
15#include <linux/errno.h>
16#include <linux/list.h>
17
18#include "css.h"
19#include "cio.h"
20#include "cio_debug.h"
21#include "ioasm.h"
22#include "chsc.h"
23
Linus Torvalds1da177e2005-04-16 15:20:36 -070024int need_rescan = 0;
25int css_init_done = 0;
Cornelia Huckfb6958a2006-01-06 00:19:25 -080026static int max_ssid = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
Cornelia Hucka28c6942006-01-06 00:19:23 -080028struct channel_subsystem *css[__MAX_CSSID + 1];
Linus Torvalds1da177e2005-04-16 15:20:36 -070029
Cornelia Hucka28c6942006-01-06 00:19:23 -080030int css_characteristics_avail = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
Cornelia Huckf97a56f2006-01-06 00:19:22 -080032inline int
33for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *data)
34{
35 struct subchannel_id schid;
36 int ret;
37
38 init_subchannel_id(&schid);
39 ret = -ENODEV;
40 do {
Cornelia Huckfb6958a2006-01-06 00:19:25 -080041 do {
42 ret = fn(schid, data);
43 if (ret)
44 break;
45 } while (schid.sch_no++ < __MAX_SUBCHANNEL);
46 schid.sch_no = 0;
47 } while (schid.ssid++ < max_ssid);
Cornelia Huckf97a56f2006-01-06 00:19:22 -080048 return ret;
49}
50
Linus Torvalds1da177e2005-04-16 15:20:36 -070051static struct subchannel *
Cornelia Hucka8237fc2006-01-06 00:19:21 -080052css_alloc_subchannel(struct subchannel_id schid)
Linus Torvalds1da177e2005-04-16 15:20:36 -070053{
54 struct subchannel *sch;
55 int ret;
56
57 sch = kmalloc (sizeof (*sch), GFP_KERNEL | GFP_DMA);
58 if (sch == NULL)
59 return ERR_PTR(-ENOMEM);
Cornelia Hucka8237fc2006-01-06 00:19:21 -080060 ret = cio_validate_subchannel (sch, schid);
Linus Torvalds1da177e2005-04-16 15:20:36 -070061 if (ret < 0) {
62 kfree(sch);
63 return ERR_PTR(ret);
64 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070065
66 if (sch->st != SUBCHANNEL_TYPE_IO) {
67 /* For now we ignore all non-io subchannels. */
68 kfree(sch);
69 return ERR_PTR(-EINVAL);
70 }
71
72 /*
73 * Set intparm to subchannel address.
74 * This is fine even on 64bit since the subchannel is always located
75 * under 2G.
76 */
77 sch->schib.pmcw.intparm = (__u32)(unsigned long)sch;
78 ret = cio_modify(sch);
79 if (ret) {
80 kfree(sch);
81 return ERR_PTR(ret);
82 }
83 return sch;
84}
85
86static void
87css_free_subchannel(struct subchannel *sch)
88{
89 if (sch) {
90 /* Reset intparm to zeroes. */
91 sch->schib.pmcw.intparm = 0;
92 cio_modify(sch);
93 kfree(sch);
94 }
95
96}
97
98static void
99css_subchannel_release(struct device *dev)
100{
101 struct subchannel *sch;
102
103 sch = to_subchannel(dev);
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800104 if (!cio_is_console(sch->schid))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105 kfree(sch);
106}
107
108extern int css_get_ssd_info(struct subchannel *sch);
109
110static int
111css_register_subchannel(struct subchannel *sch)
112{
113 int ret;
114
115 /* Initialize the subchannel structure */
Cornelia Hucka28c6942006-01-06 00:19:23 -0800116 sch->dev.parent = &css[0]->device;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700117 sch->dev.bus = &css_bus_type;
118 sch->dev.release = &css_subchannel_release;
119
120 /* make it known to the system */
121 ret = device_register(&sch->dev);
122 if (ret)
123 printk (KERN_WARNING "%s: could not register %s\n",
124 __func__, sch->dev.bus_id);
125 else
126 css_get_ssd_info(sch);
127 return ret;
128}
129
130int
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800131css_probe_device(struct subchannel_id schid)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700132{
133 int ret;
134 struct subchannel *sch;
135
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800136 sch = css_alloc_subchannel(schid);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137 if (IS_ERR(sch))
138 return PTR_ERR(sch);
139 ret = css_register_subchannel(sch);
140 if (ret)
141 css_free_subchannel(sch);
142 return ret;
143}
144
Cornelia Huckb0744bd2005-06-25 14:55:27 -0700145static int
146check_subchannel(struct device * dev, void * data)
147{
148 struct subchannel *sch;
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800149 struct subchannel_id *schid = data;
Cornelia Huckb0744bd2005-06-25 14:55:27 -0700150
151 sch = to_subchannel(dev);
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800152 return schid_equal(&sch->schid, schid);
Cornelia Huckb0744bd2005-06-25 14:55:27 -0700153}
154
Linus Torvalds1da177e2005-04-16 15:20:36 -0700155struct subchannel *
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800156get_subchannel_by_schid(struct subchannel_id schid)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700157{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700158 struct device *dev;
159
Cornelia Huckb0744bd2005-06-25 14:55:27 -0700160 dev = bus_find_device(&css_bus_type, NULL,
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800161 (void *)&schid, check_subchannel);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162
Cornelia Huckb0744bd2005-06-25 14:55:27 -0700163 return dev ? to_subchannel(dev) : NULL;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700164}
165
Cornelia Huckb0744bd2005-06-25 14:55:27 -0700166
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167static inline int
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800168css_get_subchannel_status(struct subchannel *sch, struct subchannel_id schid)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700169{
170 struct schib schib;
171 int cc;
172
173 cc = stsch(schid, &schib);
174 if (cc)
175 return CIO_GONE;
176 if (!schib.pmcw.dnv)
177 return CIO_GONE;
178 if (sch && sch->schib.pmcw.dnv &&
179 (schib.pmcw.dev != sch->schib.pmcw.dev))
180 return CIO_REVALIDATE;
181 if (sch && !sch->lpm)
182 return CIO_NO_PATH;
183 return CIO_OPER;
184}
185
186static int
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800187css_evaluate_subchannel(struct subchannel_id schid, int slow)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700188{
189 int event, ret, disc;
190 struct subchannel *sch;
191 unsigned long flags;
192
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800193 sch = get_subchannel_by_schid(schid);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700194 disc = sch ? device_is_disconnected(sch) : 0;
195 if (disc && slow) {
196 if (sch)
197 put_device(&sch->dev);
198 return 0; /* Already processed. */
199 }
200 /*
201 * We've got a machine check, so running I/O won't get an interrupt.
202 * Kill any pending timers.
203 */
204 if (sch)
205 device_kill_pending_timer(sch);
206 if (!disc && !slow) {
207 if (sch)
208 put_device(&sch->dev);
209 return -EAGAIN; /* Will be done on the slow path. */
210 }
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800211 event = css_get_subchannel_status(sch, schid);
Cornelia Huckfb6958a2006-01-06 00:19:25 -0800212 CIO_MSG_EVENT(4, "Evaluating schid 0.%x.%04x, event %d, %s, %s path.\n",
213 schid.ssid, schid.sch_no, event,
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800214 sch?(disc?"disconnected":"normal"):"unknown",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700215 slow?"slow":"fast");
216 switch (event) {
217 case CIO_NO_PATH:
218 case CIO_GONE:
219 if (!sch) {
220 /* Never used this subchannel. Ignore. */
221 ret = 0;
222 break;
223 }
224 if (disc && (event == CIO_NO_PATH)) {
225 /*
226 * Uargh, hack again. Because we don't get a machine
227 * check on configure on, our path bookkeeping can
228 * be out of date here (it's fine while we only do
229 * logical varying or get chsc machine checks). We
230 * need to force reprobing or we might miss devices
231 * coming operational again. It won't do harm in real
232 * no path situations.
233 */
234 spin_lock_irqsave(&sch->lock, flags);
235 device_trigger_reprobe(sch);
236 spin_unlock_irqrestore(&sch->lock, flags);
237 ret = 0;
238 break;
239 }
240 if (sch->driver && sch->driver->notify &&
241 sch->driver->notify(&sch->dev, event)) {
242 cio_disable_subchannel(sch);
243 device_set_disconnected(sch);
244 ret = 0;
245 break;
246 }
247 /*
248 * Unregister subchannel.
249 * The device will be killed automatically.
250 */
251 cio_disable_subchannel(sch);
252 device_unregister(&sch->dev);
253 /* Reset intparm to zeroes. */
254 sch->schib.pmcw.intparm = 0;
255 cio_modify(sch);
256 put_device(&sch->dev);
257 ret = 0;
258 break;
259 case CIO_REVALIDATE:
260 /*
261 * Revalidation machine check. Sick.
262 * We don't notify the driver since we have to throw the device
263 * away in any case.
264 */
265 if (!disc) {
266 device_unregister(&sch->dev);
267 /* Reset intparm to zeroes. */
268 sch->schib.pmcw.intparm = 0;
269 cio_modify(sch);
270 put_device(&sch->dev);
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800271 ret = css_probe_device(schid);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272 } else {
273 /*
274 * We can't immediately deregister the disconnected
275 * device since it might block.
276 */
277 spin_lock_irqsave(&sch->lock, flags);
278 device_trigger_reprobe(sch);
279 spin_unlock_irqrestore(&sch->lock, flags);
280 ret = 0;
281 }
282 break;
283 case CIO_OPER:
284 if (disc) {
285 spin_lock_irqsave(&sch->lock, flags);
286 /* Get device operational again. */
287 device_trigger_reprobe(sch);
288 spin_unlock_irqrestore(&sch->lock, flags);
289 }
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800290 ret = sch ? 0 : css_probe_device(schid);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700291 break;
292 default:
293 BUG();
294 ret = 0;
295 }
296 return ret;
297}
298
Cornelia Huckf97a56f2006-01-06 00:19:22 -0800299static int
300css_rescan_devices(struct subchannel_id schid, void *data)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700301{
Cornelia Huckf97a56f2006-01-06 00:19:22 -0800302 return css_evaluate_subchannel(schid, 1);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700303}
304
305struct slow_subchannel {
306 struct list_head slow_list;
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800307 struct subchannel_id schid;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700308};
309
310static LIST_HEAD(slow_subchannels_head);
311static DEFINE_SPINLOCK(slow_subchannel_lock);
312
313static void
314css_trigger_slow_path(void)
315{
316 CIO_TRACE_EVENT(4, "slowpath");
317
318 if (need_rescan) {
319 need_rescan = 0;
Cornelia Huckf97a56f2006-01-06 00:19:22 -0800320 for_each_subchannel(css_rescan_devices, NULL);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700321 return;
322 }
323
324 spin_lock_irq(&slow_subchannel_lock);
325 while (!list_empty(&slow_subchannels_head)) {
326 struct slow_subchannel *slow_sch =
327 list_entry(slow_subchannels_head.next,
328 struct slow_subchannel, slow_list);
329
330 list_del_init(slow_subchannels_head.next);
331 spin_unlock_irq(&slow_subchannel_lock);
332 css_evaluate_subchannel(slow_sch->schid, 1);
333 spin_lock_irq(&slow_subchannel_lock);
334 kfree(slow_sch);
335 }
336 spin_unlock_irq(&slow_subchannel_lock);
337}
338
339typedef void (*workfunc)(void *);
340DECLARE_WORK(slow_path_work, (workfunc)css_trigger_slow_path, NULL);
341struct workqueue_struct *slow_path_wq;
342
343/*
344 * Rescan for new devices. FIXME: This is slow.
345 * This function is called when we have lost CRWs due to overflows and we have
346 * to do subchannel housekeeping.
347 */
348void
349css_reiterate_subchannels(void)
350{
351 css_clear_subchannel_slow_list();
352 need_rescan = 1;
353}
354
355/*
356 * Called from the machine check handler for subchannel report words.
357 */
358int
Cornelia Huckfb6958a2006-01-06 00:19:25 -0800359css_process_crw(int rsid1, int rsid2)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700360{
361 int ret;
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800362 struct subchannel_id mchk_schid;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700363
Cornelia Huckfb6958a2006-01-06 00:19:25 -0800364 CIO_CRW_EVENT(2, "source is subchannel %04X, subsystem id %x\n",
365 rsid1, rsid2);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700366
367 if (need_rescan)
368 /* We need to iterate all subchannels anyway. */
369 return -EAGAIN;
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800370
371 init_subchannel_id(&mchk_schid);
Cornelia Huckfb6958a2006-01-06 00:19:25 -0800372 mchk_schid.sch_no = rsid1;
373 if (rsid2 != 0)
374 mchk_schid.ssid = (rsid2 >> 8) & 3;
375
Linus Torvalds1da177e2005-04-16 15:20:36 -0700376 /*
377 * Since we are always presented with IPI in the CRW, we have to
378 * use stsch() to find out if the subchannel in question has come
379 * or gone.
380 */
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800381 ret = css_evaluate_subchannel(mchk_schid, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700382 if (ret == -EAGAIN) {
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800383 if (css_enqueue_subchannel_slow(mchk_schid)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700384 css_clear_subchannel_slow_list();
385 need_rescan = 1;
386 }
387 }
388 return ret;
389}
390
Cornelia Huckf97a56f2006-01-06 00:19:22 -0800391static int __init
392__init_channel_subsystem(struct subchannel_id schid, void *data)
393{
394 struct subchannel *sch;
395 int ret;
396
397 if (cio_is_console(schid))
398 sch = cio_get_console_subchannel();
399 else {
400 sch = css_alloc_subchannel(schid);
401 if (IS_ERR(sch))
402 ret = PTR_ERR(sch);
403 else
404 ret = 0;
405 switch (ret) {
406 case 0:
407 break;
408 case -ENOMEM:
409 panic("Out of memory in init_channel_subsystem\n");
410 /* -ENXIO: no more subchannels. */
411 case -ENXIO:
412 return ret;
413 default:
414 return 0;
415 }
416 }
417 /*
418 * We register ALL valid subchannels in ioinfo, even those
419 * that have been present before init_channel_subsystem.
420 * These subchannels can't have been registered yet (kmalloc
421 * not working) so we do it now. This is true e.g. for the
422 * console subchannel.
423 */
424 css_register_subchannel(sch);
425 return 0;
426}
427
Linus Torvalds1da177e2005-04-16 15:20:36 -0700428static void __init
Cornelia Hucka28c6942006-01-06 00:19:23 -0800429css_generate_pgid(struct channel_subsystem *css, u32 tod_high)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700430{
Cornelia Hucka28c6942006-01-06 00:19:23 -0800431 if (css_characteristics_avail && css_general_characteristics.mcss) {
432 css->global_pgid.pgid_high.ext_cssid.version = 0x80;
433 css->global_pgid.pgid_high.ext_cssid.cssid = css->cssid;
434 } else {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700435#ifdef CONFIG_SMP
Cornelia Hucka28c6942006-01-06 00:19:23 -0800436 css->global_pgid.pgid_high.cpu_addr = hard_smp_processor_id();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700437#else
Cornelia Hucka28c6942006-01-06 00:19:23 -0800438 css->global_pgid.pgid_high.cpu_addr = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700439#endif
440 }
Cornelia Hucka28c6942006-01-06 00:19:23 -0800441 css->global_pgid.cpu_id = ((cpuid_t *) __LC_CPUID)->ident;
442 css->global_pgid.cpu_model = ((cpuid_t *) __LC_CPUID)->machine;
443 css->global_pgid.tod_high = tod_high;
444
445}
446
447static inline void __init
448setup_css(int nr)
449{
450 u32 tod_high;
451
452 memset(css[nr], 0, sizeof(struct channel_subsystem));
453 css[nr]->valid = 1;
454 css[nr]->cssid = nr;
455 sprintf(css[nr]->device.bus_id, "css%x", nr);
456 tod_high = (u32) (get_clock() >> 32);
457 css_generate_pgid(css[nr], tod_high);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700458}
459
460/*
461 * Now that the driver core is running, we can setup our channel subsystem.
462 * The struct subchannel's are created during probing (except for the
463 * static console subchannel).
464 */
465static int __init
466init_channel_subsystem (void)
467{
Cornelia Hucka28c6942006-01-06 00:19:23 -0800468 int ret, i;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700469
470 if (chsc_determine_css_characteristics() == 0)
471 css_characteristics_avail = 1;
472
Linus Torvalds1da177e2005-04-16 15:20:36 -0700473 if ((ret = bus_register(&css_bus_type)))
474 goto out;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700475
Cornelia Huckfb6958a2006-01-06 00:19:25 -0800476 /* Try to enable MSS. */
477 ret = chsc_enable_facility(CHSC_SDA_OC_MSS);
478 switch (ret) {
479 case 0: /* Success. */
480 max_ssid = __MAX_SSID;
481 break;
482 case -ENOMEM:
483 goto out_bus;
484 default:
485 max_ssid = 0;
486 }
Cornelia Hucka28c6942006-01-06 00:19:23 -0800487 /* Setup css structure. */
488 for (i = 0; i <= __MAX_CSSID; i++) {
489 css[i] = kmalloc(sizeof(struct channel_subsystem), GFP_KERNEL);
490 if (!css[i]) {
491 ret = -ENOMEM;
Cornelia Huckfb6958a2006-01-06 00:19:25 -0800492 goto out_unregister;
Cornelia Hucka28c6942006-01-06 00:19:23 -0800493 }
494 setup_css(i);
495 ret = device_register(&css[i]->device);
496 if (ret)
497 goto out_free;
498 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700499 css_init_done = 1;
500
501 ctl_set_bit(6, 28);
502
Cornelia Huckf97a56f2006-01-06 00:19:22 -0800503 for_each_subchannel(__init_channel_subsystem, NULL);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700504 return 0;
Cornelia Hucka28c6942006-01-06 00:19:23 -0800505out_free:
506 kfree(css[i]);
Cornelia Huckfb6958a2006-01-06 00:19:25 -0800507out_unregister:
Cornelia Hucka28c6942006-01-06 00:19:23 -0800508 while (i > 0) {
509 i--;
510 device_unregister(&css[i]->device);
511 }
Cornelia Huckfb6958a2006-01-06 00:19:25 -0800512out_bus:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700513 bus_unregister(&css_bus_type);
514out:
515 return ret;
516}
517
518/*
519 * find a driver for a subchannel. They identify by the subchannel
520 * type with the exception that the console subchannel driver has its own
521 * subchannel type although the device is an i/o subchannel
522 */
523static int
524css_bus_match (struct device *dev, struct device_driver *drv)
525{
526 struct subchannel *sch = container_of (dev, struct subchannel, dev);
527 struct css_driver *driver = container_of (drv, struct css_driver, drv);
528
529 if (sch->st == driver->subchannel_type)
530 return 1;
531
532 return 0;
533}
534
535struct bus_type css_bus_type = {
536 .name = "css",
537 .match = &css_bus_match,
538};
539
540subsys_initcall(init_channel_subsystem);
541
Linus Torvalds1da177e2005-04-16 15:20:36 -0700542int
Cornelia Hucka8237fc2006-01-06 00:19:21 -0800543css_enqueue_subchannel_slow(struct subchannel_id schid)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700544{
545 struct slow_subchannel *new_slow_sch;
546 unsigned long flags;
547
548 new_slow_sch = kmalloc(sizeof(struct slow_subchannel), GFP_ATOMIC);
549 if (!new_slow_sch)
550 return -ENOMEM;
551 memset(new_slow_sch, 0, sizeof(struct slow_subchannel));
552 new_slow_sch->schid = schid;
553 spin_lock_irqsave(&slow_subchannel_lock, flags);
554 list_add_tail(&new_slow_sch->slow_list, &slow_subchannels_head);
555 spin_unlock_irqrestore(&slow_subchannel_lock, flags);
556 return 0;
557}
558
559void
560css_clear_subchannel_slow_list(void)
561{
562 unsigned long flags;
563
564 spin_lock_irqsave(&slow_subchannel_lock, flags);
565 while (!list_empty(&slow_subchannels_head)) {
566 struct slow_subchannel *slow_sch =
567 list_entry(slow_subchannels_head.next,
568 struct slow_subchannel, slow_list);
569
570 list_del_init(slow_subchannels_head.next);
571 kfree(slow_sch);
572 }
573 spin_unlock_irqrestore(&slow_subchannel_lock, flags);
574}
575
576
577
578int
579css_slow_subchannels_exist(void)
580{
581 return (!list_empty(&slow_subchannels_head));
582}
583
584MODULE_LICENSE("GPL");
585EXPORT_SYMBOL(css_bus_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700586EXPORT_SYMBOL_GPL(css_characteristics_avail);