Lines Matching refs:wnodep
505 sbdp_wnode_init(sbdp_wnode_t *wnodep, int wnode, int boards)
512 wnodep->wnode = wnode;
513 wnodep->nbds = boards;
514 wnodep->bds = kmem_zalloc(sizeof (sbdp_bd_t) * boards, KM_SLEEP);
515 wnodep->next = wnodep->prev = NULL;
518 sbdp_bd_init(&wnodep->bds[i], i, wnode);
525 sbdp_wnode_fini(sbdp_wnode_t *wnodep)
533 boards = wnodep->nbds;
536 sbdp_bd_fini(&wnodep->bds[i]);
538 kmem_free(wnodep->bds, sizeof (sbdp_bd_t) * boards);
539 wnodep->next = wnodep->prev = NULL;
540 kmem_free(wnodep, sizeof (sbdp_wnode_t));
647 sbdp_wnode_t *wnodep;
653 wnodep = kmem_zalloc(sizeof (sbdp_wnode_t), KM_SLEEP);
657 first_node = wnodep;
661 cur->next = wnodep;
662 wnodep->prev = cur;
665 sbdp_wnode_init(wnodep, wnode, max_boards);
672 sbdp_remove_wnode(sbdp_wnode_t *wnodep)
679 if (wnodep != NULL) {
680 sbdp_wnode_fini(wnodep);
683 if (first_node == wnodep)
686 cur = wnodep->prev;
688 cur->next = wnodep->next;
689 if (wnodep->next != NULL)
690 wnodep->next->prev = cur;
747 sbdp_wnode_t *wnodep;
766 if ((wnodep = sbdp_get_wnodep(wnode)) != NULL) {
767 sbdp_remove_wnode(wnodep);
891 sbdp_wnode_t *wnodep;
898 wnodep = sbdp_get_wnodep(wnode);
901 if ((wnodep == NULL) || ((board < 0) && (board > max_bds))) {
905 bdp = &wnodep->bds[board];