Home
last modified time | relevance | path

Searched refs:vpd (Results 1 – 25 of 57) sorted by relevance

123

/drivers/pci/
Daccess.c277 if (!dev->vpd || !dev->vpd->ops) in PCI_USER_READ_CONFIG()
279 return dev->vpd->ops->read(dev, pos, count, buf); in PCI_USER_READ_CONFIG()
292 if (!dev->vpd || !dev->vpd->ops) in pci_write_vpd()
294 return dev->vpd->ops->write(dev, pos, count, buf); in pci_write_vpd()
305 if (!dev->vpd || !dev->vpd->ops) in pci_set_vpd_size()
307 return dev->vpd->ops->set_size(dev, len); in pci_set_vpd_size()
377 struct pci_vpd *vpd = dev->vpd; in pci_vpd_wait() local
383 if (!vpd->busy) in pci_vpd_wait()
387 ret = pci_user_read_config_word(dev, vpd->cap + PCI_VPD_ADDR, in pci_vpd_wait()
392 if ((status & PCI_VPD_ADDR_F) == vpd->flag) { in pci_vpd_wait()
[all …]
Dpci-sysfs.c1490 if (dev->vpd) { in pci_create_capabilities_sysfs()
1506 dev->vpd->attr = attr; in pci_create_capabilities_sysfs()
1522 if (dev->vpd && dev->vpd->attr) { in pci_create_capabilities_sysfs()
1523 sysfs_remove_bin_file(&dev->dev.kobj, dev->vpd->attr); in pci_create_capabilities_sysfs()
1524 kfree(dev->vpd->attr); in pci_create_capabilities_sysfs()
1600 if (dev->vpd && dev->vpd->attr) { in pci_remove_capabilities_sysfs()
1601 sysfs_remove_bin_file(&dev->dev.kobj, dev->vpd->attr); in pci_remove_capabilities_sysfs()
1602 kfree(dev->vpd->attr); in pci_remove_capabilities_sysfs()
DMakefile8 irq.o vpd.o setup-bus.o vc.o mmap.o setup-irq.o
/drivers/firmware/google/
DMakefile11 vpd-sysfs-y := vpd.o vpd_decode.o
12 obj-$(CONFIG_GOOGLE_VPD) += vpd-sysfs.o
DKconfig72 under /sys/firmware/vpd.
/drivers/target/
Dtarget_core_transport.c884 struct t10_vpd *vpd, in transport_dump_vpd_proto_id() argument
894 switch (vpd->protocol_identifier) { in transport_dump_vpd_proto_id()
926 vpd->protocol_identifier); in transport_dump_vpd_proto_id()
937 transport_set_vpd_proto_id(struct t10_vpd *vpd, unsigned char *page_83) in transport_set_vpd_proto_id() argument
945 vpd->protocol_identifier = (page_83[0] & 0xf0); in transport_set_vpd_proto_id()
946 vpd->protocol_identifier_set = 1; in transport_set_vpd_proto_id()
947 transport_dump_vpd_proto_id(vpd, NULL, 0); in transport_set_vpd_proto_id()
953 struct t10_vpd *vpd, in transport_dump_vpd_assoc() argument
964 switch (vpd->association) { in transport_dump_vpd_assoc()
975 sprintf(buf+len, "Unknown 0x%02x\n", vpd->association); in transport_dump_vpd_assoc()
[all …]
Dtarget_core_pscsi.c237 struct t10_vpd *vpd; in pscsi_get_inquiry_vpd_device_ident() local
267 vpd = kzalloc(sizeof(struct t10_vpd), GFP_KERNEL); in pscsi_get_inquiry_vpd_device_ident()
268 if (!vpd) { in pscsi_get_inquiry_vpd_device_ident()
273 INIT_LIST_HEAD(&vpd->vpd_list); in pscsi_get_inquiry_vpd_device_ident()
275 transport_set_vpd_proto_id(vpd, page_83); in pscsi_get_inquiry_vpd_device_ident()
276 transport_set_vpd_assoc(vpd, page_83); in pscsi_get_inquiry_vpd_device_ident()
278 if (transport_set_vpd_ident_type(vpd, page_83) < 0) { in pscsi_get_inquiry_vpd_device_ident()
281 kfree(vpd); in pscsi_get_inquiry_vpd_device_ident()
284 if (transport_set_vpd_ident(vpd, page_83) < 0) { in pscsi_get_inquiry_vpd_device_ident()
287 kfree(vpd); in pscsi_get_inquiry_vpd_device_ident()
[all …]
Dtarget_core_configfs.c1286 struct t10_vpd *vpd; in target_wwn_vpd_protocol_identifier_show() local
1293 list_for_each_entry(vpd, &t10_wwn->t10_vpd_list, vpd_list) { in target_wwn_vpd_protocol_identifier_show()
1294 if (!vpd->protocol_identifier_set) in target_wwn_vpd_protocol_identifier_show()
1297 transport_dump_vpd_proto_id(vpd, buf, VPD_TMP_BUF_SIZE); in target_wwn_vpd_protocol_identifier_show()
1317 struct t10_vpd *vpd; \
1322 list_for_each_entry(vpd, &t10_wwn->t10_vpd_list, vpd_list) { \
1323 if (vpd->association != _assoc) \
1327 transport_dump_vpd_assoc(vpd, buf, VPD_TMP_BUF_SIZE); \
1333 transport_dump_vpd_ident_type(vpd, buf, VPD_TMP_BUF_SIZE); \
1339 transport_dump_vpd_ident(vpd, buf, VPD_TMP_BUF_SIZE); \
Dtarget_core_device.c534 struct t10_vpd *vpd, *vpd_tmp; in se_release_vpd_for_dev() local
537 list_for_each_entry_safe(vpd, vpd_tmp, in se_release_vpd_for_dev()
539 list_del(&vpd->vpd_list); in se_release_vpd_for_dev()
540 kfree(vpd); in se_release_vpd_for_dev()
/drivers/net/ethernet/chelsio/cxgb3/
Dt3_hw.c198 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 …]
/drivers/net/ethernet/chelsio/cxgb4vf/
Dt4vf_common.h262 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()
/drivers/misc/cxl/
Dof.c117 char vpd[256]; in read_vpd() local
119 size_t len = sizeof(vpd); in read_vpd()
121 memset(vpd, 0, len); in read_vpd()
124 rc = cxl_guest_read_adapter_vpd(adapter, vpd, len); in read_vpd()
126 rc = cxl_guest_read_afu_vpd(afu, vpd, len); in read_vpd()
129 cxl_dump_debug_buffer(vpd, rc); in read_vpd()
/drivers/staging/dgnc/
Ddgnc_neo.c66 .vpd = neo_vpd,
1673 brd->vpd[i * 2] = a & 0xff; in neo_vpd()
1674 brd->vpd[(i * 2) + 1] = (a >> 8) & 0xff; in neo_vpd()
1683 if (((brd->vpd[0x08] != 0x82) && in neo_vpd()
1684 (brd->vpd[0x10] != 0x82)) || in neo_vpd()
1685 (brd->vpd[0x7F] != 0x78)) { in neo_vpd()
1686 memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE); in neo_vpd()
1690 if (brd->vpd[i] == 'S' && brd->vpd[i + 1] == 'N') in neo_vpd()
1691 strncpy(brd->serial_num, &brd->vpd[i + 3], 9); in neo_vpd()
Ddgnc_driver.h85 void (*vpd)(struct dgnc_board *brd); member
162 unsigned char vpd[128]; member
Ddgnc_driver.c186 brd->bd_ops->vpd(brd); in dgnc_found_board()
242 brd->bd_ops->vpd(brd); in dgnc_found_board()
/drivers/scsi/csiostor/
Dcsio_hw.h452 struct csio_vpd vpd; member
524 return (ticks * 1000 + hw->vpd.cclk/2) / hw->vpd.cclk; in csio_core_ticks_to_us()
530 return (us * hw->vpd.cclk) / 1000; in csio_us_to_core_ticks()
Dcsio_hw.c306 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 …]
/drivers/net/ethernet/sun/
Dniu.c6804 struct niu_vpd *vpd = &np->vpd; in niu_get_drvinfo() local
6809 vpd->fcode_major, vpd->fcode_minor); in niu_get_drvinfo()
8066 struct niu_vpd *vpd = &np->vpd; in niu_vpd_parse_version() local
8067 int len = strlen(vpd->version) + 1; in niu_vpd_parse_version()
8068 const char *s = vpd->version; in niu_vpd_parse_version()
8079 sscanf(s, "%d.%d", &vpd->fcode_major, &vpd->fcode_minor); in niu_vpd_parse_version()
8083 vpd->fcode_major, vpd->fcode_minor); in niu_vpd_parse_version()
8084 if (vpd->fcode_major > NIU_VPD_MIN_MAJOR || in niu_vpd_parse_version()
8085 (vpd->fcode_major == NIU_VPD_MIN_MAJOR && in niu_vpd_parse_version()
8086 vpd->fcode_minor >= NIU_VPD_MIN_MINOR)) in niu_vpd_parse_version()
[all …]
/drivers/net/ethernet/chelsio/cxgb/
Dsubr.c587 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()
/drivers/scsi/
Dipr.h362 struct ipr_vpd vpd; member
367 struct ipr_vpd vpd; member
872 struct ipr_vpd vpd; member
881 struct ipr_ext_vpd vpd; member
891 struct ipr_ext_vpd vpd; member
901 struct ipr_vpd vpd; member
907 struct ipr_ext_vpd vpd; member
914 struct ipr_ext_vpd vpd; member
1029 struct ipr_vpd vpd; member
1035 struct ipr_ext_vpd vpd; member
Dipr.c1563 struct ipr_vpd *vpd) in ipr_log_vpd_compact() argument
1568 memcpy(buffer, vpd->vpids.vendor_id, IPR_VENDOR_ID_LEN); in ipr_log_vpd_compact()
1571 memcpy(&buffer[i], vpd->vpids.product_id, IPR_PROD_ID_LEN); in ipr_log_vpd_compact()
1574 memcpy(&buffer[i], vpd->sn, IPR_SERIAL_NUM_LEN); in ipr_log_vpd_compact()
1587 static void ipr_log_vpd(struct ipr_vpd *vpd) in ipr_log_vpd() argument
1592 memcpy(buffer, vpd->vpids.vendor_id, IPR_VENDOR_ID_LEN); in ipr_log_vpd()
1593 memcpy(buffer + IPR_VENDOR_ID_LEN, vpd->vpids.product_id, in ipr_log_vpd()
1598 memcpy(buffer, vpd->sn, IPR_SERIAL_NUM_LEN); in ipr_log_vpd()
1613 struct ipr_ext_vpd *vpd) in ipr_log_ext_vpd_compact() argument
1615 ipr_log_vpd_compact(prefix, hostrcb, &vpd->vpd); in ipr_log_ext_vpd_compact()
[all …]
/drivers/scsi/aic7xxx/
Daic79xx_pci.c516 struct vpd_config vpd; in ahd_check_extport() local
536 + (sizeof(vpd) * (ahd->channel - 'A'))) / 2; in ahd_check_extport()
538 error = ahd_read_seeprom(ahd, (uint16_t *)&vpd, in ahd_check_extport()
539 start_addr, sizeof(vpd)/2, in ahd_check_extport()
542 error = ahd_parse_vpddata(ahd, &vpd); in ahd_check_extport()
/drivers/net/ethernet/chelsio/cxgb4/
Dt4_hw.c2665 u8 *vpd, csum; in t4_get_raw_vpd_params() local
2668 vpd = vmalloc(VPD_LEN); in t4_get_raw_vpd_params()
2669 if (!vpd) in t4_get_raw_vpd_params()
2675 ret = pci_read_vpd(adapter->pdev, VPD_BASE, sizeof(u32), vpd); in t4_get_raw_vpd_params()
2685 addr = *vpd == CHELSIO_VPD_UNIQUE_ID ? VPD_BASE : VPD_BASE_OLD; in t4_get_raw_vpd_params()
2687 ret = pci_read_vpd(adapter->pdev, addr, VPD_LEN, vpd); in t4_get_raw_vpd_params()
2691 if (vpd[0] != PCI_VPD_LRDT_ID_STRING) { in t4_get_raw_vpd_params()
2697 id_len = pci_vpd_lrdt_size(vpd); in t4_get_raw_vpd_params()
2701 i = pci_vpd_find_tag(vpd, 0, VPD_LEN, PCI_VPD_LRDT_RO_DATA); in t4_get_raw_vpd_params()
2708 vpdr_len = pci_vpd_lrdt_size(&vpd[i]); in t4_get_raw_vpd_params()
[all …]
Dcxgb4.h330 struct vpd_params vpd; member
1298 return adap->params.vpd.cclk / 1000; in core_ticks_per_usec()
1304 return (us * adap->params.vpd.cclk) / 1000; in us_to_core_ticks()
1311 return ((ticks * 1000 + adapter->params.vpd.cclk/2) / in core_ticks_to_us()
1312 adapter->params.vpd.cclk); in core_ticks_to_us()
/drivers/scsi/lpfc/
Dlpfc_init.c119 lpfc_vpd_t *vp = &phba->vpd; in lpfc_config_port_prep()
2099 lpfc_parse_vpd(struct lpfc_hba *phba, uint8_t *vpd, int len) in lpfc_parse_vpd() argument
2107 if (!vpd) in lpfc_parse_vpd()
2113 (uint32_t) vpd[0], (uint32_t) vpd[1], (uint32_t) vpd[2], in lpfc_parse_vpd()
2114 (uint32_t) vpd[3]); in lpfc_parse_vpd()
2116 switch (vpd[index]) { in lpfc_parse_vpd()
2120 lenlo = vpd[index]; in lpfc_parse_vpd()
2122 lenhi = vpd[index]; in lpfc_parse_vpd()
2129 lenlo = vpd[index]; in lpfc_parse_vpd()
2131 lenhi = vpd[index]; in lpfc_parse_vpd()
[all …]

123