Lines Matching full:ppb

290 	struct ppb_data * ppb = (struct ppb_data *)device_get_softc(bus);  in ppb_scan_bus()  local
301 if ((ppb->state == PPB_ERROR) && (ppb->error == PPB_NOT_IEEE1284)) in ppb_scan_bus()
369 ppb->class_id = ppb_pnp_detect(bus); in ppb_scan_bus()
382 struct ppb_data *ppb = device_get_softc(dev); in ppbus_attach() local
386 (uintptr_t *)&ppb->ppc_lock); in ppbus_attach()
393 ppb->ppc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, in ppbus_attach()
395 if (ppb->ppc_irq_res != NULL) { in ppbus_attach()
396 mtx_lock(ppb->ppc_lock); in ppbus_attach()
399 mtx_unlock(ppb->ppc_lock); in ppbus_attach()
411 mtx_lock(ppb->ppc_lock); in ppbus_attach()
413 mtx_unlock(ppb->ppc_lock); in ppbus_attach()
441 struct ppb_data *ppb = arg; in ppbus_intr() local
443 mtx_assert(ppb->ppc_lock, MA_OWNED); in ppbus_intr()
444 if (ppb->ppb_owner == NULL) in ppbus_intr()
447 ppbdev = device_get_ivars(ppb->ppb_owner); in ppbus_intr()
460 struct ppb_data *ppb = DEVTOSOFTC(bus); in ppbus_setup_intr() local
467 if (ppb->ppc_irq_res != r) in ppbus_setup_intr()
470 mtx_lock(ppb->ppc_lock); in ppbus_setup_intr()
474 mtx_unlock(ppb->ppc_lock); in ppbus_setup_intr()
483 struct ppb_data *ppb = DEVTOSOFTC(bus); in ppbus_teardown_intr() local
485 mtx_lock(ppb->ppc_lock); in ppbus_teardown_intr()
486 if (ppbdev != ih || ppb->ppc_irq_res != r) { in ppbus_teardown_intr()
487 mtx_unlock(ppb->ppc_lock); in ppbus_teardown_intr()
492 mtx_unlock(ppb->ppc_lock); in ppbus_teardown_intr()
507 struct ppb_data *ppb = DEVTOSOFTC(bus); in ppb_request_bus() local
511 mtx_assert(ppb->ppc_lock, MA_OWNED); in ppb_request_bus()
513 if (ppb->ppb_owner) { in ppb_request_bus()
516 error = mtx_sleep(ppb, ppb->ppc_lock, in ppb_request_bus()
521 error = mtx_sleep(ppb, ppb->ppc_lock, PPBPRI, in ppb_request_bus()
530 ppb->ppb_owner = dev; in ppb_request_bus()
556 struct ppb_data *ppb = DEVTOSOFTC(bus); in ppb_release_bus() local
559 mtx_assert(ppb->ppc_lock, MA_OWNED); in ppb_release_bus()
560 if (ppb->ppb_owner != dev) in ppb_release_bus()
569 ppb->ppb_owner = 0; in ppb_release_bus()
572 wakeup(ppb); in ppb_release_bus()