Home | History | Annotate | Download | only in pci

Lines Matching defs:aqb

718 	struct ixl_aq_buf *aqb;
761 aqb = NULL;
776 aqb = iavf_aqb_get(sc, NULL);
777 if (aqb != NULL) {
778 iavf_aqb_put_locked(&sc->sc_arq_idle, aqb);
781 aqb = NULL;
793 aqb = iavf_aqb_get(sc, NULL);
794 if (aqb == NULL) {
799 error = iavf_get_version(sc, aqb);
814 if (iavf_get_vf_resources(sc, aqb) != 0) {
837 if (iavf_config_irq_map(sc, aqb) != 0) {
850 iavf_aqb_put_locked(&sc->sc_atq_idle, aqb);
851 aqb = NULL;
944 if (aqb != NULL)
945 iavf_aqb_put_locked(&sc->sc_atq_idle, aqb);
2135 struct ixl_aq_buf *aqb;
2166 while ((aqb = iavf_aqb_get_locked(&sc->sc_arq_live)) != NULL) {
2167 bus_dmamap_sync(sc->sc_dmat, aqb->aqb_map, 0, aqb->aqb_size,
2169 iavf_aqb_put_locked(&sc->sc_arq_idle, aqb);
2172 while ((aqb = iavf_aqb_get_locked(&sc->sc_atq_live)) != NULL) {
2173 bus_dmamap_sync(sc->sc_dmat, aqb->aqb_map, 0, aqb->aqb_size,
2175 iavf_aqb_put_locked(&sc->sc_atq_idle, aqb);
3437 struct ixl_aq_buf *aqb;
3451 aqb = iavf_aqb_get(sc, &sc->sc_atq_idle);
3452 if (aqb == NULL)
3473 if (iavf_get_version(sc, aqb) != 0) {
3479 if (iavf_get_vf_resources(sc, aqb) != 0) {
3519 if (iavf_config_irq_map(sc, aqb) != 0) {
3526 iavf_aqb_put_locked(&sc->sc_atq_idle, aqb);
3537 if (aqb != NULL) {
3538 iavf_aqb_put_locked(&sc->sc_atq_idle, aqb);
3655 struct ixl_aq_buf *aqb;
3657 aqb = kmem_alloc(sizeof(*aqb), KM_NOSLEEP);
3658 if (aqb == NULL)
3661 aqb->aqb_size = buflen;
3663 if (bus_dmamap_create(dmat, aqb->aqb_size, 1,
3664 aqb->aqb_size, 0,
3665 BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW, &aqb->aqb_map) != 0)
3667 if (bus_dmamem_alloc(dmat, aqb->aqb_size,
3668 IAVF_AQ_ALIGN, 0, &aqb->aqb_seg, 1, &aqb->aqb_nsegs,
3671 if (bus_dmamem_map(dmat, &aqb->aqb_seg, aqb->aqb_nsegs,
3672 aqb->aqb_size, &aqb->aqb_data, BUS_DMA_WAITOK) != 0)
3674 if (bus_dmamap_load(dmat, aqb->aqb_map, aqb->aqb_data,
3675 aqb->aqb_size, NULL, BUS_DMA_WAITOK) != 0)
3678 return aqb;
3680 bus_dmamem_unmap(dmat, aqb->aqb_data, aqb->aqb_size);
3682 bus_dmamem_free(dmat, &aqb->aqb_seg, 1);
3684 bus_dmamap_destroy(dmat, aqb->aqb_map);
3686 kmem_free(aqb, sizeof(*aqb));
3692 iavf_aqb_free(bus_dma_tag_t dmat, struct ixl_aq_buf *aqb)
3695 bus_dmamap_unload(dmat, aqb->aqb_map);
3696 bus_dmamem_unmap(dmat, aqb->aqb_data, aqb->aqb_size);
3697 bus_dmamem_free(dmat, &aqb->aqb_seg, 1);
3698 bus_dmamap_destroy(dmat, aqb->aqb_map);
3699 kmem_free(aqb, sizeof(*aqb));
3705 struct ixl_aq_buf *aqb;
3707 aqb = SIMPLEQ_FIRST(q);
3708 if (aqb != NULL) {
3709 SIMPLEQ_REMOVE(q, aqb, ixl_aq_buf, aqb_entry);
3712 return aqb;
3718 struct ixl_aq_buf *aqb;
3722 aqb = iavf_aqb_get_locked(q);
3725 aqb = NULL;
3728 if (aqb == NULL) {
3729 aqb = iavf_aqb_alloc(sc->sc_dmat, IAVF_AQ_BUFLEN);
3732 return aqb;
3736 iavf_aqb_put_locked(struct ixl_aq_bufs *q, struct ixl_aq_buf *aqb)
3739 SIMPLEQ_INSERT_TAIL(q, aqb, aqb_entry);
3745 struct ixl_aq_buf *aqb;
3747 while ((aqb = SIMPLEQ_FIRST(q)) != NULL) {
3748 SIMPLEQ_REMOVE(q, aqb, ixl_aq_buf, aqb_entry);
3749 iavf_aqb_free(dmat, aqb);
3835 struct ixl_aq_buf *aqb;
3861 aqb = iavf_aqb_get_locked(&sc->sc_arq_idle);
3862 if (aqb == NULL)
3865 memset(aqb->aqb_data, 0, aqb->aqb_size);
3867 bus_dmamap_sync(sc->sc_dmat, aqb->aqb_map, 0,
3868 aqb->aqb_size, BUS_DMASYNC_PREREAD);
3871 (aqb->aqb_size > I40E_AQ_LARGE_BUF ?
3874 iaq->iaq_datalen = htole16(aqb->aqb_size);
3879 ixl_aq_dva(iaq, IXL_AQB_DVA(aqb));
3880 iavf_aqb_put_locked(&sc->sc_arq_live, aqb);
3924 struct ixl_aq_buf *aqb;
3941 aqb = iavf_aqb_get(sc, NULL);
3942 if (aqb == NULL)
3944 SIMPLEQ_INSERT_TAIL(&aqbs, aqb, aqb_entry);
3948 while ((aqb = SIMPLEQ_FIRST(&aqbs)) != NULL) {
3949 SIMPLEQ_REMOVE(&aqbs, aqb, ixl_aq_buf, aqb_entry);
3950 iavf_aqb_put_locked(&sc->sc_arq_idle, aqb);
3958 struct ixl_aq_buf *aqb)
3978 iavf_process_version(sc, iaq, aqb);
3981 iavf_process_vf_resources(sc, iaq, aqb);
3987 iavf_process_vc_event(sc, iaq, aqb);
3990 iavf_process_stats(sc, iaq, aqb);
3993 iavf_process_req_queues(sc, iaq, aqb);
4004 struct ixl_aq_buf *aqb;
4032 aqb = iavf_aqb_get_locked(&sc->sc_arq_live);
4033 KASSERT(aqb != NULL);
4035 bus_dmamap_sync(sc->sc_dmat, aqb->aqb_map, 0,
4038 vc_opcode = iavf_process_arq(sc, iaq, aqb);
4044 iavf_aqb_put_locked(&sc->sc_arq_idle, aqb);
4070 struct ixl_aq_buf *aqb;
4098 aqb = iavf_aqb_get_locked(&sc->sc_arq_live);
4100 KASSERT(aqb != NULL);
4102 bus_dmamap_sync(sc->sc_dmat, aqb->aqb_map, 0, IAVF_AQ_BUFLEN,
4105 vc_opcode = iavf_process_arq(sc, iaq, aqb);
4131 iavf_aqb_put_locked(&sc->sc_arq_idle, aqb);
4145 struct ixl_aq_buf *aqb)
4159 if (aqb != NULL) {
4160 ixl_aq_dva(slot, IXL_AQB_DVA(aqb));
4161 bus_dmamap_sync(sc->sc_dmat, IXL_AQB_MAP(aqb),
4162 0, IXL_AQB_LEN(aqb), BUS_DMASYNC_PREWRITE);
4163 iavf_aqb_put_locked(&sc->sc_atq_live, aqb);
4230 struct ixl_aq_buf *aqb;
4254 (aqb = iavf_aqb_get_locked(&sc->sc_atq_live)) != NULL) {
4255 bus_dmamap_sync(sc->sc_dmat, IXL_AQB_MAP(aqb),
4256 0, IXL_AQB_LEN(aqb), BUS_DMASYNC_POSTWRITE);
4257 iavf_aqb_put_locked(&sc->sc_atq_idle, aqb);
4275 struct ixl_aq_buf *aqb, int retry)
4280 error = iavf_adminq_poll_locked(sc, iaq, aqb, retry);
4288 struct ixl_aq_desc *iaq, struct ixl_aq_buf *aqb, int retry)
4297 iavf_atq_post(sc, iaq, aqb);
4302 * collect the aqb used in the current command and
4306 if (aqb != NULL) {
4308 bus_dmamap_sync(sc->sc_dmat, IXL_AQB_MAP(aqb),
4309 0, IXL_AQB_LEN(aqb), BUS_DMASYNC_POSTWRITE);
4328 struct ixl_aq_buf *aqb)
4336 iavf_atq_post(sc, iaq, aqb);
4354 struct ixl_aq_buf *aqb)
4358 ver = (struct iavf_vc_version_info *)aqb->aqb_data;
4365 struct ixl_aq_buf *aqb)
4376 vf_res = aqb->aqb_data;
4424 struct ixl_aq_buf *aqb)
4431 event = aqb->aqb_data;
4468 struct ixl_aq_buf *aqb)
4475 st = aqb->aqb_data;
4495 struct ixl_aq_buf *aqb)
4502 req = aqb->aqb_data;
4528 iavf_get_version(struct iavf_softc *sc, struct ixl_aq_buf *aqb)
4540 ver = IXL_AQB_KVA(aqb);
4548 error = iavf_adminq_poll(sc, &iaq, aqb, 250);
4550 error = iavf_adminq_poll_locked(sc, &iaq, aqb, 250);
4560 iavf_get_vf_resources(struct iavf_softc *sc, struct ixl_aq_buf *aqb)
4577 cap = IXL_AQB_KVA(aqb);
4584 error = iavf_adminq_poll(sc, &iaq, aqb, 250);
4586 error = iavf_adminq_poll_locked(sc, &iaq, aqb, 250);
4598 struct ixl_aq_buf *aqb;
4603 aqb = iavf_aqb_get_locked(&sc->sc_atq_idle);
4606 if (aqb == NULL)
4609 qsel = IXL_AQB_KVA(aqb);
4625 error = iavf_atq_post(sc, &iaq, aqb);
4632 iavf_config_irq_map(struct iavf_softc *sc, struct ixl_aq_buf *aqb)
4642 map = IXL_AQB_KVA(aqb);
4684 error = iavf_adminq_poll(sc, &iaq, aqb, 250);
4686 error = iavf_adminq_poll_locked(sc, &iaq, aqb, 250);
4700 struct ixl_aq_buf *aqb;
4712 aqb = iavf_aqb_get(sc, &sc->sc_atq_idle);
4714 if (aqb == NULL)
4717 config = IXL_AQB_KVA(aqb);
4752 error = iavf_adminq_exec(sc, &iaq, aqb);
4764 struct ixl_aq_buf *aqb;
4768 aqb = iavf_aqb_get(sc, &sc->sc_atq_idle);
4770 if (aqb == NULL)
4773 caps = IXL_AQB_KVA(aqb);
4785 error = iavf_adminq_exec(sc, &iaq, aqb);
4811 struct ixl_aq_buf *aqb;
4816 aqb = iavf_aqb_get(sc, &sc->sc_atq_idle);
4817 if (aqb == NULL)
4820 rss_key = IXL_AQB_KVA(aqb);
4833 rv = iavf_adminq_exec(sc, &iaq, aqb);
4845 struct ixl_aq_buf *aqb;
4850 aqb = iavf_aqb_get(sc, &sc->sc_atq_idle);
4851 if (aqb == NULL)
4854 rss_lut = IXL_AQB_KVA(aqb);
4872 rv = iavf_adminq_exec(sc, &iaq, aqb);
4884 struct ixl_aq_buf *aqb;
4888 aqb = iavf_aqb_get(sc, &sc->sc_atq_idle);
4889 if (aqb == NULL)
4892 qsel = IXL_AQB_KVA(aqb);
4903 error = iavf_adminq_exec(sc, &iaq, aqb);
4915 struct ixl_aq_buf *aqb;
4919 aqb = iavf_aqb_get(sc, &sc->sc_atq_idle);
4920 if (aqb == NULL)
4923 req = IXL_AQB_KVA(aqb);
4933 rv = iavf_atq_post(sc, &iaq, aqb);
4964 struct ixl_aq_buf *aqb;
4973 aqb = iavf_aqb_get(sc, &sc->sc_atq_idle);
4974 if (aqb == NULL)
4977 addrs = IXL_AQB_KVA(aqb);
4991 rv = iavf_adminq_poll_locked(sc, &iaq, aqb, 250);
4992 iavf_aqb_put_locked(&sc->sc_atq_idle, aqb);
4995 rv = iavf_adminq_exec(sc, &iaq, aqb);
5009 struct ixl_aq_buf *aqb;
5015 aqb = iavf_aqb_get(sc, &sc->sc_atq_idle);
5016 if (aqb == NULL)
5025 promisc = IXL_AQB_KVA(aqb);
5035 if (iavf_adminq_exec(sc, &iaq, aqb) != IAVF_VC_RC_SUCCESS) {
5068 struct ixl_aq_buf *aqb;
5074 aqb = iavf_aqb_get(sc, &sc->sc_atq_idle);
5076 if (aqb == NULL)
5079 vfilter = IXL_AQB_KVA(aqb);
5092 rv = iavf_adminq_poll_locked(sc, &iaq, aqb, 250);
5093 iavf_aqb_put_locked(&sc->sc_atq_idle, aqb);
5096 rv = iavf_adminq_exec(sc, &iaq, aqb);