Lines Matching refs:lc
332 struct ldc_conn *lc; in vdsp_attach() local
362 lc = &sc->sc_lc; in vdsp_attach()
363 lc->lc_id = ca->ca_id; in vdsp_attach()
364 lc->lc_sc = sc; in vdsp_attach()
365 lc->lc_reset = vdsp_ldc_reset; in vdsp_attach()
366 lc->lc_start = vdsp_ldc_start; in vdsp_attach()
367 lc->lc_rx_data = vdsp_rx_data; in vdsp_attach()
369 lc->lc_txq = ldc_queue_alloc(sc->sc_dmatag, VDSK_TX_ENTRIES); in vdsp_attach()
370 if (lc->lc_txq == NULL) { in vdsp_attach()
375 lc->lc_rxq = ldc_queue_alloc(sc->sc_dmatag, VDSK_RX_ENTRIES); in vdsp_attach()
376 if (lc->lc_rxq == NULL) { in vdsp_attach()
392 ldc_queue_free(sc->sc_dmatag, lc->lc_rxq); in vdsp_attach()
395 ldc_queue_free(sc->sc_dmatag, lc->lc_txq); in vdsp_attach()
402 struct ldc_conn *lc = &sc->sc_lc; in vdsp_tx_intr() local
406 err = hv_ldc_tx_get_state(lc->lc_id, &tx_head, &tx_tail, &tx_state); in vdsp_tx_intr()
412 if (tx_state != lc->lc_tx_state) { in vdsp_tx_intr()
424 lc->lc_tx_state = tx_state; in vdsp_tx_intr()
427 wakeup(lc->lc_txq); in vdsp_tx_intr()
435 struct ldc_conn *lc = &sc->sc_lc; in vdsp_rx_intr() local
440 err = hv_ldc_rx_get_state(lc->lc_id, &rx_head, &rx_tail, &rx_state); in vdsp_rx_intr()
448 if (rx_state != lc->lc_rx_state) { in vdsp_rx_intr()
452 lc->lc_tx_seqid = 0; in vdsp_rx_intr()
453 lc->lc_state = 0; in vdsp_rx_intr()
454 lc->lc_reset(lc); in vdsp_rx_intr()
461 lc->lc_tx_seqid = 0; in vdsp_rx_intr()
462 lc->lc_state = 0; in vdsp_rx_intr()
463 lc->lc_reset(lc); in vdsp_rx_intr()
466 lc->lc_rx_state = rx_state; in vdsp_rx_intr()
470 if (lc->lc_rx_state == LDC_CHANNEL_DOWN) in vdsp_rx_intr()
473 lp = (struct ldc_pkt *)(lc->lc_rxq->lq_va + rx_head); in vdsp_rx_intr()
476 ldc_rx_ctrl(lc, lp); in vdsp_rx_intr()
480 ldc_rx_data(lc, lp); in vdsp_rx_intr()
486 ldc_reset(lc); in vdsp_rx_intr()
491 rx_head &= ((lc->lc_rxq->lq_nentries * sizeof(*lp)) - 1); in vdsp_rx_intr()
492 err = hv_ldc_rx_set_qhead(lc->lc_id, rx_head); in vdsp_rx_intr()
500 vdsp_rx_data(struct ldc_conn *lc, struct ldc_pkt *lp) in vdsp_rx_data() argument
509 vdsp_rx_vio_ctrl(lc->lc_sc, vm); in vdsp_rx_data()
515 vdsp_rx_vio_data(lc->lc_sc, vm); in vdsp_rx_data()
520 ldc_reset(lc); in vdsp_rx_data()
868 vdsp_ldc_reset(struct ldc_conn *lc) in vdsp_ldc_reset() argument
870 struct vdsp_softc *sc = lc->lc_sc; in vdsp_ldc_reset()
877 vdsp_ldc_start(struct ldc_conn *lc) in vdsp_ldc_start() argument
885 struct ldc_conn *lc = &sc->sc_lc; in vdsp_sendmsg() local
889 err = ldc_send_unreliable(lc, msg, len); in vdsp_sendmsg()
897 err = tsleep_nsec(lc->lc_txq, PWAIT, "vdsp", in vdsp_sendmsg()
1129 struct ldc_conn *lc = &sc->sc_lc; in vdsp_read_desc() local
1169 err = hv_ldc_copy(lc->lc_id, LDC_COPY_OUT, in vdsp_read_desc()
1202 struct ldc_conn *lc = &sc->sc_lc; in vdsp_read_dring() local
1243 err = hv_ldc_copy(lc->lc_id, LDC_COPY_OUT, in vdsp_read_dring()
1274 struct ldc_conn *lc = &sc->sc_lc; in vdsp_write_dring() local
1300 err = hv_ldc_copy(lc->lc_id, LDC_COPY_IN, in vdsp_write_dring()
1359 struct ldc_conn *lc = &sc->sc_lc; in vdsp_get_vtoc() local
1427 err = hv_ldc_copy(lc->lc_id, LDC_COPY_OUT, in vdsp_get_vtoc()
1457 struct ldc_conn *lc = &sc->sc_lc; in vdsp_set_vtoc() local
1478 err = hv_ldc_copy(lc->lc_id, LDC_COPY_IN, in vdsp_set_vtoc()
1549 struct ldc_conn *lc = &sc->sc_lc; in vdsp_get_diskgeom() local
1612 err = hv_ldc_copy(lc->lc_id, LDC_COPY_OUT, in vdsp_get_diskgeom()
1695 struct ldc_conn *lc; in vdspopen() local
1705 lc = &sc->sc_lc; in vdspopen()
1707 err = hv_ldc_tx_qconf(lc->lc_id, in vdspopen()
1708 lc->lc_txq->lq_map->dm_segs[0].ds_addr, lc->lc_txq->lq_nentries); in vdspopen()
1712 err = hv_ldc_rx_qconf(lc->lc_id, in vdspopen()
1713 lc->lc_rxq->lq_map->dm_segs[0].ds_addr, lc->lc_rxq->lq_nentries); in vdspopen()