/kernel/linux/linux-5.10/drivers/pci/ |
H A D | vpd.c | 36 * @pos: offset in vpd space 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() 51 * @pos: offset in vpd space 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() 66 * @len: size of vpd space 70 if (!dev->vpd || !de in pci_set_vpd_size() 140 struct pci_vpd *vpd = dev->vpd; pci_vpd_wait() local 178 struct pci_vpd *vpd = dev->vpd; pci_vpd_read() local 245 struct pci_vpd *vpd = dev->vpd; pci_vpd_write() local 302 struct pci_vpd *vpd = dev->vpd; pci_vpd_set_size() local 371 struct pci_vpd *vpd; pci_vpd_init() local [all...] |
/kernel/linux/linux-6.6/drivers/pci/ |
H A D | vpd.c | 101 struct pci_vpd *vpd = &dev->vpd; in pci_vpd_available() local 103 if (!vpd->cap) in pci_vpd_available() 106 if (vpd->len == 0 && check_size) { in pci_vpd_available() 107 vpd->len = pci_vpd_size(dev); in pci_vpd_available() 108 if (vpd->len == PCI_VPD_SZ_INVALID) { in pci_vpd_available() 109 vpd->cap = 0; in pci_vpd_available() 128 struct pci_vpd *vpd = &dev->vpd; in pci_vpd_wait() local 135 ret = pci_user_read_config_word(dev, vpd in pci_vpd_wait() 158 struct pci_vpd *vpd = &dev->vpd; pci_vpd_read() local 222 struct pci_vpd *vpd = &dev->vpd; pci_vpd_write() local 522 const u8 *vpd = buf; pci_vpd_check_csum() local [all...] |
/kernel/linux/linux-5.10/drivers/firmware/google/ |
H A D | Makefile | 10 vpd-sysfs-y := vpd.o vpd_decode.o 11 obj-$(CONFIG_GOOGLE_VPD) += vpd-sysfs.o
|
/kernel/linux/linux-6.6/drivers/firmware/google/ |
H A D | Makefile | 13 vpd-sysfs-y := vpd.o vpd_decode.o 14 obj-$(CONFIG_GOOGLE_VPD) += vpd-sysfs.o
|
/kernel/linux/linux-5.10/drivers/net/ethernet/chelsio/cxgb3/ |
H A 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 in get_vpd_params() 3377 const struct vpd_params *vpd = &adapter->params.vpd; t3_init_hw() local [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/chelsio/cxgb3/ |
H A D | t3_hw.c | 199 u32 clkdiv = adap->params.vpd.cclk / (2 * adap->params.vpd.mdc) - 1; in mi1_init() 648 struct t3_vpd vpd; in get_vpd_params() local 661 ret = pci_read_vpd(adapter->pdev, addr, sizeof(vpd), &vpd); in get_vpd_params() 665 ret = vpdstrtouint(vpd.cclk_data, vpd.cclk_len, 10, &p->cclk); in get_vpd_params() 668 ret = vpdstrtouint(vpd.mclk_data, vpd.mclk_len, 10, &p->mclk); in get_vpd_params() 671 ret = vpdstrtouint(vpd in get_vpd_params() 3312 const struct vpd_params *vpd = &adapter->params.vpd; t3_init_hw() local [all...] |
/kernel/linux/linux-5.10/drivers/target/ |
H A D | target_core_transport.c | 985 struct t10_vpd *vpd, in transport_dump_vpd_proto_id() 995 switch (vpd->protocol_identifier) { in transport_dump_vpd_proto_id() 1027 vpd->protocol_identifier); in transport_dump_vpd_proto_id() 1038 transport_set_vpd_proto_id(struct t10_vpd *vpd, unsigned char *page_83) in transport_set_vpd_proto_id() argument 1046 vpd->protocol_identifier = (page_83[0] & 0xf0); in transport_set_vpd_proto_id() 1047 vpd->protocol_identifier_set = 1; in transport_set_vpd_proto_id() 1048 transport_dump_vpd_proto_id(vpd, NULL, 0); in transport_set_vpd_proto_id() 1054 struct t10_vpd *vpd, in transport_dump_vpd_assoc() 1065 switch (vpd->association) { in transport_dump_vpd_assoc() 1076 sprintf(buf+len, "Unknown 0x%02x\n", vpd in transport_dump_vpd_assoc() 984 transport_dump_vpd_proto_id( struct t10_vpd *vpd, unsigned char *p_buf, int p_buf_len) transport_dump_vpd_proto_id() argument 1053 transport_dump_vpd_assoc( struct t10_vpd *vpd, unsigned char *p_buf, int p_buf_len) transport_dump_vpd_assoc() argument 1089 transport_set_vpd_assoc(struct t10_vpd *vpd, unsigned char *page_83) transport_set_vpd_assoc() argument 1101 transport_dump_vpd_ident_type( struct t10_vpd *vpd, unsigned char *p_buf, int p_buf_len) transport_dump_vpd_ident_type() argument 1150 transport_set_vpd_ident_type(struct t10_vpd *vpd, unsigned char *page_83) transport_set_vpd_ident_type() argument 1162 transport_dump_vpd_ident( struct t10_vpd *vpd, unsigned char *p_buf, int p_buf_len) transport_dump_vpd_ident() argument 1204 transport_set_vpd_ident(struct t10_vpd *vpd, unsigned char *page_83) transport_set_vpd_ident() argument [all...] |
H A 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...] |
/kernel/linux/linux-6.6/drivers/target/ |
H A D | target_core_transport.c | 1068 struct t10_vpd *vpd, in transport_dump_vpd_proto_id() 1078 switch (vpd->protocol_identifier) { in transport_dump_vpd_proto_id() 1110 vpd->protocol_identifier); in transport_dump_vpd_proto_id() 1121 transport_set_vpd_proto_id(struct t10_vpd *vpd, unsigned char *page_83) in transport_set_vpd_proto_id() argument 1129 vpd->protocol_identifier = (page_83[0] & 0xf0); in transport_set_vpd_proto_id() 1130 vpd->protocol_identifier_set = 1; in transport_set_vpd_proto_id() 1131 transport_dump_vpd_proto_id(vpd, NULL, 0); in transport_set_vpd_proto_id() 1137 struct t10_vpd *vpd, in transport_dump_vpd_assoc() 1148 switch (vpd->association) { in transport_dump_vpd_assoc() 1159 sprintf(buf+len, "Unknown 0x%02x\n", vpd in transport_dump_vpd_assoc() 1067 transport_dump_vpd_proto_id( struct t10_vpd *vpd, unsigned char *p_buf, int p_buf_len) transport_dump_vpd_proto_id() argument 1136 transport_dump_vpd_assoc( struct t10_vpd *vpd, unsigned char *p_buf, int p_buf_len) transport_dump_vpd_assoc() argument 1172 transport_set_vpd_assoc(struct t10_vpd *vpd, unsigned char *page_83) transport_set_vpd_assoc() argument 1184 transport_dump_vpd_ident_type( struct t10_vpd *vpd, unsigned char *p_buf, int p_buf_len) transport_dump_vpd_ident_type() argument 1233 transport_set_vpd_ident_type(struct t10_vpd *vpd, unsigned char *page_83) transport_set_vpd_ident_type() argument 1245 transport_dump_vpd_ident( struct t10_vpd *vpd, unsigned char *p_buf, int p_buf_len) transport_dump_vpd_ident() argument 1287 transport_set_vpd_ident(struct t10_vpd *vpd, unsigned char *page_83) transport_set_vpd_ident() argument [all...] |
H A D | target_core_pscsi.c | 220 struct t10_vpd *vpd; in pscsi_get_inquiry_vpd_device_ident() local 249 vpd = kzalloc(sizeof(struct t10_vpd), GFP_KERNEL); in pscsi_get_inquiry_vpd_device_ident() 250 if (!vpd) { in pscsi_get_inquiry_vpd_device_ident() 255 INIT_LIST_HEAD(&vpd->vpd_list); in pscsi_get_inquiry_vpd_device_ident() 257 transport_set_vpd_proto_id(vpd, page_83); in pscsi_get_inquiry_vpd_device_ident() 258 transport_set_vpd_assoc(vpd, page_83); in pscsi_get_inquiry_vpd_device_ident() 260 if (transport_set_vpd_ident_type(vpd, page_83) < 0) { in pscsi_get_inquiry_vpd_device_ident() 263 kfree(vpd); in pscsi_get_inquiry_vpd_device_ident() 266 if (transport_set_vpd_ident(vpd, page_83) < 0) { in pscsi_get_inquiry_vpd_device_ident() 269 kfree(vpd); in pscsi_get_inquiry_vpd_device_ident() [all...] |
/kernel/linux/linux-5.10/drivers/hwmon/ |
H A D | drivetemp.c | 328 struct scsi_vpd *vpd; in drivetemp_identify_sata() local 341 vpd = rcu_dereference(sdev->vpd_pg89); in drivetemp_identify_sata() 347 if (!vpd || vpd->len < 572 || vpd->data[56] != ATA_CMD_ID_ATA || in drivetemp_identify_sata() 348 vpd->data[36] != 0x34) { in drivetemp_identify_sata() 352 ata_id = (u16 *)&vpd->data[60]; in drivetemp_identify_sata()
|
/kernel/linux/linux-6.6/drivers/hwmon/ |
H A D | drivetemp.c | 327 struct scsi_vpd *vpd; in drivetemp_identify_sata() local 340 vpd = rcu_dereference(sdev->vpd_pg89); in drivetemp_identify_sata() 346 if (!vpd || vpd->len < 572 || vpd->data[56] != ATA_CMD_ID_ATA || in drivetemp_identify_sata() 347 vpd->data[36] != 0x34) { in drivetemp_identify_sata() 351 ata_id = (u16 *)&vpd->data[60]; in drivetemp_identify_sata()
|
/kernel/linux/linux-6.6/drivers/scsi/ |
H A D | scsi.c | 290 * Returns size of the vpd page on success or a negative error number. 338 unsigned char vpd[SCSI_VPD_LIST_SIZE] __aligned(4); in scsi_get_vpd_size() 349 result = scsi_vpd_inquiry(sdev, vpd, 0, sizeof(vpd)); in scsi_get_vpd_size() 354 if (!memchr(&vpd[SCSI_VPD_HEADER_SIZE], page, result)) in scsi_get_vpd_size() 363 result = scsi_vpd_inquiry(sdev, vpd, page, SCSI_VPD_HEADER_SIZE); in scsi_get_vpd_size() 684 struct scsi_vpd *vpd; in scsi_cdl_enable() local 693 vpd = rcu_dereference(sdev->vpd_pg89); in scsi_cdl_enable() 694 if (vpd) in scsi_cdl_enable()
|
H A D | sd.c | 1732 const struct scsi_vpd *vpd; in sd_get_unique_id() local 1737 vpd = rcu_dereference(sdev->vpd_pg83); in sd_get_unique_id() 1738 if (!vpd) in sd_get_unique_id() 1742 for (d = vpd->data + 4; d < vpd->data + vpd->len; d += d[3] + 4) { in sd_get_unique_id() 3050 struct scsi_vpd *vpd; in sd_read_block_limits() local 3054 vpd = rcu_dereference(sdkp->device->vpd_pgb0); in sd_read_block_limits() 3055 if (!vpd || vpd in sd_read_block_limits() 3112 struct scsi_vpd *vpd; sd_read_block_characteristics() local 3174 struct scsi_vpd *vpd; sd_read_block_provisioning() local 3205 struct scsi_vpd *vpd; sd_read_write_same() local [all...] |
/kernel/linux/linux-5.10/drivers/misc/cxl/ |
H A 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() 204 read_prop_dword(np, "ibm,vpd-size", &val); in cxl_of_read_afu_properties()
|
/kernel/linux/linux-6.6/drivers/misc/cxl/ |
H A 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() 204 read_prop_dword(np, "ibm,vpd-size", &val); in cxl_of_read_afu_properties()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/chelsio/cxgb4vf/ |
H A D | t4vf_common.h | 263 struct vpd_params vpd; /* Vital Product Data */ member 311 return adapter->params.vpd.cclk / 1000; in core_ticks_per_usec() 317 return (us * adapter->params.vpd.cclk) / 1000; in us_to_core_ticks() 323 return (ticks * 1000) / adapter->params.vpd.cclk; in core_ticks_to_us()
|
/kernel/linux/linux-6.6/drivers/net/ethernet/chelsio/cxgb4vf/ |
H A D | t4vf_common.h | 263 struct vpd_params vpd; /* Vital Product Data */ member 311 return adapter->params.vpd.cclk / 1000; in core_ticks_per_usec() 317 return (us * adapter->params.vpd.cclk) / 1000; in us_to_core_ticks() 323 return (ticks * 1000) / adapter->params.vpd.cclk; in core_ticks_to_us()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/ibm/ |
H A D | ibmvnic.c | 672 if (!adapter->vpd) in release_vpd_data() 675 kfree(adapter->vpd->buff); in release_vpd_data() 676 kfree(adapter->vpd); in release_vpd_data() 678 adapter->vpd = NULL; in release_vpd_data() 1037 if (adapter->vpd->buff) in ibmvnic_get_vpd() 1038 len = adapter->vpd->len; in ibmvnic_get_vpd() 1060 if (!adapter->vpd->len) in ibmvnic_get_vpd() 1063 if (!adapter->vpd->buff) in ibmvnic_get_vpd() 1064 adapter->vpd->buff = kzalloc(adapter->vpd in ibmvnic_get_vpd() [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/chelsio/cxgb/ |
H A 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()
|
/kernel/linux/linux-5.10/drivers/scsi/aic7xxx/ |
H A 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()
|
/kernel/linux/linux-6.6/drivers/scsi/aic7xxx/ |
H A D | aic79xx_pci.c | 506 struct vpd_config vpd; in ahd_check_extport() local 526 + (sizeof(vpd) * (ahd->channel - 'A'))) / 2; in ahd_check_extport() 528 error = ahd_read_seeprom(ahd, (uint16_t *)&vpd, in ahd_check_extport() 529 start_addr, sizeof(vpd)/2, in ahd_check_extport() 532 error = ahd_parse_vpddata(ahd, &vpd); in ahd_check_extport()
|
/kernel/linux/linux-5.10/drivers/scsi/csiostor/ |
H A 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()
|
/kernel/linux/linux-6.6/drivers/scsi/csiostor/ |
H A 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()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/sun/ |
H A D | niu.c | 6781 struct niu_vpd *vpd = &np->vpd; in niu_get_drvinfo() local 6786 vpd->fcode_major, vpd->fcode_minor); in niu_get_drvinfo() 8044 struct niu_vpd *vpd = &np->vpd; in niu_vpd_parse_version() local 8045 int len = strlen(vpd->version) + 1; in niu_vpd_parse_version() 8046 const char *s = vpd->version; in niu_vpd_parse_version() 8057 sscanf(s, "%d.%d", &vpd->fcode_major, &vpd in niu_vpd_parse_version() 8314 struct niu_vpd *vpd = &np->vpd; niu_pci_vpd_validate() local [all...] |