Lines Matching refs:subunit

117 static char *       maple_unit_name(char *, size_t, int port, int subunit);
200 int port, subunit, f; in mapleattach() local
216 for (subunit = 0; subunit < MAPLE_SUBUNITS; subunit++) { in mapleattach()
217 u = &sc->sc_unit[port][subunit]; in mapleattach()
219 u->subunit = subunit; in mapleattach()
292 maple_unit_name(buf, sizeof(buf), u->port, u->subunit)); in maple_scanbus()
305 if (u->port < last_port || u->subunit <= last_subunit) in maple_scanbus()
309 last_subunit = u->subunit; in maple_scanbus()
327 int port, subunit; in maple_run_polling() local
340 for (subunit = 0; subunit < MAPLE_SUBUNITS; subunit++) in maple_run_polling()
341 sc->sc_unit[port][subunit].u_dma_stat = MAPLE_DMA_IDLE; in maple_run_polling()
363 maple_unit_name(char *buf, size_t len, int port, int subunit) in maple_unit_name() argument
368 if (subunit) in maple_unit_name()
369 snprintf(buf + l, len - l, "%d", subunit); in maple_unit_name()
449 to = from | subunit_code[u->subunit]; in maple_queue_command()
486 u->port, u->subunit), u->u_retrycnt); in maple_write_command()
525 KASSERT(u->subunit == 0); in maple_check_subunit_change()
537 maple_unit_name(buf, sizeof(buf), u->port, u->subunit), in maple_check_subunit_change()
564 u1->port, u1->subunit)); in maple_check_subunit_change()
593 maple_unit_name(buf, sizeof(buf), u->port, u->subunit)); in maple_check_unit_change()
604 int port, subunit; in maple_print_unit() local
609 subunit = ma->ma_unit->subunit; in maple_print_unit()
613 subunit), pnp); in maple_print_unit()
617 if (subunit != 0) in maple_print_unit()
618 printf(" subunit %d", subunit); in maple_print_unit()
653 match->cf_loc[MAPLECF_SUBUNIT] != ma->ma_unit->subunit) in maplesubmatch()
695 u->port, u->subunit); in maple_attach_unit()
725 sc->sc_port_units[u->port] |= 1 << u->subunit; in maple_attach_unit()
740 printf("%s: remove\n", maple_unit_name(buf, sizeof(buf), u->port, u->subunit)); in maple_detach_unit_nofix()
744 sc->sc_port_units[port] &= ~(1 << u->subunit); in maple_detach_unit_nofix()
746 if (u->subunit == 0) { in maple_detach_unit_nofix()
755 maple_unit_name(buf, sizeof(buf), port, u->subunit), in maple_detach_unit_nofix()
780 maple_unit_name(buf, sizeof(buf), port, u->subunit), in maple_detach_unit_nofix()
798 maple_unit_name(buf, sizeof(buf), port, u->subunit)); in maple_detach_unit_nofix()
812 if (u->subunit == 0) { in maple_detach_unit_nofix()
818 maple_unit_name(buf2, sizeof(buf2), port, u->subunit)); in maple_detach_unit_nofix()
831 if (u->subunit != 0) in maple_detach_unit()
832 sc->sc_port_unit_map[u->port] &= ~(1 << (u->subunit - 1)); in maple_detach_unit()
859 maple_unit_name(buf, sizeof(buf), u->port, u->subunit), func); in maple_command()
1145 maple_unit_name(buf, sizeof(buf), u->port, u->subunit)); in maple_remove_from_queues()
1166 maple_unit_name(buf, sizeof(buf), u->port, u->subunit), in maple_retry()
1269 maple_unit_name(buf, sizeof(buf), u->port, u->subunit), in maple_check_responses()
1292 if (u->subunit != 0 && in maple_check_responses()
1296 u->port, u->subunit)); in maple_check_responses()
1301 … maple_unit_name(buf, sizeof(buf), u->port, u->subunit)); in maple_check_responses()
1329 u->subunit), in maple_check_responses()
1346 u->port, u->subunit)); in maple_check_responses()
1386 u->subunit), in maple_check_responses()
1404 maple_unit_name(buf, sizeof(buf), u->port, u->subunit), in maple_check_responses()
1418 if (u->subunit == 0 && response != MAPLE_RESPONSE_NONE && in maple_check_responses()
1661 if (!(sc->sc_port_units[u->port] & (1 << u->subunit))) in maple_unit_ioctl()