Home
last modified time | relevance | path

Searched refs:softc (Results 1 – 25 of 202) sorted by relevance

123456789

/freebsd/sys/dev/bnxt/bnxt_en/
H A Dbnxt_sysctl.c42 process_nq(struct bnxt_softc *softc, uint16_t nqid);
56 bnxt_init_sysctl_ctx(struct bnxt_softc *softc) in bnxt_init_sysctl_ctx() argument
60 sysctl_ctx_init(&softc->hw_stats); in bnxt_init_sysctl_ctx()
61 ctx = device_get_sysctl_ctx(softc->dev); in bnxt_init_sysctl_ctx()
62 softc->hw_stats_oid = SYSCTL_ADD_NODE(ctx, in bnxt_init_sysctl_ctx()
63 SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev)), OID_AUTO, in bnxt_init_sysctl_ctx()
65 if (!softc->hw_stats_oid) { in bnxt_init_sysctl_ctx()
66 sysctl_ctx_free(&softc->hw_stats); in bnxt_init_sysctl_ctx()
70 sysctl_ctx_init(&softc->ver_info->ver_ctx); in bnxt_init_sysctl_ctx()
71 ctx = device_get_sysctl_ctx(softc->dev); in bnxt_init_sysctl_ctx()
[all …]
H A Dif_bnxt.c175 process_nq(struct bnxt_softc *softc, uint16_t nqid);
221 static int bnxt_probe_phy(struct bnxt_softc *softc);
222 static void bnxt_add_media_types(struct bnxt_softc *softc);
223 static int bnxt_pci_mapping(struct bnxt_softc *softc);
224 static void bnxt_pci_mapping_free(struct bnxt_softc *softc);
225 static int bnxt_update_link(struct bnxt_softc *softc, bool chng_link_state);
228 static void bnxt_clear_ids(struct bnxt_softc *softc);
233 static void bnxt_handle_async_event(struct bnxt_softc *softc,
236 static void bnxt_get_wol_settings(struct bnxt_softc *softc);
240 static void bnxt_get_port_module_status(struct bnxt_softc *softc);
[all …]
H A Dbnxt_dcb.c39 bnxt_tx_queue_to_tc(struct bnxt_softc *softc, uint8_t queue_id) in bnxt_tx_queue_to_tc() argument
43 for (i = 0; i < softc->max_tc; i++) { in bnxt_tx_queue_to_tc()
44 if (softc->tx_q_info[i].queue_id == queue_id) { in bnxt_tx_queue_to_tc()
45 for (j = 0; j < softc->max_tc; j++) { in bnxt_tx_queue_to_tc()
46 if (softc->tc_to_qidx[j] == i) in bnxt_tx_queue_to_tc()
55 bnxt_hwrm_queue_pri2cos_cfg(struct bnxt_softc *softc, in bnxt_hwrm_queue_pri2cos_cfg() argument
64 bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_QUEUE_PRI2COS_CFG); in bnxt_hwrm_queue_pri2cos_cfg()
69 q_info = softc->tx_q_info; in bnxt_hwrm_queue_pri2cos_cfg()
71 q_info = softc->rx_q_info; in bnxt_hwrm_queue_pri2cos_cfg()
78 qidx = softc->tc_to_qidx[ets->prio_tc[i]]; in bnxt_hwrm_queue_pri2cos_cfg()
[all …]
H A Dbnxt_hwrm.c40 static void bnxt_hwrm_set_link_common(struct bnxt_softc *softc,
42 static void bnxt_hwrm_set_pause_common(struct bnxt_softc *softc,
44 static void bnxt_hwrm_set_eee(struct bnxt_softc *softc,
112 bnxt_alloc_hwrm_dma_mem(struct bnxt_softc *softc) in bnxt_alloc_hwrm_dma_mem() argument
116 rc = iflib_dma_alloc(softc->ctx, PAGE_SIZE, &softc->hwrm_cmd_resp, in bnxt_alloc_hwrm_dma_mem()
122 bnxt_free_hwrm_dma_mem(struct bnxt_softc *softc) in bnxt_free_hwrm_dma_mem() argument
124 if (softc->hwrm_cmd_resp.idi_vaddr) in bnxt_free_hwrm_dma_mem()
125 iflib_dma_free(&softc->hwrm_cmd_resp); in bnxt_free_hwrm_dma_mem()
126 softc->hwrm_cmd_resp.idi_vaddr = NULL; in bnxt_free_hwrm_dma_mem()
131 bnxt_hwrm_cmd_hdr_init(struct bnxt_softc *softc, void *request, in bnxt_hwrm_cmd_hdr_init() argument
[all …]
H A Dbnxt_hwrm.h43 hwrm_send_message(struct bnxt_softc *softc, void *msg, uint32_t msg_len);
44 int bnxt_alloc_hwrm_dma_mem(struct bnxt_softc *softc);
45 void bnxt_free_hwrm_dma_mem(struct bnxt_softc *softc);
46 int bnxt_hwrm_ring_alloc(struct bnxt_softc *softc, uint8_t type,
48 int bnxt_hwrm_ring_free(struct bnxt_softc *softc, uint32_t type,
50 int bnxt_hwrm_ver_get(struct bnxt_softc *softc);
51 int bnxt_hwrm_queue_qportcfg(struct bnxt_softc *softc, uint32_t path_dir);
54 int bnxt_hwrm_func_drv_unrgtr(struct bnxt_softc *softc, bool shutdown);
55 int bnxt_hwrm_func_qcaps(struct bnxt_softc *softc);
56 int bnxt_hwrm_func_qcfg(struct bnxt_softc *softc);
[all …]
H A Dbnxt_mgmt.c102 struct bnxt_softc *softc = NULL; in bnxt_mgmt_process_dcb() local
113 softc = bnxt_find_dev(mgmt_dcb.hdr.domain, mgmt_dcb.hdr.bus, in bnxt_mgmt_process_dcb()
115 if (!softc) { in bnxt_mgmt_process_dcb()
123 bnxt_dcb_ieee_getets(softc, &mgmt_dcb.req.ets); in bnxt_mgmt_process_dcb()
126 bnxt_dcb_ieee_setets(softc, &mgmt_dcb.req.ets); in bnxt_mgmt_process_dcb()
129 bnxt_dcb_ieee_getpfc(softc, &mgmt_dcb.req.pfc); in bnxt_mgmt_process_dcb()
132 bnxt_dcb_ieee_setpfc(softc, &mgmt_dcb.req.pfc); in bnxt_mgmt_process_dcb()
135 bnxt_dcb_ieee_setapp(softc, &mgmt_dcb.req.app_tlv.app[0]); in bnxt_mgmt_process_dcb()
138 bnxt_dcb_ieee_delapp(softc, &mgmt_dcb.req.app_tlv.app[0]); in bnxt_mgmt_process_dcb()
141 bnxt_dcb_ieee_listapp(softc, &mgmt_dcb.req.app_tlv.app[0], in bnxt_mgmt_process_dcb()
[all …]
/freebsd/sys/cam/ata/
H A Data_pmp.c177 struct pmp_softc *softc = (struct pmp_softc *)periph->softc; in pmpfreeze() local
181 mask &= ~softc->frozen; in pmpfreeze()
188 softc->frozen |= (1 << i); in pmpfreeze()
199 struct pmp_softc *softc = (struct pmp_softc *)periph->softc; in pmprelease() local
203 mask &= softc->frozen; in pmprelease()
210 softc->frozen &= ~(1 << i); in pmprelease()
243 struct pmp_softc *softc; in pmpcleanup() local
245 softc = (struct pmp_softc *)periph->softc; in pmpcleanup()
252 if ((softc->flags & PMP_FLAG_SCTX_INIT) != 0 in pmpcleanup()
253 && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { in pmpcleanup()
[all …]
H A Data_da.c860 static void adasetflags(struct ada_softc *softc,
862 static void adasetgeom(struct ada_softc *softc,
865 static void ada_dsmtrim(struct ada_softc *softc, struct bio *bp,
867 static void ada_cfaerase(struct ada_softc *softc, struct bio *bp,
912 #define ADA_RA (softc->read_ahead >= 0 ? \
913 softc->read_ahead : ada_read_ahead)
914 #define ADA_WC (softc->write_cache >= 0 ? \
915 softc->write_cache : ada_write_cache)
980 struct ada_softc *softc; in adaopen() local
998 softc = (struct ada_softc *)periph->softc; in adaopen()
[all …]
/freebsd/sys/cam/scsi/
H A Dscsi_target.c126 static cam_status targenable(struct targ_softc *softc,
129 static cam_status targdisable(struct targ_softc *softc);
133 static int targusermerge(struct targ_softc *softc,
136 static int targsendccb(struct targ_softc *softc, union ccb *ccb,
140 static int targreturnccb(struct targ_softc *softc,
142 static union ccb * targgetccb(struct targ_softc *softc, xpt_opcode type,
144 static void targfreeccb(struct targ_softc *softc, union ccb *ccb);
146 targgetdescr(struct targ_softc *softc);
150 static void abort_all_pending(struct targ_softc *softc);
151 static void notify_user(struct targ_softc *softc);
[all …]
H A Dscsi_da.c396 #define dadeleteflag(softc, delete_method, enable) \ argument
398 softc->delete_available |= (1 << delete_method); \
400 softc->delete_available &= ~(1 << delete_method); \
1502 static void dadeletemethodset(struct da_softc *softc,
1504 static off_t dadeletemaxsize(struct da_softc *softc,
1506 static void dadeletemethodchoose(struct da_softc *softc,
1681 struct da_softc *softc = periph->softc; in da_periph_hold() local
1683 cnt = atomic_fetchadd_int(&softc->ref_flags[token], 1); in da_periph_hold()
1694 struct da_softc *softc = periph->softc; in da_periph_unhold() local
1699 cnt = atomic_fetchadd_int(&softc->ref_flags[token], -1); in da_periph_unhold()
[all …]
H A Dscsi_sa.c371 #define SA_PROT_ENABLED(softc) ((softc->flags & SA_FLAG_PROTECT_SUPP) \ argument
372 && (softc->prot_info.cur_prot_state.initialized != 0) \
373 && (softc->prot_info.cur_prot_state.prot_method != 0))
375 #define SA_PROT_LEN(softc) softc->prot_info.cur_prot_state.pi_length argument
626 static void safillprot(struct sa_softc *softc, int *indent,
640 static int saparamget(struct sa_softc *softc, struct sbuf *sb);
646 static void sasetupdev(struct sa_softc *softc, struct cdev *dev);
647 static void saloadtotunables(struct sa_softc *softc);
664 static void safilldensitysb(struct sa_softc *softc, int *indent,
666 static void saloadtimeouts(struct sa_softc *softc, union ccb *ccb);
[all …]
H A Dscsi_pass.c170 static void passiocleanup(struct pass_softc *softc,
235 struct pass_softc *softc; in passrejectios() local
237 softc = (struct pass_softc *)periph->softc; in passrejectios()
243 TAILQ_FOREACH_SAFE(io_req, &softc->done_queue, links, io_req2) { in passrejectios()
244 TAILQ_REMOVE(&softc->done_queue, io_req, links); in passrejectios()
245 passiocleanup(softc, io_req); in passrejectios()
246 uma_zfree(softc->pass_zone, io_req); in passrejectios()
254 TAILQ_FOREACH_SAFE(io_req, &softc->incoming_queue, links, io_req2) { in passrejectios()
255 TAILQ_REMOVE(&softc->incoming_queue, io_req, links); in passrejectios()
256 passiocleanup(softc, io_req); in passrejectios()
[all …]
H A Dscsi_pt.c136 struct pt_softc *softc; in ptopen() local
143 softc = (struct pt_softc *)periph->softc; in ptopen()
146 if (softc->flags & PT_FLAG_DEVICE_INVALID) { in ptopen()
152 if ((softc->flags & PT_FLAG_OPEN) == 0) in ptopen()
153 softc->flags |= PT_FLAG_OPEN; in ptopen()
170 struct pt_softc *softc; in ptclose() local
173 softc = (struct pt_softc *)periph->softc; in ptclose()
177 softc->flags &= ~PT_FLAG_OPEN; in ptclose()
192 struct pt_softc *softc; in ptstrategy() local
201 softc = (struct pt_softc *)periph->softc; in ptstrategy()
[all …]
H A Dscsi_ch.c244 struct ch_softc *softc; in chdevgonecb() local
253 softc = (struct ch_softc *)periph->softc; in chdevgonecb()
254 KASSERT(softc->open_count >= 0, ("Negative open count %d", in chdevgonecb()
255 softc->open_count)); in chdevgonecb()
262 for (i = 0; i < softc->open_count; i++) in chdevgonecb()
265 softc->open_count = 0; in chdevgonecb()
285 struct ch_softc *softc; in choninvalidate() local
287 softc = (struct ch_softc *)periph->softc; in choninvalidate()
294 softc->flags |= CH_FLAG_INVALID; in choninvalidate()
300 destroy_dev_sched_cb(softc->dev, chdevgonecb, periph); in choninvalidate()
[all …]
H A Dscsi_cd.c367 struct cd_softc *softc; in cdoninvalidate() local
370 softc = (struct cd_softc *)periph->softc; in cdoninvalidate()
382 bioq_flush(&softc->bio_queue, NULL, ENXIO); in cdoninvalidate()
384 disk_gone(softc->disk); in cdoninvalidate()
390 struct cd_softc *softc; in cdcleanup() local
392 softc = (struct cd_softc *)periph->softc; in cdcleanup()
395 if ((softc->flags & CD_FLAG_SCTX_INIT) != 0 in cdcleanup()
396 && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { in cdcleanup()
400 callout_drain(&softc->mediapoll_c); in cdcleanup()
401 disk_destroy(softc->disk); in cdcleanup()
[all …]
H A Dscsi_sg.c171 struct sg_softc *softc; in sgdevgonecb() local
179 softc = (struct sg_softc *)periph->softc; in sgdevgonecb()
180 KASSERT(softc->open_count >= 0, ("Negative open count %d", in sgdevgonecb()
181 softc->open_count)); in sgdevgonecb()
188 for (i = 0; i < softc->open_count; i++) in sgdevgonecb()
191 softc->open_count = 0; in sgdevgonecb()
211 struct sg_softc *softc; in sgoninvalidate() local
213 softc = (struct sg_softc *)periph->softc; in sgoninvalidate()
220 softc->flags |= SG_FLAG_INVALID; in sgoninvalidate()
226 destroy_dev_sched_cb(softc->dev, sgdevgonecb, periph); in sgoninvalidate()
[all …]
/freebsd/sys/amd64/vmm/amd/
H A Damdvi_hw.c68 static void amdvi_dump_cmds(struct amdvi_softc *softc, int count);
69 static void amdvi_print_dev_cap(struct amdvi_softc *softc);
124 amdvi_pci_read(struct amdvi_softc *softc, int off) in amdvi_pci_read() argument
127 return (pci_cfgregread(softc->pci_seg, PCI_RID2BUS(softc->pci_rid), in amdvi_pci_read()
128 PCI_RID2SLOT(softc->pci_rid), PCI_RID2FUNC(softc->pci_rid), in amdvi_pci_read()
172 amdvi_dev_support_iotlb(struct amdvi_softc *softc, uint16_t devid) in amdvi_dev_support_iotlb() argument
182 KASSERT(softc, ("softc is NULL")); in amdvi_dev_support_iotlb()
183 cfg = softc->dev_cfg; in amdvi_dev_support_iotlb()
186 for (i = 0; i < softc->dev_cfg_cnt; i++) { in amdvi_dev_support_iotlb()
196 device_printf(softc->dev, in amdvi_dev_support_iotlb()
[all …]
H A Divrs_drv.c180 ivhd_dev_add_entry(struct amdvi_softc *softc, uint32_t start_id, in ivhd_dev_add_entry() argument
185 KASSERT(softc->dev_cfg_cap >= softc->dev_cfg_cnt, in ivhd_dev_add_entry()
187 if (softc->dev_cfg_cap == softc->dev_cfg_cnt) { in ivhd_dev_add_entry()
188 if (softc->dev_cfg_cap == 0) in ivhd_dev_add_entry()
189 softc->dev_cfg_cap = 1; in ivhd_dev_add_entry()
191 softc->dev_cfg_cap <<= 2; in ivhd_dev_add_entry()
192 softc->dev_cfg = realloc(softc->dev_cfg, in ivhd_dev_add_entry()
193 sizeof(*softc->dev_cfg) * softc->dev_cfg_cap, M_DEVBUF, in ivhd_dev_add_entry()
197 dev_cfg = &softc->dev_cfg[softc->dev_cfg_cnt++]; in ivhd_dev_add_entry()
208 ivhd_dev_parse(ACPI_IVRS_HARDWARE1 *ivhd, struct amdvi_softc *softc) in ivhd_dev_parse() argument
[all …]
/freebsd/sys/dev/enic/
H A Dif_enic.c239 enic_allocate_msix(struct enic_softc *softc) { in enic_allocate_msix() argument
248 dev = softc->dev; in enic_allocate_msix()
249 ctx = softc->ctx; in enic_allocate_msix()
250 scctx = softc->scctx; in enic_allocate_msix()
335 struct enic_softc *softc; in enic_attach_pre() local
349 softc = iflib_get_softc(ctx); in enic_attach_pre()
350 softc->dev = dev; in enic_attach_pre()
351 softc->ctx = ctx; in enic_attach_pre()
352 softc->sctx = iflib_get_sctx(ctx); in enic_attach_pre()
353 softc->scctx = iflib_get_softc_ctx(ctx); in enic_attach_pre()
[all …]
/freebsd/sys/cam/nvme/
H A Dnvme_da.c218 nda_nvme_flush(struct nda_softc *softc, struct ccb_nvmeio *nvmeio) in nda_nvme_flush() argument
227 nvme_ns_flush_cmd(&nvmeio->cmd, softc->nsid); in nda_nvme_flush()
231 nda_nvme_trim(struct nda_softc *softc, struct ccb_nvmeio *nvmeio, in nda_nvme_trim() argument
241 nvme_ns_trim_cmd(&nvmeio->cmd, softc->nsid, num_ranges); in nda_nvme_trim()
245 nda_nvme_write(struct nda_softc *softc, struct ccb_nvmeio *nvmeio, in nda_nvme_write() argument
255 nvme_ns_write_cmd(&nvmeio->cmd, softc->nsid, lba, count); in nda_nvme_write()
259 nda_nvme_rw_bio(struct nda_softc *softc, struct ccb_nvmeio *nvmeio, in nda_nvme_rw_bio() argument
275 count = bp->bio_bcount / softc->disk->d_sectorsize; in nda_nvme_rw_bio()
284 nvme_ns_rw_cmd(&nvmeio->cmd, rwcmd, softc->nsid, lba, count); in nda_nvme_rw_bio()
291 struct nda_softc *softc; in ndaopen() local
[all …]
/freebsd/sys/netpfil/ipfilter/netinet/
H A Dip_lookup.c95 ipf_lookup_soft_create(ipf_main_softc_t *softc) in ipf_lookup_soft_create() argument
108 softl->ipf_back[i] = (*(*l)->ipfl_create)(softc); in ipf_lookup_soft_create()
110 ipf_lookup_soft_destroy(softc, softl); in ipf_lookup_soft_create()
128 ipf_lookup_soft_init(ipf_main_softc_t *softc, void *arg) in ipf_lookup_soft_init() argument
135 err = (*backends[i]->ipfl_init)(softc, softl->ipf_back[i]); in ipf_lookup_soft_init()
153 ipf_lookup_soft_fini(ipf_main_softc_t *softc, void *arg) in ipf_lookup_soft_fini() argument
160 (*backends[i]->ipfl_fini)(softc, in ipf_lookup_soft_fini()
177 ipf_lookup_expire(ipf_main_softc_t *softc) in ipf_lookup_expire() argument
179 ipf_lookup_softc_t *softl = softc->ipf_lookup_soft; in ipf_lookup_expire()
182 WRITE_ENTER(&softc->ipf_poolrw); in ipf_lookup_expire()
[all …]
H A Dfil.c114 #define LBUMP(x) softc->x++
115 #define LBUMPD(x, y) do { softc->x.y++; DT(y); } while (0)
569 ipf_main_softc_t *softc = fin->fin_main_soft; in ipf_pr_ipv6hdr() local
582 ipf_main_softc_t *softc = fin->fin_main_soft; in ipf_pr_ipv6hdr() local
610 ipf_main_softc_t *softc = fin->fin_main_soft; in ipf_pr_ipv6exthdr() local
741 ipf_main_softc_t *softc = fin->fin_main_soft; in ipf_pr_routing6() local
790 ipf_main_softc_t *softc = fin->fin_main_soft; in ipf_pr_fragment6() local
848 ipf_main_softc_t *softc = fin->fin_main_soft; in ipf_pr_dstopts6() local
876 ipf_main_softc_t *softc = fin->fin_main_soft; in ipf_pr_icmp6() local
1010 ipf_main_softc_t *softc = fin->fin_main_soft; in ipf_pr_esp6() local
[all …]
H A Dip_frag.c160 ipf_frag_soft_create(ipf_main_softc_t *softc) in ipf_frag_soft_create() argument
178 ipf_frag_soft_destroy(softc, softf); in ipf_frag_soft_create()
181 if (ipf_tune_array_link(softc, softf->ipf_frag_tune) == -1) { in ipf_frag_soft_create()
182 ipf_frag_soft_destroy(softc, softf); in ipf_frag_soft_create()
206 ipf_frag_soft_destroy(ipf_main_softc_t *softc, void *arg) in ipf_frag_soft_destroy() argument
215 ipf_tune_array_unlink(softc, softf->ipf_frag_tune); in ipf_frag_soft_destroy()
234 ipf_frag_soft_init(ipf_main_softc_t *softc, void *arg) in ipf_frag_soft_init() argument
276 ipf_frag_soft_fini(ipf_main_softc_t *softc, void *arg) in ipf_frag_soft_fini() argument
283 ipf_frag_clear(softc); in ipf_frag_soft_fini()
356 ipfr_frag_new(ipf_main_softc_t *softc, ipf_frag_softc_t *softf, in ipfr_frag_new() argument
[all …]
/freebsd/sys/cam/ctl/
H A Dctl_frontend.c70 struct ctl_softc *softc = control_softc; in ctl_frontend_register() local
74 KASSERT(softc != NULL, ("CTL is not initialized")); in ctl_frontend_register()
77 mtx_lock(&softc->ctl_lock); in ctl_frontend_register()
78 STAILQ_FOREACH(fe_tmp, &softc->fe_list, links) { in ctl_frontend_register()
80 mtx_unlock(&softc->ctl_lock); in ctl_frontend_register()
84 mtx_unlock(&softc->ctl_lock); in ctl_frontend_register()
96 mtx_lock(&softc->ctl_lock); in ctl_frontend_register()
97 softc->num_frontends++; in ctl_frontend_register()
98 STAILQ_INSERT_TAIL(&softc->fe_list, fe, links); in ctl_frontend_register()
99 mtx_unlock(&softc->ctl_lock); in ctl_frontend_register()
[all …]
H A Dctl_backend.c65 struct ctl_softc *softc = control_softc; in ctl_backend_register() local
70 mtx_lock(&softc->ctl_lock); in ctl_backend_register()
71 STAILQ_FOREACH(be_tmp, &softc->be_list, links) { in ctl_backend_register()
73 mtx_unlock(&softc->ctl_lock); in ctl_backend_register()
77 mtx_unlock(&softc->ctl_lock); in ctl_backend_register()
91 mtx_lock(&softc->ctl_lock); in ctl_backend_register()
92 STAILQ_INSERT_TAIL(&softc->be_list, be, links); in ctl_backend_register()
93 softc->num_backends++; in ctl_backend_register()
94 mtx_unlock(&softc->ctl_lock); in ctl_backend_register()
101 struct ctl_softc *softc = control_softc; in ctl_backend_deregister() local
[all …]

123456789