Lines Matching refs:tl
58 struct nfp_dump_tl tl; member
64 struct nfp_dump_tl tl; member
70 struct nfp_dump_tl tl; member
78 struct nfp_dump_tl tl; member
87 struct nfp_dump_tl tl; member
92 struct nfp_dump_tl tl; member
112 typedef int (*nfp_tlv_visit)(struct nfp_pf *pf, struct nfp_dump_tl *tl,
120 struct nfp_dump_tl *tl; in nfp_traverse_tlvs() local
125 while (remaining >= sizeof(*tl)) { in nfp_traverse_tlvs()
126 tl = p; in nfp_traverse_tlvs()
127 if (!tl->type && !tl->length) in nfp_traverse_tlvs()
130 if (be32_to_cpu(tl->length) > remaining - sizeof(*tl)) in nfp_traverse_tlvs()
133 total_tlv_size = sizeof(*tl) + be32_to_cpu(tl->length); in nfp_traverse_tlvs()
141 err = tlv_visit(pf, tl, param); in nfp_traverse_tlvs()
216 u32 required_read_sz = sizeof(*spec_csr) - sizeof(spec_csr->tl); in nfp_csr_spec_valid()
217 u32 available_sz = be32_to_cpu(spec_csr->tl.length); in nfp_csr_spec_valid()
251 nfp_add_tlv_size(struct nfp_pf *pf, struct nfp_dump_tl *tl, void *param) in nfp_add_tlv_size() argument
257 switch (be32_to_cpu(tl->type)) { in nfp_add_tlv_size()
264 spec_csr = (struct nfp_dumpspec_csr *)tl; in nfp_add_tlv_size()
266 *size += nfp_dump_error_tlv_size(tl); in nfp_add_tlv_size()
272 spec_csr = (struct nfp_dumpspec_csr *)tl; in nfp_add_tlv_size()
274 *size += nfp_dump_error_tlv_size(tl); in nfp_add_tlv_size()
281 *size += nfp_calc_rtsym_dump_sz(pf, tl); in nfp_add_tlv_size()
288 *size += nfp_calc_hwinfo_field_sz(pf, tl); in nfp_add_tlv_size()
291 *size += nfp_dump_error_tlv_size(tl); in nfp_add_tlv_size()
331 struct nfp_dump_tl *tl = dump->p; in nfp_add_tlv() local
339 tl->type = cpu_to_be32(type); in nfp_add_tlv()
340 tl->length = cpu_to_be32(total_tlv_sz - sizeof(*tl)); in nfp_add_tlv()
461 return nfp_dump_error_tlv(&spec_csr->tl, -EINVAL, dump); in nfp_dump_csr_range()
469 err = nfp_add_tlv(be32_to_cpu(spec_csr->tl.type), total_size, dump); in nfp_dump_csr_range()
563 return nfp_dump_error_tlv(&spec_csr->tl, -EINVAL, dump); in nfp_dump_indirect_csr_range()
572 err = nfp_add_tlv(be32_to_cpu(spec_csr->tl.type), total_size, dump); in nfp_dump_indirect_csr_range()
610 tl_len = be32_to_cpu(spec->tl.length); in nfp_dump_single_rtsym()
613 return nfp_dump_error_tlv(&spec->tl, -EINVAL, dump); in nfp_dump_single_rtsym()
617 return nfp_dump_error_tlv(&spec->tl, -ENOENT, dump); in nfp_dump_single_rtsym()
625 err = nfp_add_tlv(be32_to_cpu(spec->tl.type), total_size, dump); in nfp_dump_single_rtsym()
654 nfp_dump_for_tlv(struct nfp_pf *pf, struct nfp_dump_tl *tl, void *param) in nfp_dump_for_tlv() argument
661 switch (be32_to_cpu(tl->type)) { in nfp_dump_for_tlv()
670 spec_csr = (struct nfp_dumpspec_csr *)tl; in nfp_dump_for_tlv()
676 spec_csr = (struct nfp_dumpspec_csr *)tl; in nfp_dump_for_tlv()
682 spec_rtsym = (struct nfp_dumpspec_rtsym *)tl; in nfp_dump_for_tlv()
688 err = nfp_dump_hwinfo(pf, tl, dump); in nfp_dump_for_tlv()
693 err = nfp_dump_hwinfo_field(pf, tl, dump); in nfp_dump_for_tlv()
698 err = nfp_dump_error_tlv(tl, -EOPNOTSUPP, dump); in nfp_dump_for_tlv()