if ( !pf_pdev )
{
- ret = pci_add_device(seg, info->physfn.bus, info->physfn.devfn,
- NULL, node);
- if ( ret )
- {
- printk(XENLOG_WARNING
- "Failed to add SR-IOV device PF %pp for VF %pp\n",
- &PCI_SBDF(seg, info->physfn.bus, info->physfn.devfn),
- &pdev->sbdf);
- free_pdev(pseg, pdev);
- goto out;
- }
- pf_pdev = pci_get_pdev(NULL, PCI_SBDF(seg, info->physfn.bus,
- info->physfn.devfn));
- if ( !pf_pdev )
- {
- printk(XENLOG_ERR
- "Inconsistent PCI state: failed to find newly added PF %pp for VF %pp\n",
- &PCI_SBDF(seg, info->physfn.bus, info->physfn.devfn),
- &pdev->sbdf);
- ASSERT_UNREACHABLE();
- free_pdev(pseg, pdev);
- ret = -EILSEQ;
- goto out;
- }
+ printk(XENLOG_WARNING
+ "Attempted to add SR-IOV VF %pp without PF %pp\n",
+ &pdev->sbdf,
+ &PCI_SBDF(seg, info->physfn.bus, info->physfn.devfn));
+ free_pdev(pseg, pdev);
+ ret = -ENODEV;
+ goto out;
}
if ( !pdev->pf_pdev )