Lines Matching refs:vpd
944 cfg->vpd.vpd_reg = ptr; in pci_read_cap()
1019 WREG(cfg->vpd.vpd_reg + PCIR_VPD_ADDR, reg, 2); in pci_read_vpd_reg()
1021 while ((REG(cfg->vpd.vpd_reg + PCIR_VPD_ADDR, 2) & 0x8000) != 0x8000) { in pci_read_vpd_reg()
1026 *data = (REG(cfg->vpd.vpd_reg + PCIR_VPD_DATA, 4)); in pci_read_vpd_reg()
1039 WREG(cfg->vpd.vpd_reg + PCIR_VPD_DATA, data, 4);
1040 WREG(cfg->vpd.vpd_reg + PCIR_VPD_ADDR, reg | 0x8000, 2);
1041 while ((REG(cfg->vpd.vpd_reg + PCIR_VPD_ADDR, 2) & 0x8000) == 0x8000) {
1209 struct pcicfg_vpd *vpd; in next_vpd_ro_elem() local
1215 vpd = &cfg->vpd; in next_vpd_ro_elem()
1219 vpd->vpd_ros = alloc_buffer(vpd->vpd_ros, sizeof(*vpd->vpd_ros), vpd->vpd_rocnt); in next_vpd_ro_elem()
1220 vpd_ros = &vpd->vpd_ros[vpd->vpd_rocnt]; in next_vpd_ro_elem()
1234 vpd->vpd_rocnt++; in next_vpd_ro_elem()
1243 struct pcicfg_vpd *vpd; in next_vpd_rw_elem() local
1249 vpd = &cfg->vpd; in next_vpd_rw_elem()
1253 vpd->vpd_w = alloc_buffer(vpd->vpd_w, sizeof(*vpd->vpd_w), vpd->vpd_wcnt); in next_vpd_rw_elem()
1254 if (vpd->vpd_w == NULL) { in next_vpd_rw_elem()
1258 vpd_w = &vpd->vpd_w[vpd->vpd_wcnt]; in next_vpd_rw_elem()
1265 vpd->vpd_wcnt++; in next_vpd_rw_elem()
1272 vpd_free(struct pcicfg_vpd *vpd) in vpd_free() argument
1276 free(vpd->vpd_ident, M_DEVBUF); in vpd_free()
1277 for (i = 0; i < vpd->vpd_rocnt; i++) in vpd_free()
1278 free(vpd->vpd_ros[i].value, M_DEVBUF); in vpd_free()
1279 free(vpd->vpd_ros, M_DEVBUF); in vpd_free()
1280 vpd->vpd_rocnt = 0; in vpd_free()
1281 for (i = 0; i < vpd->vpd_wcnt; i++) in vpd_free()
1282 free(vpd->vpd_w[i].value, M_DEVBUF); in vpd_free()
1283 free(vpd->vpd_w, M_DEVBUF); in vpd_free()
1284 vpd->vpd_wcnt = 0; in vpd_free()
1312 cfg->vpd.vpd_ident = vpd_read_value(&vrs, size); in pci_parse_vpd()
1313 if (cfg->vpd.vpd_ident == NULL) { in pci_parse_vpd()
1364 vpd_free(&cfg->vpd); in pci_read_vpd()
1365 cfg->vpd.vpd_cached = 1; in pci_read_vpd()
1376 if (!cfg->vpd.vpd_cached && cfg->vpd.vpd_reg != 0) in pci_get_vpd_ident_method()
1379 *identptr = cfg->vpd.vpd_ident; in pci_get_vpd_ident_method()
1395 if (!cfg->vpd.vpd_cached && cfg->vpd.vpd_reg != 0) in pci_get_vpd_readonly_method()
1398 for (i = 0; i < cfg->vpd.vpd_rocnt; i++) in pci_get_vpd_readonly_method()
1399 if (memcmp(kw, cfg->vpd.vpd_ros[i].keyword, in pci_get_vpd_readonly_method()
1400 sizeof(cfg->vpd.vpd_ros[i].keyword)) == 0) { in pci_get_vpd_readonly_method()
1401 *vptr = cfg->vpd.vpd_ros[i].value; in pci_get_vpd_readonly_method()
1415 if (!cfg->vpd.vpd_cached && cfg->vpd.vpd_reg != 0) in pci_fetch_vpd_list()
1417 return (&cfg->vpd); in pci_fetch_vpd_list()
2764 if (dinfo->cfg.vpd.vpd_reg) in pci_freecfg()
2765 vpd_free(&dinfo->cfg.vpd); in pci_freecfg()