/Linux-v5.4/drivers/pci/ |
D | vpd.c | 42 if (!dev->vpd || !dev->vpd->ops) in pci_read_vpd() 44 return dev->vpd->ops->read(dev, pos, count, buf); in pci_read_vpd() 57 if (!dev->vpd || !dev->vpd->ops) in pci_write_vpd() 59 return dev->vpd->ops->write(dev, pos, count, buf); in pci_write_vpd() 70 if (!dev->vpd || !dev->vpd->ops) in pci_set_vpd_size() 72 return dev->vpd->ops->set_size(dev, len); in pci_set_vpd_size() 140 struct pci_vpd *vpd = dev->vpd; in pci_vpd_wait() local 146 if (!vpd->busy) in pci_vpd_wait() 150 ret = pci_user_read_config_word(dev, vpd->cap + PCI_VPD_ADDR, in pci_vpd_wait() 155 if ((status & PCI_VPD_ADDR_F) == vpd->flag) { in pci_vpd_wait() [all …]
|
D | Makefile | 7 pci-sysfs.o rom.o setup-res.o irq.o vpd.o \
|
/Linux-v5.4/drivers/firmware/google/ |
D | Makefile | 10 vpd-sysfs-y := vpd.o vpd_decode.o 11 obj-$(CONFIG_GOOGLE_VPD) += vpd-sysfs.o
|
D | Kconfig | 75 under /sys/firmware/vpd.
|
/Linux-v5.4/drivers/target/ |
D | target_core_transport.c | 942 struct t10_vpd *vpd, in transport_dump_vpd_proto_id() argument 952 switch (vpd->protocol_identifier) { in transport_dump_vpd_proto_id() 984 vpd->protocol_identifier); in transport_dump_vpd_proto_id() 995 transport_set_vpd_proto_id(struct t10_vpd *vpd, unsigned char *page_83) in transport_set_vpd_proto_id() argument 1003 vpd->protocol_identifier = (page_83[0] & 0xf0); in transport_set_vpd_proto_id() 1004 vpd->protocol_identifier_set = 1; in transport_set_vpd_proto_id() 1005 transport_dump_vpd_proto_id(vpd, NULL, 0); in transport_set_vpd_proto_id() 1011 struct t10_vpd *vpd, in transport_dump_vpd_assoc() argument 1022 switch (vpd->association) { in transport_dump_vpd_assoc() 1033 sprintf(buf+len, "Unknown 0x%02x\n", vpd->association); in transport_dump_vpd_assoc() [all …]
|
D | target_core_pscsi.c | 224 struct t10_vpd *vpd; in pscsi_get_inquiry_vpd_device_ident() local 254 vpd = kzalloc(sizeof(struct t10_vpd), GFP_KERNEL); in pscsi_get_inquiry_vpd_device_ident() 255 if (!vpd) { in pscsi_get_inquiry_vpd_device_ident() 260 INIT_LIST_HEAD(&vpd->vpd_list); in pscsi_get_inquiry_vpd_device_ident() 262 transport_set_vpd_proto_id(vpd, page_83); in pscsi_get_inquiry_vpd_device_ident() 263 transport_set_vpd_assoc(vpd, page_83); in pscsi_get_inquiry_vpd_device_ident() 265 if (transport_set_vpd_ident_type(vpd, page_83) < 0) { in pscsi_get_inquiry_vpd_device_ident() 268 kfree(vpd); in pscsi_get_inquiry_vpd_device_ident() 271 if (transport_set_vpd_ident(vpd, page_83) < 0) { in pscsi_get_inquiry_vpd_device_ident() 274 kfree(vpd); in pscsi_get_inquiry_vpd_device_ident() [all …]
|
D | target_core_device.c | 520 struct t10_vpd *vpd, *vpd_tmp; in se_release_vpd_for_dev() local 523 list_for_each_entry_safe(vpd, vpd_tmp, in se_release_vpd_for_dev() 525 list_del(&vpd->vpd_list); in se_release_vpd_for_dev() 526 kfree(vpd); in se_release_vpd_for_dev()
|
D | target_core_configfs.c | 1492 struct t10_vpd *vpd; in target_wwn_vpd_protocol_identifier_show() local 1499 list_for_each_entry(vpd, &t10_wwn->t10_vpd_list, vpd_list) { in target_wwn_vpd_protocol_identifier_show() 1500 if (!vpd->protocol_identifier_set) in target_wwn_vpd_protocol_identifier_show() 1503 transport_dump_vpd_proto_id(vpd, buf, VPD_TMP_BUF_SIZE); in target_wwn_vpd_protocol_identifier_show() 1523 struct t10_vpd *vpd; \ 1528 list_for_each_entry(vpd, &t10_wwn->t10_vpd_list, vpd_list) { \ 1529 if (vpd->association != _assoc) \ 1533 transport_dump_vpd_assoc(vpd, buf, VPD_TMP_BUF_SIZE); \ 1539 transport_dump_vpd_ident_type(vpd, buf, VPD_TMP_BUF_SIZE); \ 1545 transport_dump_vpd_ident(vpd, buf, VPD_TMP_BUF_SIZE); \
|
/Linux-v5.4/drivers/net/ethernet/chelsio/cxgb3/ |
D | t3_hw.c | 198 u32 clkdiv = adap->params.vpd.cclk / (2 * adap->params.vpd.mdc) - 1; in mi1_init() 712 struct t3_vpd vpd; in get_vpd_params() local 718 ret = t3_seeprom_read(adapter, VPD_BASE, (__le32 *)&vpd); in get_vpd_params() 721 addr = vpd.id_tag == 0x82 ? VPD_BASE : 0; in get_vpd_params() 723 for (i = 0; i < sizeof(vpd); i += 4) { in get_vpd_params() 725 (__le32 *)((u8 *)&vpd + i)); in get_vpd_params() 730 ret = vpdstrtouint(vpd.cclk_data, vpd.cclk_len, 10, &p->cclk); in get_vpd_params() 733 ret = vpdstrtouint(vpd.mclk_data, vpd.mclk_len, 10, &p->mclk); in get_vpd_params() 736 ret = vpdstrtouint(vpd.uclk_data, vpd.uclk_len, 10, &p->uclk); in get_vpd_params() 739 ret = vpdstrtouint(vpd.mdc_data, vpd.mdc_len, 10, &p->mdc); in get_vpd_params() [all …]
|
D | common.h | 385 struct vpd_params vpd; member 634 return adap->params.vpd.cclk / 1000; in core_ticks_per_usec()
|
/Linux-v5.4/drivers/net/ethernet/chelsio/cxgb4vf/ |
D | t4vf_common.h | 262 struct vpd_params vpd; /* Vital Product Data */ member 310 return adapter->params.vpd.cclk / 1000; in core_ticks_per_usec() 316 return (us * adapter->params.vpd.cclk) / 1000; in us_to_core_ticks() 322 return (ticks * 1000) / adapter->params.vpd.cclk; in core_ticks_to_us()
|
/Linux-v5.4/drivers/misc/cxl/ |
D | of.c | 113 char vpd[256]; in read_vpd() local 115 size_t len = sizeof(vpd); in read_vpd() 117 memset(vpd, 0, len); in read_vpd() 120 rc = cxl_guest_read_adapter_vpd(adapter, vpd, len); in read_vpd() 122 rc = cxl_guest_read_afu_vpd(afu, vpd, len); in read_vpd() 125 cxl_dump_debug_buffer(vpd, rc); in read_vpd()
|
/Linux-v5.4/drivers/net/ethernet/ibm/ |
D | ibmvnic.c | 604 if (!adapter->vpd) in release_vpd_data() 607 kfree(adapter->vpd->buff); in release_vpd_data() 608 kfree(adapter->vpd); in release_vpd_data() 610 adapter->vpd = NULL; in release_vpd_data() 943 if (adapter->vpd->buff) in ibmvnic_get_vpd() 944 len = adapter->vpd->len; in ibmvnic_get_vpd() 954 if (!adapter->vpd->len) in ibmvnic_get_vpd() 957 if (!adapter->vpd->buff) in ibmvnic_get_vpd() 958 adapter->vpd->buff = kzalloc(adapter->vpd->len, GFP_KERNEL); in ibmvnic_get_vpd() 959 else if (adapter->vpd->len != len) in ibmvnic_get_vpd() [all …]
|
/Linux-v5.4/drivers/scsi/csiostor/ |
D | csio_hw.h | 510 struct csio_vpd vpd; member 582 return (ticks * 1000 + hw->vpd.cclk/2) / hw->vpd.cclk; in csio_core_ticks_to_us() 588 return (us * hw->vpd.cclk) / 1000; in csio_us_to_core_ticks()
|
D | csio_hw.c | 306 uint8_t *vpd, csum; in csio_hw_get_vpd_params() local 319 vpd = kzalloc(VPD_LEN, GFP_ATOMIC); in csio_hw_get_vpd_params() 320 if (vpd == NULL) in csio_hw_get_vpd_params() 327 ret = csio_hw_seeprom_read(hw, VPD_BASE, (uint32_t *)(vpd)); in csio_hw_get_vpd_params() 328 addr = *vpd == 0x82 ? VPD_BASE : VPD_BASE_OLD; in csio_hw_get_vpd_params() 331 ret = csio_hw_seeprom_read(hw, addr + i, (uint32_t *)(vpd + i)); in csio_hw_get_vpd_params() 333 kfree(vpd); in csio_hw_get_vpd_params() 341 v = (const struct t4_vpd_hdr *)vpd; in csio_hw_get_vpd_params() 347 kfree(vpd); \ in csio_hw_get_vpd_params() 354 csum += vpd[i]; in csio_hw_get_vpd_params() [all …]
|
/Linux-v5.4/drivers/net/ethernet/chelsio/cxgb/ |
D | subr.c | 587 static int t1_eeprom_vpd_get(adapter_t *adapter, struct chelsio_vpd_t *vpd) in t1_eeprom_vpd_get() argument 591 for (addr = 0; !ret && addr < sizeof(*vpd); addr += sizeof(u32)) in t1_eeprom_vpd_get() 593 (__le32 *)((u8 *)vpd + addr)); in t1_eeprom_vpd_get() 603 struct chelsio_vpd_t vpd; in vpd_macaddress_get() local 605 if (t1_eeprom_vpd_get(adapter, &vpd)) in vpd_macaddress_get() 607 memcpy(mac_addr, vpd.mac_base_address, 5); in vpd_macaddress_get() 608 mac_addr[5] = vpd.mac_base_address[5] + index; in vpd_macaddress_get()
|
/Linux-v5.4/drivers/net/ethernet/sun/ |
D | niu.c | 6783 struct niu_vpd *vpd = &np->vpd; in niu_get_drvinfo() local 6788 vpd->fcode_major, vpd->fcode_minor); in niu_get_drvinfo() 8046 struct niu_vpd *vpd = &np->vpd; in niu_vpd_parse_version() local 8047 int len = strlen(vpd->version) + 1; in niu_vpd_parse_version() 8048 const char *s = vpd->version; in niu_vpd_parse_version() 8059 sscanf(s, "%d.%d", &vpd->fcode_major, &vpd->fcode_minor); in niu_vpd_parse_version() 8063 vpd->fcode_major, vpd->fcode_minor); in niu_vpd_parse_version() 8064 if (vpd->fcode_major > NIU_VPD_MIN_MAJOR || in niu_vpd_parse_version() 8065 (vpd->fcode_major == NIU_VPD_MIN_MAJOR && in niu_vpd_parse_version() 8066 vpd->fcode_minor >= NIU_VPD_MIN_MINOR)) in niu_vpd_parse_version() [all …]
|
/Linux-v5.4/drivers/scsi/aic7xxx/ |
D | aic79xx_pci.c | 508 struct vpd_config vpd; in ahd_check_extport() local 528 + (sizeof(vpd) * (ahd->channel - 'A'))) / 2; in ahd_check_extport() 530 error = ahd_read_seeprom(ahd, (uint16_t *)&vpd, in ahd_check_extport() 531 start_addr, sizeof(vpd)/2, in ahd_check_extport() 534 error = ahd_parse_vpddata(ahd, &vpd); in ahd_check_extport()
|
/Linux-v5.4/drivers/scsi/ |
D | ipr.h | 349 struct ipr_vpd vpd; member 354 struct ipr_vpd vpd; member 859 struct ipr_vpd vpd; member 868 struct ipr_ext_vpd vpd; member 878 struct ipr_ext_vpd vpd; member 888 struct ipr_vpd vpd; member 894 struct ipr_ext_vpd vpd; member 901 struct ipr_ext_vpd vpd; member 1016 struct ipr_vpd vpd; member 1022 struct ipr_ext_vpd vpd; member
|
D | ipr.c | 1549 struct ipr_vpd *vpd) in ipr_log_vpd_compact() argument 1554 memcpy(buffer, vpd->vpids.vendor_id, IPR_VENDOR_ID_LEN); in ipr_log_vpd_compact() 1557 memcpy(&buffer[i], vpd->vpids.product_id, IPR_PROD_ID_LEN); in ipr_log_vpd_compact() 1560 memcpy(&buffer[i], vpd->sn, IPR_SERIAL_NUM_LEN); in ipr_log_vpd_compact() 1573 static void ipr_log_vpd(struct ipr_vpd *vpd) in ipr_log_vpd() argument 1578 memcpy(buffer, vpd->vpids.vendor_id, IPR_VENDOR_ID_LEN); in ipr_log_vpd() 1579 memcpy(buffer + IPR_VENDOR_ID_LEN, vpd->vpids.product_id, in ipr_log_vpd() 1584 memcpy(buffer, vpd->sn, IPR_SERIAL_NUM_LEN); in ipr_log_vpd() 1599 struct ipr_ext_vpd *vpd) in ipr_log_ext_vpd_compact() argument 1601 ipr_log_vpd_compact(prefix, hostrcb, &vpd->vpd); in ipr_log_ext_vpd_compact() [all …]
|
/Linux-v5.4/drivers/net/ethernet/chelsio/cxgb4/ |
D | t4_hw.c | 2754 u8 *vpd, csum; in t4_get_raw_vpd_params() local 2757 vpd = vmalloc(VPD_LEN); in t4_get_raw_vpd_params() 2758 if (!vpd) in t4_get_raw_vpd_params() 2764 ret = pci_read_vpd(adapter->pdev, VPD_BASE, sizeof(u32), vpd); in t4_get_raw_vpd_params() 2774 addr = *vpd == CHELSIO_VPD_UNIQUE_ID ? VPD_BASE : VPD_BASE_OLD; in t4_get_raw_vpd_params() 2776 ret = pci_read_vpd(adapter->pdev, addr, VPD_LEN, vpd); in t4_get_raw_vpd_params() 2780 if (vpd[0] != PCI_VPD_LRDT_ID_STRING) { in t4_get_raw_vpd_params() 2786 id_len = pci_vpd_lrdt_size(vpd); in t4_get_raw_vpd_params() 2790 i = pci_vpd_find_tag(vpd, 0, VPD_LEN, PCI_VPD_LRDT_RO_DATA); in t4_get_raw_vpd_params() 2797 vpdr_len = pci_vpd_lrdt_size(&vpd[i]); in t4_get_raw_vpd_params() [all …]
|
D | cxgb4.h | 366 struct vpd_params vpd; member 1475 return adap->params.vpd.cclk / 1000; in core_ticks_per_usec() 1481 return (us * adap->params.vpd.cclk) / 1000; in us_to_core_ticks() 1488 return ((ticks * 1000 + adapter->params.vpd.cclk/2) / in core_ticks_to_us() 1489 adapter->params.vpd.cclk); in core_ticks_to_us()
|
D | cudbg_lib.c | 1222 if (!padap->params.vpd.cclk) in cudbg_collect_hw_sched() 1540 if (!padap->params.vpd.cclk) in cudbg_collect_clk_info() 1549 clk_info_buff->cclk_ps = 1000000000 / padap->params.vpd.cclk; /* psec */ in cudbg_collect_clk_info() 2275 struct vpd_params vpd = { 0 }; in cudbg_collect_vpd_data() local 2278 rc = t4_get_raw_vpd_params(padap, &vpd); in cudbg_collect_vpd_data() 2320 memcpy(vpd_data->sn, vpd.sn, SERNUM_LEN + 1); in cudbg_collect_vpd_data() 2321 memcpy(vpd_data->bn, vpd.pn, PN_LEN + 1); in cudbg_collect_vpd_data() 2322 memcpy(vpd_data->na, vpd.na, MACADDR_LEN + 1); in cudbg_collect_vpd_data() 2323 memcpy(vpd_data->mn, vpd.id, ID_LEN + 1); in cudbg_collect_vpd_data()
|
/Linux-v5.4/drivers/net/ethernet/brocade/bna/ |
D | bfa_defs.h | 48 struct bfa_mfg_vpd vpd; member
|
/Linux-v5.4/drivers/scsi/lpfc/ |
D | lpfc_init.c | 116 lpfc_vpd_t *vp = &phba->vpd; in lpfc_config_port_prep() 2119 lpfc_parse_vpd(struct lpfc_hba *phba, uint8_t *vpd, int len) in lpfc_parse_vpd() argument 2127 if (!vpd) in lpfc_parse_vpd() 2133 (uint32_t) vpd[0], (uint32_t) vpd[1], (uint32_t) vpd[2], in lpfc_parse_vpd() 2134 (uint32_t) vpd[3]); in lpfc_parse_vpd() 2136 switch (vpd[index]) { in lpfc_parse_vpd() 2140 lenlo = vpd[index]; in lpfc_parse_vpd() 2142 lenhi = vpd[index]; in lpfc_parse_vpd() 2149 lenlo = vpd[index]; in lpfc_parse_vpd() 2151 lenhi = vpd[index]; in lpfc_parse_vpd() [all …]
|