Lines Matching refs:bd

321 	bdrv_t *bd = b->sys;  in cx_led_off()  local
325 CX_LOCK (bd); in cx_led_off()
327 CX_UNLOCK (bd); in cx_led_off()
336 bdrv_t *bd = arg; in cx_intr() local
337 cx_board_t *b = bd->board; in cx_intr()
343 CX_LOCK (bd); in cx_intr()
351 CX_UNLOCK (bd); in cx_intr()
631 bdrv_t *bd = device_get_softc (dev); in cx_attach() local
641 KASSERT ((bd != NULL), ("cx%d: NULL device softc\n", unit)); in cx_attach()
644 bd->base_rid = 0; in cx_attach()
645 bd->base_res = bus_alloc_resource (dev, SYS_RES_IOPORT, &bd->base_rid, in cx_attach()
647 if (! bd->base_res) { in cx_attach()
662 bus_release_resource (dev, SYS_RES_IOPORT, bd->base_rid, in cx_attach()
663 bd->base_res); in cx_attach()
669 bd->drq_rid = 0; in cx_attach()
670 bd->drq_res = bus_alloc_resource (dev, SYS_RES_DRQ, &bd->drq_rid, in cx_attach()
672 if (! bd->drq_res) { in cx_attach()
674 bus_release_resource (dev, SYS_RES_IOPORT, bd->base_rid, in cx_attach()
675 bd->base_res); in cx_attach()
689 bus_release_resource (dev, SYS_RES_DRQ, bd->drq_rid, in cx_attach()
690 bd->drq_res); in cx_attach()
691 bus_release_resource (dev, SYS_RES_IOPORT, bd->base_rid, in cx_attach()
692 bd->base_res); in cx_attach()
698 bd->irq_rid = 0; in cx_attach()
699 bd->irq_res = bus_alloc_resource (dev, SYS_RES_IRQ, &bd->irq_rid, in cx_attach()
701 if (! bd->irq_res) { in cx_attach()
703 bus_release_resource (dev, SYS_RES_DRQ, bd->drq_rid, in cx_attach()
704 bd->drq_res); in cx_attach()
705 bus_release_resource (dev, SYS_RES_IOPORT, bd->base_rid, in cx_attach()
706 bd->base_res); in cx_attach()
721 bus_release_resource (dev, SYS_RES_IRQ, bd->irq_rid, in cx_attach()
722 bd->irq_res); in cx_attach()
723 bus_release_resource (dev, SYS_RES_DRQ, bd->drq_rid, in cx_attach()
724 bd->drq_res); in cx_attach()
725 bus_release_resource (dev, SYS_RES_IOPORT, bd->base_rid, in cx_attach()
726 bd->base_res); in cx_attach()
730 bd->board = b; in cx_attach()
733 mtx_init (&bd->cx_mtx, cx_ln, MTX_NETWORK_LOCK, MTX_DEF|MTX_RECURSE); in cx_attach()
736 bd->board = 0; in cx_attach()
738 mtx_destroy (&bd->cx_mtx); in cx_attach()
740 bus_release_resource (dev, SYS_RES_IRQ, bd->irq_rid, in cx_attach()
741 bd->irq_res); in cx_attach()
742 bus_release_resource (dev, SYS_RES_DRQ, bd->drq_rid, in cx_attach()
743 bd->drq_res); in cx_attach()
744 bus_release_resource (dev, SYS_RES_IOPORT, bd->base_rid, in cx_attach()
745 bd->base_res); in cx_attach()
748 b->sys = bd; in cx_attach()
751 if (bus_setup_intr (dev, bd->irq_res, in cx_attach()
753 NULL, cx_intr, bd, &bd->intrhand)) { in cx_attach()
755 bd->board = 0; in cx_attach()
758 mtx_destroy (&bd->cx_mtx); in cx_attach()
760 bus_release_resource (dev, SYS_RES_IRQ, bd->irq_rid, in cx_attach()
761 bd->irq_res); in cx_attach()
762 bus_release_resource (dev, SYS_RES_DRQ, bd->drq_rid, in cx_attach()
763 bd->drq_res); in cx_attach()
764 bus_release_resource (dev, SYS_RES_IOPORT, bd->base_rid, in cx_attach()
765 bd->base_res); in cx_attach()
770 CX_LOCK (bd); in cx_attach()
773 CX_UNLOCK (bd); in cx_attach()
780 d = &bd->channel[c->num]; in cx_attach()
859 CX_LOCK (bd); in cx_attach()
865 CX_UNLOCK (bd); in cx_attach()
879 bdrv_t *bd = device_get_softc (dev); in cx_detach() local
880 cx_board_t *b = bd->board; in cx_detach()
884 KASSERT (mtx_initialized (&bd->cx_mtx), ("cx mutex not initialized")); in cx_detach()
887 CX_LOCK (bd); in cx_detach()
895 CX_UNLOCK (bd); in cx_detach()
901 CX_UNLOCK (bd); in cx_detach()
906 CX_UNLOCK (bd); in cx_detach()
923 CX_UNLOCK (bd); in cx_detach()
924 bus_teardown_intr (dev, bd->irq_res, bd->intrhand); in cx_detach()
925 bus_release_resource (dev, SYS_RES_IRQ, bd->irq_rid, bd->irq_res); in cx_detach()
927 bus_release_resource (dev, SYS_RES_DRQ, bd->drq_rid, bd->drq_res); in cx_detach()
929 bus_release_resource (dev, SYS_RES_IOPORT, bd->base_rid, bd->base_res); in cx_detach()
931 CX_LOCK (bd); in cx_detach()
971 CX_UNLOCK (bd); in cx_detach()
994 bd->board = NULL; in cx_detach()
999 mtx_destroy (&bd->cx_mtx); in cx_detach()
1008 bdrv_t *bd = d->board->sys; in cx_ifstart() local
1010 CX_LOCK (bd); in cx_ifstart()
1012 CX_UNLOCK (bd); in cx_ifstart()
1052 bdrv_t *bd = d->board->sys; in cx_sioctl() local
1066 CX_LOCK (bd); in cx_sioctl()
1071 CX_UNLOCK (bd); in cx_sioctl()
1084 CX_LOCK (bd); in cx_sioctl()
1095 CX_UNLOCK (bd); in cx_sioctl()
1220 bdrv_t *bd = d->board->sys; in cx_watchdog_timer() local
1222 CX_LOCK (bd); in cx_watchdog_timer()
1228 CX_UNLOCK (bd); in cx_watchdog_timer()
1439 bdrv_t *bd; in cx_topen() local
1445 bd = d->board->sys; in cx_topen()
1451 CX_LOCK (bd); in cx_topen()
1456 CX_UNLOCK (bd); in cx_topen()
1466 bdrv_t *bd; in cx_tclose() local
1470 bd = d->board->sys; in cx_tclose()
1471 CX_LOCK (bd); in cx_tclose()
1475 CX_UNLOCK (bd); in cx_tclose()
1482 bdrv_t *bd; in cx_tmodem() local
1485 bd = d->board->sys; in cx_tmodem()
1487 CX_LOCK (bd); in cx_tmodem()
1494 CX_UNLOCK (bd); in cx_tmodem()
1506 CX_UNLOCK (bd); in cx_tmodem()
1541 bdrv_t *bd = d->board->sys; in cx_modem_status() local
1543 CX_LOCK (bd); in cx_modem_status()
1554 CX_UNLOCK (bd); in cx_modem_status()
1562 bdrv_t *bd; in cx_ioctl() local
1571 bd = d->board->sys; in cx_ioctl()
1586 CX_LOCK (bd); in cx_ioctl()
1588 CX_UNLOCK (bd); in cx_ioctl()
1603 CX_LOCK (bd); in cx_ioctl()
1605 CX_UNLOCK (bd); in cx_ioctl()
1613 CX_LOCK (bd); in cx_ioctl()
1617 CX_UNLOCK (bd); in cx_ioctl()
1652 CX_LOCK (bd); in cx_ioctl()
1654 CX_UNLOCK (bd); in cx_ioctl()
1668 CX_LOCK (bd); in cx_ioctl()
1673 CX_UNLOCK (bd); in cx_ioctl()
1681 CX_LOCK (bd); in cx_ioctl()
1684 CX_UNLOCK (bd); in cx_ioctl()
1709 CX_LOCK (bd); in cx_ioctl()
1721 CX_UNLOCK (bd); in cx_ioctl()
1729 CX_LOCK (bd); in cx_ioctl()
1739 CX_UNLOCK (bd); in cx_ioctl()
1750 CX_LOCK (bd); in cx_ioctl()
1760 CX_UNLOCK (bd); in cx_ioctl()
1769 CX_LOCK (bd); in cx_ioctl()
1771 CX_UNLOCK (bd); in cx_ioctl()
1784 CX_LOCK (bd); in cx_ioctl()
1786 CX_UNLOCK (bd); in cx_ioctl()
1795 CX_LOCK (bd); in cx_ioctl()
1797 CX_UNLOCK (bd); in cx_ioctl()
1810 CX_LOCK (bd); in cx_ioctl()
1812 CX_UNLOCK (bd); in cx_ioctl()
1821 CX_LOCK (bd); in cx_ioctl()
1823 CX_UNLOCK (bd); in cx_ioctl()
1836 CX_LOCK (bd); in cx_ioctl()
1838 CX_UNLOCK (bd); in cx_ioctl()
1847 CX_LOCK (bd); in cx_ioctl()
1849 CX_UNLOCK (bd); in cx_ioctl()
1862 CX_LOCK (bd); in cx_ioctl()
1864 CX_UNLOCK (bd); in cx_ioctl()
1871 CX_LOCK (bd); in cx_ioctl()
1873 CX_UNLOCK (bd); in cx_ioctl()
1884 CX_LOCK (bd); in cx_ioctl()
1901 CX_UNLOCK (bd); in cx_ioctl()
1910 CX_LOCK (bd); in cx_ioctl()
1912 CX_UNLOCK (bd); in cx_ioctl()
1919 CX_LOCK (bd); in cx_ioctl()
1921 CX_UNLOCK (bd); in cx_ioctl()
1928 CX_LOCK (bd); in cx_ioctl()
1931 CX_UNLOCK (bd); in cx_ioctl()
1938 CX_LOCK (bd); in cx_ioctl()
1941 CX_UNLOCK (bd); in cx_ioctl()
1948 CX_LOCK (bd); in cx_ioctl()
1951 CX_UNLOCK (bd); in cx_ioctl()
1969 bdrv_t *bd; in cx_softintr() local
1980 bd = d->board->sys; in cx_softintr()
1982 CX_LOCK (bd); in cx_softintr()
1997 CX_UNLOCK (bd); in cx_softintr()
2001 CX_LOCK (bd); in cx_softintr()
2015 CX_UNLOCK (bd); in cx_softintr()
2019 CX_LOCK (bd); in cx_softintr()
2025 CX_UNLOCK (bd); in cx_softintr()
2028 CX_LOCK (bd); in cx_softintr()
2036 CX_UNLOCK (bd); in cx_softintr()
2050 bdrv_t *bd; in cx_oproc() local
2056 bd = d->board->sys; in cx_oproc()
2061 CX_LOCK (bd); in cx_oproc()
2075 CX_UNLOCK (bd); in cx_oproc()
2111 CX_UNLOCK (bd); in cx_oproc()
2118 bdrv_t *bd; in cx_param() local
2122 bd = d->board->sys; in cx_param()
2125 CX_LOCK (bd); in cx_param()
2129 CX_UNLOCK (bd); in cx_param()
2138 CX_UNLOCK (bd); in cx_param()
2143 CX_UNLOCK (bd); in cx_param()
2173 CX_UNLOCK (bd); in cx_param()
2184 bdrv_t *bd; in cx_stop() local
2188 bd = d->board->sys; in cx_stop()
2191 CX_LOCK (bd); in cx_stop()
2197 CX_UNLOCK (bd); in cx_stop()
2207 bdrv_t *bd = d->board->sys; in cx_carrier() local
2212 CX_LOCK (bd); in cx_carrier()
2218 CX_UNLOCK (bd); in cx_carrier()
2225 CX_UNLOCK (bd); in cx_carrier()
2231 CX_UNLOCK (bd); in cx_carrier()
2263 bdrv_t *bd = d->board->sys; in ng_cx_newhook() local
2282 CX_LOCK (bd); in ng_cx_newhook()
2284 CX_UNLOCK (bd); in ng_cx_newhook()
2400 bdrv_t *bd; in ng_cx_rcvdata() local
2411 bd = d->board->sys; in ng_cx_rcvdata()
2420 CX_LOCK (bd); in ng_cx_rcvdata()
2424 CX_UNLOCK (bd); in ng_cx_rcvdata()
2432 CX_UNLOCK (bd); in ng_cx_rcvdata()
2440 bdrv_t *bd; in ng_cx_rmnode() local
2445 bd = d->board->sys; in ng_cx_rmnode()
2446 CX_LOCK (bd); in ng_cx_rmnode()
2448 CX_UNLOCK (bd); in ng_cx_rmnode()
2472 bdrv_t *bd = d->board->sys; in ng_cx_disconnect() local
2476 CX_LOCK (bd); in ng_cx_disconnect()
2479 CX_UNLOCK (bd); in ng_cx_disconnect()