Lines Matching refs:bd
364 bdrv_t *bd = (bdrv_t *) b->sys; in ce_led_off() local
371 CE_LOCK (bd); in ce_led_off()
373 CE_UNLOCK (bd); in ce_led_off()
379 bdrv_t *bd = arg; in ce_intr() local
380 ce_board_t *b = bd->board; in ce_intr()
391 CE_LOCK (bd); in ce_intr()
399 CE_UNLOCK (bd); in ce_intr()
526 bdrv_t *bd = device_get_softc (dev); in ce_attach() local
551 bd->dmamem.size = TAU32_ControllerObjectSize; in ce_attach()
552 if (! ce_bus_dma_mem_alloc (unit, -1, &bd->dmamem)) { in ce_attach()
556 b->ddk.pControllerObject = bd->dmamem.virt; in ce_attach()
558 bd->board = b; in ce_attach()
559 b->sys = bd; in ce_attach()
561 bd->ce_res = bus_alloc_resource (dev, SYS_RES_MEMORY, &rid, in ce_attach()
563 if (! bd->ce_res) { in ce_attach()
565 ce_bus_dma_mem_free (&bd->dmamem); in ce_attach()
569 vbase = (vm_offset_t) rman_get_virtual (bd->ce_res); in ce_attach()
572 b->ddk.ControllerObjectPhysicalAddress = bd->dmamem.phys; in ce_attach()
585 bus_release_resource (dev, SYS_RES_MEMORY, PCIR_BAR(0), bd->ce_res); in ce_attach()
586 ce_bus_dma_mem_free (&bd->dmamem); in ce_attach()
596 bd->ce_irq = bus_alloc_resource (dev, SYS_RES_IRQ, &rid, 0, ~0, 1, in ce_attach()
598 if (! bd->ce_irq) { in ce_attach()
600 bus_release_resource (dev, SYS_RES_MEMORY, PCIR_BAR(0), bd->ce_res); in ce_attach()
601 ce_bus_dma_mem_free (&bd->dmamem); in ce_attach()
611 error = bus_setup_intr (dev, bd->ce_irq, in ce_attach()
617 NULL, ce_intr, bd, &bd->ce_intrhand); in ce_attach()
620 bus_release_resource (dev, SYS_RES_IRQ, 0, bd->ce_irq); in ce_attach()
622 PCIR_BAR(0), bd->ce_res); in ce_attach()
623 ce_bus_dma_mem_free (&bd->dmamem); in ce_attach()
642 d = &bd->channel[c->num]; in ce_attach()
738 mtx_init (&bd->ce_mtx, ce_ln, MTX_NETWORK_LOCK, MTX_DEF|MTX_RECURSE); in ce_attach()
740 CE_LOCK (bd); in ce_attach()
743 CE_UNLOCK (bd); in ce_attach()
751 bdrv_t *bd = device_get_softc (dev); in ce_detach() local
752 ce_board_t *b = bd->board; in ce_detach()
757 KASSERT (mtx_initialized (&bd->ce_mtx), ("ce mutex not initialized")); in ce_detach()
760 CE_LOCK (bd); in ce_detach()
769 CE_UNLOCK (bd); in ce_detach()
826 CE_UNLOCK (bd); in ce_detach()
832 bus_teardown_intr (dev, bd->ce_irq, bd->ce_intrhand); in ce_detach()
833 bus_release_resource (dev, SYS_RES_IRQ, 0, bd->ce_irq); in ce_detach()
835 bus_release_resource (dev, SYS_RES_MEMORY, PCIR_BAR(0), bd->ce_res); in ce_detach()
848 ce_bus_dma_mem_free (&bd->dmamem); in ce_detach()
851 mtx_destroy (&bd->ce_mtx); in ce_detach()
860 bdrv_t *bd = d->board->sys; in ce_ifstart() local
862 CE_LOCK (bd); in ce_ifstart()
864 CE_UNLOCK (bd); in ce_ifstart()
889 bdrv_t *bd = d->board->sys; in ce_sioctl() local
917 CE_LOCK (bd); in ce_sioctl()
933 CE_UNLOCK (bd); in ce_sioctl()
1077 bdrv_t *bd = d->board->sys; in ce_watchdog_timer() local
1079 CE_LOCK(bd); in ce_watchdog_timer()
1085 CE_UNLOCK(bd); in ce_watchdog_timer()
1221 bdrv_t *bd = d->board->sys; in ce_modem_status() local
1226 CE_LOCK (bd); in ce_modem_status()
1232 CE_UNLOCK (bd); in ce_modem_status()
1244 bdrv_t *bd = d->board->sys; in ce_ioctl() local
1327 CE_LOCK (bd); in ce_ioctl()
1332 CE_UNLOCK (bd); in ce_ioctl()
1512 CE_LOCK (bd); in ce_ioctl()
1514 CE_UNLOCK (bd); in ce_ioctl()
1540 CE_LOCK (bd); in ce_ioctl()
1542 CE_UNLOCK (bd); in ce_ioctl()
1597 CE_LOCK (bd); in ce_ioctl()
1599 CE_UNLOCK (bd); in ce_ioctl()
1625 CE_LOCK (bd); in ce_ioctl()
1627 CE_UNLOCK (bd); in ce_ioctl()
1653 CE_LOCK (bd); in ce_ioctl()
1655 CE_UNLOCK (bd); in ce_ioctl()
1677 CE_LOCK (bd); in ce_ioctl()
1679 CE_UNLOCK (bd); in ce_ioctl()
1705 CE_LOCK (bd); in ce_ioctl()
1707 CE_UNLOCK (bd); in ce_ioctl()
1733 CE_LOCK (bd); in ce_ioctl()
1735 CE_UNLOCK (bd); in ce_ioctl()
1761 CE_LOCK (bd); in ce_ioctl()
1763 CE_UNLOCK (bd); in ce_ioctl()
1789 CE_LOCK (bd); in ce_ioctl()
1791 CE_UNLOCK (bd); in ce_ioctl()
1817 CE_LOCK (bd); in ce_ioctl()
1819 CE_UNLOCK (bd); in ce_ioctl()
1850 CE_LOCK (bd); in ce_ioctl()
1857 CE_UNLOCK (bd); in ce_ioctl()
1875 CE_LOCK (bd); in ce_ioctl()
1877 CE_UNLOCK (bd); in ce_ioctl()
1894 CE_LOCK (bd); in ce_ioctl()
1896 CE_UNLOCK (bd); in ce_ioctl()
1906 CE_LOCK (bd); in ce_ioctl()
1908 CE_UNLOCK (bd); in ce_ioctl()
1932 CE_LOCK (bd); in ce_ioctl()
1934 CE_UNLOCK (bd); in ce_ioctl()
1940 CE_LOCK (bd); in ce_ioctl()
1942 CE_UNLOCK (bd); in ce_ioctl()
1948 CE_LOCK (bd); in ce_ioctl()
1950 CE_UNLOCK (bd); in ce_ioctl()
1956 CE_LOCK (bd); in ce_ioctl()
1959 CE_UNLOCK (bd); in ce_ioctl()
1965 CE_LOCK (bd); in ce_ioctl()
1968 CE_UNLOCK (bd); in ce_ioctl()
1974 CE_LOCK (bd); in ce_ioctl()
1977 CE_UNLOCK (bd); in ce_ioctl()
2010 bdrv_t *bd = d->board->sys; local
2035 CE_LOCK (bd);
2037 CE_UNLOCK (bd);
2361 bdrv_t *bd = d->board->sys; local
2396 CE_LOCK (bd);
2401 CE_UNLOCK (bd);
2414 CE_UNLOCK (bd);
2422 CE_UNLOCK (bd);
2434 bdrv_t *bd = d->board->sys; local
2436 CE_LOCK (bd);
2438 CE_UNLOCK (bd);
2460 bdrv_t *bd = d->board->sys;
2462 CE_LOCK (bd);
2464 CE_UNLOCK (bd);
2510 bdrv_t *bd = d->board->sys; local
2512 CE_LOCK (bd);
2514 CE_UNLOCK (bd);