Lines Matching defs:xbs

274  * \param xbs  XenBus Bus device softc of the owner of the bus to enumerate.
280 xenbusb_enumerate_bus(struct xenbusb_softc *xbs)
287 error = xs_directory(XST_NIL, xbs->xbs_node, "", &type_count, &types);
292 XENBUSB_ENUMERATE_TYPE(xbs->xbs_dev, types[type_idx]);
409 * \param xbs XenBus Bus device softc of the owner of the bus to enumerate.
412 xenbusb_release_confighook(struct xenbusb_softc *xbs)
414 mtx_lock(&xbs->xbs_lock);
415 KASSERT(xbs->xbs_connecting_children > 0,
417 xbs->xbs_connecting_children--;
418 if (xbs->xbs_connecting_children == 0
419 && (xbs->xbs_flags & XBS_ATTACH_CH_ACTIVE) != 0) {
420 xbs->xbs_flags &= ~XBS_ATTACH_CH_ACTIVE;
421 mtx_unlock(&xbs->xbs_lock);
422 config_intrhook_disestablish(&xbs->xbs_attach_ch);
424 mtx_unlock(&xbs->xbs_lock);
457 struct xenbusb_softc *xbs;
474 xbs = device_get_softc(dev);
475 xenbusb_release_confighook(xbs);
555 struct xenbusb_softc *xbs;
563 xbs = (struct xenbusb_softc *)watch->callback_data;
564 dev = xbs->xbs_dev;
591 for (component = 0; component < xbs->xbs_id_components; component++) {
600 if (*id != 0 && component >= xbs->xbs_id_components - 1) {
601 xenbusb_add_device(xbs->xbs_dev, type, id);
602 taskqueue_enqueue(taskqueue_thread, &xbs->xbs_probe_children);
637 struct xenbusb_softc *xbs;
643 xbs = device_get_softc(dev);
645 sbuf_printf(devpath_sbuf, "%s/%s/%s", xbs->xbs_node, type, id);
715 mtx_lock(&xbs->xbs_lock);
716 xbs->xbs_connecting_children++;
717 mtx_unlock(&xbs->xbs_lock);
735 struct xenbusb_softc *xbs;
737 xbs = device_get_softc(dev);
738 mtx_init(&xbs->xbs_lock, "xenbusb softc lock", NULL, MTX_DEF);
739 xbs->xbs_node = bus_node;
740 xbs->xbs_id_components = id_components;
741 xbs->xbs_dev = dev;
752 xbs->xbs_attach_ch.ich_func = xenbusb_nop_confighook_cb;
753 xbs->xbs_attach_ch.ich_arg = dev;
754 config_intrhook_establish(&xbs->xbs_attach_ch);
755 xbs->xbs_flags |= XBS_ATTACH_CH_ACTIVE;
756 xbs->xbs_connecting_children = 1;
766 (void)xenbusb_enumerate_bus(xbs);
769 xbs->xbs_device_watch.node = bus_node;
770 xbs->xbs_device_watch.callback = xenbusb_devices_changed;
771 xbs->xbs_device_watch.callback_data = (uintptr_t)xbs;
777 xbs->xbs_device_watch.max_pending = 0;
779 TASK_INIT(&xbs->xbs_probe_children, 0, xenbusb_probe_children_cb, dev);
781 xs_register_watch(&xbs->xbs_device_watch);
783 xenbusb_release_confighook(xbs);
950 struct xenbusb_softc *xbs;
953 xbs = device_get_softc(dev);
954 xenbusb_release_confighook(xbs);