Commit 9e6c535c authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pci-v5.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:

 - Define to_pci_sysdata() always to fix build breakage when !CONFIG_PCI
   (Jason A. Donenfeld)

 - Use PF PASID for VFs to fix VF IOMMU bind failures (Kuppuswamy
   Sathyanarayanan)

* tag 'pci-v5.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI/ATS: Use PF PASID for VFs
  x86/PCI: Define to_pci_sysdata() even when !CONFIG_PCI
parents 750ce8cc 2e34673b
...@@ -33,13 +33,13 @@ extern int pci_routeirq; ...@@ -33,13 +33,13 @@ extern int pci_routeirq;
extern int noioapicquirk; extern int noioapicquirk;
extern int noioapicreroute; extern int noioapicreroute;
#ifdef CONFIG_PCI
static inline struct pci_sysdata *to_pci_sysdata(const struct pci_bus *bus) static inline struct pci_sysdata *to_pci_sysdata(const struct pci_bus *bus)
{ {
return bus->sysdata; return bus->sysdata;
} }
#ifdef CONFIG_PCI
#ifdef CONFIG_PCI_DOMAINS #ifdef CONFIG_PCI_DOMAINS
static inline int pci_domain_nr(struct pci_bus *bus) static inline int pci_domain_nr(struct pci_bus *bus)
{ {
......
...@@ -426,11 +426,12 @@ void pci_restore_pasid_state(struct pci_dev *pdev) ...@@ -426,11 +426,12 @@ void pci_restore_pasid_state(struct pci_dev *pdev)
int pci_pasid_features(struct pci_dev *pdev) int pci_pasid_features(struct pci_dev *pdev)
{ {
u16 supported; u16 supported;
int pasid = pdev->pasid_cap; int pasid;
if (pdev->is_virtfn) if (pdev->is_virtfn)
pdev = pci_physfn(pdev); pdev = pci_physfn(pdev);
pasid = pdev->pasid_cap;
if (!pasid) if (!pasid)
return -EINVAL; return -EINVAL;
...@@ -453,11 +454,12 @@ int pci_pasid_features(struct pci_dev *pdev) ...@@ -453,11 +454,12 @@ int pci_pasid_features(struct pci_dev *pdev)
int pci_max_pasids(struct pci_dev *pdev) int pci_max_pasids(struct pci_dev *pdev)
{ {
u16 supported; u16 supported;
int pasid = pdev->pasid_cap; int pasid;
if (pdev->is_virtfn) if (pdev->is_virtfn)
pdev = pci_physfn(pdev); pdev = pci_physfn(pdev);
pasid = pdev->pasid_cap;
if (!pasid) if (!pasid)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment