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(). Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
89a2edd62f
commit
9b936c960f
3 changed files with 5 additions and 10 deletions
|
@ -200,11 +200,7 @@ static int vfio_pci_open(void *device_data)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
ret = vfio_spapr_pci_eeh_open(vdev->pdev);
|
vfio_spapr_pci_eeh_open(vdev->pdev);
|
||||||
if (ret) {
|
|
||||||
vfio_pci_disable(vdev);
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
vdev->refcnt++;
|
vdev->refcnt++;
|
||||||
error:
|
error:
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
#define DRIVER_DESC "VFIO IOMMU SPAPR EEH"
|
#define DRIVER_DESC "VFIO IOMMU SPAPR EEH"
|
||||||
|
|
||||||
/* We might build address mapping here for "fast" path later */
|
/* We might build address mapping here for "fast" path later */
|
||||||
int vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
|
void vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
return eeh_dev_open(pdev);
|
eeh_dev_open(pdev);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(vfio_spapr_pci_eeh_open);
|
EXPORT_SYMBOL_GPL(vfio_spapr_pci_eeh_open);
|
||||||
|
|
||||||
|
|
|
@ -100,15 +100,14 @@ extern long vfio_external_check_extension(struct vfio_group *group,
|
||||||
|
|
||||||
struct pci_dev;
|
struct pci_dev;
|
||||||
#ifdef CONFIG_EEH
|
#ifdef CONFIG_EEH
|
||||||
extern int vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
|
extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
|
||||||
extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
|
extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
|
||||||
extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
|
extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
|
||||||
unsigned int cmd,
|
unsigned int cmd,
|
||||||
unsigned long arg);
|
unsigned long arg);
|
||||||
#else
|
#else
|
||||||
static inline int vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
|
static inline void vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void vfio_spapr_pci_eeh_release(struct pci_dev *pdev)
|
static inline void vfio_spapr_pci_eeh_release(struct pci_dev *pdev)
|
||||||
|
|
Loading…
Add table
Reference in a new issue