Lines Matching refs:xbs

277  * \param xbs  XenBus Bus device softc of the owner of the bus to enumerate.
283 xenbusb_enumerate_bus(struct xenbusb_softc *xbs)
290 error = xs_directory(XST_NIL, xbs->xbs_node, "", &type_count, &types);
295 XENBUSB_ENUMERATE_TYPE(xbs->xbs_dev, types[type_idx]);
412 * \param xbs XenBus Bus device softc of the owner of the bus to enumerate.
415 xenbusb_release_confighook(struct xenbusb_softc *xbs)
417 mtx_lock(&xbs->xbs_lock);
418 KASSERT(xbs->xbs_connecting_children > 0,
420 xbs->xbs_connecting_children--;
421 if (xbs->xbs_connecting_children == 0
422 && (xbs->xbs_flags & XBS_ATTACH_CH_ACTIVE) != 0) {
423 xbs->xbs_flags &= ~XBS_ATTACH_CH_ACTIVE;
424 mtx_unlock(&xbs->xbs_lock);
425 config_intrhook_disestablish(&xbs->xbs_attach_ch);
427 mtx_unlock(&xbs->xbs_lock);
460 struct xenbusb_softc *xbs;
477 xbs = device_get_softc(dev);
478 xenbusb_release_confighook(xbs);
561 struct xenbusb_softc *xbs;
569 xbs = (struct xenbusb_softc *)watch->callback_data;
570 dev = xbs->xbs_dev;
597 for (component = 0; component < xbs->xbs_id_components; component++) {
606 if (*id != 0 && component >= xbs->xbs_id_components - 1) {
607 xenbusb_add_device(xbs->xbs_dev, type, id);
608 taskqueue_enqueue(taskqueue_thread, &xbs->xbs_probe_children);
643 struct xenbusb_softc *xbs;
649 xbs = device_get_softc(dev);
651 sbuf_printf(devpath_sbuf, "%s/%s/%s", xbs->xbs_node, type, id);
710 mtx_lock(&xbs->xbs_lock);
711 xbs->xbs_connecting_children++;
712 mtx_unlock(&xbs->xbs_lock);
730 struct xenbusb_softc *xbs;
732 xbs = device_get_softc(dev);
733 mtx_init(&xbs->xbs_lock, "xenbusb softc lock", NULL, MTX_DEF);
734 xbs->xbs_node = bus_node;
735 xbs->xbs_id_components = id_components;
736 xbs->xbs_dev = dev;
747 xbs->xbs_attach_ch.ich_func = xenbusb_nop_confighook_cb;
748 xbs->xbs_attach_ch.ich_arg = dev;
749 config_intrhook_establish(&xbs->xbs_attach_ch);
750 xbs->xbs_flags |= XBS_ATTACH_CH_ACTIVE;
751 xbs->xbs_connecting_children = 1;
761 (void)xenbusb_enumerate_bus(xbs);
764 xbs->xbs_device_watch.node = bus_node;
765 xbs->xbs_device_watch.callback = xenbusb_devices_changed;
766 xbs->xbs_device_watch.callback_data = (uintptr_t)xbs;
768 TASK_INIT(&xbs->xbs_probe_children, 0, xenbusb_probe_children_cb, dev);
770 xs_register_watch(&xbs->xbs_device_watch);
772 xenbusb_release_confighook(xbs);
930 struct xenbusb_softc *xbs;
933 xbs = device_get_softc(dev);
934 xenbusb_release_confighook(xbs);