Lines Matching refs:vconfig
181 memcpy(val, vdev->vconfig + pos, count);
214 /* Virtualized and writable bits go to vconfig */
218 memcpy(&virt_val, vdev->vconfig + pos, count);
223 memcpy(vdev->vconfig + pos, &virt_val, count);
260 memcpy(val, vdev->vconfig + pos, count);
263 memcpy(val, vdev->vconfig + pos,
266 memcpy(val, vdev->vconfig + pos, 1);
304 memcpy(vdev->vconfig + pos, &val, count);
312 memcpy(val, vdev->vconfig + pos, count);
403 u16 cmd = le16_to_cpu(*(__le16 *)&vdev->vconfig[PCI_COMMAND]);
477 vbar = (__le32 *)&vdev->vconfig[PCI_BASE_ADDRESS_0];
499 vbar = (__le32 *)&vdev->vconfig[PCI_ROM_ADDRESS];
532 u16 cmd = le16_to_cpu(*(__le16 *)&vdev->vconfig[PCI_COMMAND]);
568 virt_cmd = (__le16 *)&vdev->vconfig[PCI_COMMAND];
617 * Save current memory/io enable bits in vconfig to allow for
765 * The vconfig bits will be cleared during device capability
776 * and PME_En bits. The vconfig bits will be cleared during device
792 __le16 *paddr = (__le16 *)(vdev->vconfig + pos - offset + PCI_VPD_ADDR);
793 __le32 *pdata = (__le32 *)(vdev->vconfig + pos - offset + PCI_VPD_DATA);
873 __le16 *ctrl = (__le16 *)(vdev->vconfig + pos -
957 u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL;
1141 flags = (__le16 *)&vdev->vconfig[start];
1166 pflags = (__le16 *)&vdev->vconfig[start + PCI_MSI_FLAGS];
1461 __le16 *pmc = (__le16 *)&vdev->vconfig[offset + PCI_PM_PMC];
1462 __le16 *ctrl = (__le16 *)&vdev->vconfig[offset + PCI_PM_CTRL];
1464 /* Clear vconfig PME_Support, PME_Status, and PME_En bits */
1484 __le32 *dwordp = (__le32 *)&vdev->vconfig[offset];
1493 __le16 *wordp = (__le16 *)&vdev->vconfig[offset];
1502 u8 *byte = &vdev->vconfig[offset];
1537 prev = &vdev->vconfig[PCI_CAPABILITY_LIST];
1595 prev = &vdev->vconfig[pos + PCI_CAP_LIST_NEXT];
1602 __le16 *vstatus = (__le16 *)&vdev->vconfig[PCI_STATUS];
1692 *(__le32 *)&vdev->vconfig[epos] &=
1697 prev = (__le32 *)&vdev->vconfig[epos];
1702 *(u32 *)&vdev->vconfig[PCI_CFG_SPACE_SIZE] = 0;
1725 * device. We could remove vconfig and allocate individual buffers
1732 u8 *map, *vconfig;
1745 vconfig = kmalloc(pdev->cfg_size, GFP_KERNEL_ACCOUNT);
1746 if (!vconfig) {
1752 vdev->vconfig = vconfig;
1766 * may need to rebuild vconfig after that
1770 vdev->rbar[0] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_0]);
1771 vdev->rbar[1] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_1]);
1772 vdev->rbar[2] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_2]);
1773 vdev->rbar[3] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_3]);
1774 vdev->rbar[4] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_4]);
1775 vdev->rbar[5] = le32_to_cpu(*(__le32 *)&vconfig[PCI_BASE_ADDRESS_5]);
1776 vdev->rbar[6] = le32_to_cpu(*(__le32 *)&vconfig[PCI_ROM_ADDRESS]);
1779 *(__le16 *)&vconfig[PCI_VENDOR_ID] = cpu_to_le16(pdev->vendor);
1780 *(__le16 *)&vconfig[PCI_DEVICE_ID] = cpu_to_le16(pdev->device);
1792 if (vconfig[PCI_INTERRUPT_PIN] &&
1796 vconfig[PCI_INTERRUPT_PIN]);
1798 vconfig[PCI_INTERRUPT_PIN] = 0; /* Gratuitous for good VFs */
1808 *(__le16 *)&vconfig[PCI_COMMAND] |=
1813 vconfig[PCI_INTERRUPT_PIN] = 0;
1828 kfree(vconfig);
1829 vdev->vconfig = NULL;
1835 kfree(vdev->vconfig);
1836 vdev->vconfig = NULL;