Lines Matching refs:pdev
58 int pseries_send_map_pe(struct pci_dev *pdev, in pseries_send_map_pe() argument
70 pdn = pci_get_pdn(pdev); in pseries_send_map_pe()
84 dev_err(&pdev->dev, in pseries_send_map_pe()
91 void pseries_set_pe_num(struct pci_dev *pdev, u16 vf_index, __be16 pe_num) in pseries_set_pe_num() argument
95 pdn = pci_get_pdn(pdev); in pseries_set_pe_num()
97 dev_dbg(&pdev->dev, "VF %04x:%02x:%02x.%x associated with PE#%x\n", in pseries_set_pe_num()
98 pci_domain_nr(pdev->bus), in pseries_set_pe_num()
99 pdev->bus->number, in pseries_set_pe_num()
100 PCI_SLOT(pci_iov_virtfn_devfn(pdev, vf_index)), in pseries_set_pe_num()
101 PCI_FUNC(pci_iov_virtfn_devfn(pdev, vf_index)), in pseries_set_pe_num()
105 int pseries_associate_pes(struct pci_dev *pdev, u16 num_vfs) in pseries_associate_pes() argument
117 pdn = pci_get_pdn(pdev); in pseries_associate_pes()
122 res = &pdev->resource[i + PCI_IOV_RESOURCES]; in pseries_associate_pes()
125 size = pcibios_iov_resource_alignment(pdev, i + in pseries_associate_pes()
130 cpu_to_be16((pci_iov_virtfn_bus(pdev, vf_index) in pseries_associate_pes()
131 << 8) | pci_iov_virtfn_devfn(pdev, in pseries_associate_pes()
138 rc = pseries_send_map_pe(pdev, num_vfs, vf_pe_array); in pseries_associate_pes()
142 pseries_set_pe_num(pdev, vf_index, in pseries_associate_pes()
149 int pseries_pci_sriov_enable(struct pci_dev *pdev, u16 num_vfs) in pseries_pci_sriov_enable() argument
155 struct device_node *dn = pci_device_to_OF_node(pdev); in pseries_pci_sriov_enable()
165 dev_err(&pdev->dev, in pseries_pci_sriov_enable()
172 pdn = pci_get_pdn(pdev); in pseries_pci_sriov_enable()
179 rc = pseries_associate_pes(pdev, num_vfs); in pseries_pci_sriov_enable()
183 dev_err(&pdev->dev, "Failure to enable sriov: %x\n", rc); in pseries_pci_sriov_enable()
186 pci_vf_drivers_autoprobe(pdev, false); in pseries_pci_sriov_enable()
192 int pseries_pcibios_sriov_enable(struct pci_dev *pdev, u16 num_vfs) in pseries_pcibios_sriov_enable() argument
195 add_sriov_vf_pdns(pdev); in pseries_pcibios_sriov_enable()
196 return pseries_pci_sriov_enable(pdev, num_vfs); in pseries_pcibios_sriov_enable()
199 int pseries_pcibios_sriov_disable(struct pci_dev *pdev) in pseries_pcibios_sriov_disable() argument
203 pdn = pci_get_pdn(pdev); in pseries_pcibios_sriov_disable()
207 remove_sriov_vf_pdns(pdev); in pseries_pcibios_sriov_disable()
208 pci_vf_drivers_autoprobe(pdev, true); in pseries_pcibios_sriov_disable()