History

drivers/vfio: Enable VFIO if EEH is not supported

The existing vfio_pci_open() fails upon error returned from vfio_spapr_pci_eeh_open(), which breaks POWER7's P5IOC2 PHB support which this patch brings back. The patch fixes the issue by dropping the return value of vfio_spapr_pci_eeh_open().

Alexey Kardashevskiy committed 12 years ago

Commit 9b936c91 parent 89a2edd3 files · +5 −10Browse files

Unified · Split

3 files
  1. drivers/vfio/pci/vfio_pci.c +1 −5
  2. drivers/vfio/vfio_spapr_eeh.c +2 −2
  3. include/linux/vfio.h +2 −3
drivers/vfio/pci/vfio_pci.c+1−5
@@ -200,11 +200,7 @@ static int vfio_pci_open(void *device_data) · 199 unmodified lines
200200 if (ret)
201201 goto error;
202202
203− ret = vfio_spapr_pci_eeh_open(vdev->pdev);
204− if (ret) {
205− vfio_pci_disable(vdev);
206− goto error;
207− }
203+ vfio_spapr_pci_eeh_open(vdev->pdev);
208204 }
209205 vdev->refcnt++;
210206 error:
drivers/vfio/vfio_spapr_eeh.c+2−2
@@ -19,9 +19,9 @@ · 18 unmodified lines
1919 #define DRIVER_DESC "VFIO IOMMU SPAPR EEH"
2020
2121 /* We might build address mapping here for "fast" path later */
22−int vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
22+void vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
2323 {
24− return eeh_dev_open(pdev);
24+ eeh_dev_open(pdev);
2525 }
2626 EXPORT_SYMBOL_GPL(vfio_spapr_pci_eeh_open);
2727
include/linux/vfio.h+2−3
@@ -100,15 +100,14 @@ extern long vfio_external_check_extension(struct vfio_group *group, · 99 unmodified lines
100100
101101 struct pci_dev;
102102 #ifdef CONFIG_EEH
103−extern int vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
103+extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
104104 extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
105105 extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
106106 unsigned int cmd,
107107 unsigned long arg);
108108 #else
109−static inline int vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
109+static inline void vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
110110 {
111− return 0;
112111 }
113112
114113 static inline void vfio_spapr_pci_eeh_release(struct pci_dev *pdev)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t