Message ID | 1458772676-47866-1-git-send-email-babu.moger@oracle.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
From: Babu Moger <babu.moger@oracle.com> Date: Wed, 23 Mar 2016 15:37:56 -0700 > +#ifdef CONFIG_PCI_IOV > +int pcibios_add_device(struct pci_dev *dev) > +{ > + struct pci_dev *pdev; > + /* > + * Add sriov arch specific initialization here. > + * Copy dev_archdata from PF to VF > + */ Always have an empty line after a set of local variable declarations. Sparc code is to have comments formatted: /* Like * this. */ > + memcpy(&dev->dev.archdata, &pdev->dev.archdata, > + sizeof(struct dev_archdata)); Sparc code should indent multi-line expressions by having the second and subsequent line be indented exactly to the column following the openning parenthesis on the first line. You must use the appropriate number of TAB then SPACE characters necessary to do so. Thanks. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index badf095..00a99c5 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c @@ -994,6 +994,23 @@ void pcibios_set_master(struct pci_dev *dev) /* No special bus mastering setup handling */ } +#ifdef CONFIG_PCI_IOV +int pcibios_add_device(struct pci_dev *dev) +{ + struct pci_dev *pdev; + /* + * Add sriov arch specific initialization here. + * Copy dev_archdata from PF to VF + */ + if (dev->is_virtfn) { + pdev = dev->physfn; + memcpy(&dev->dev.archdata, &pdev->dev.archdata, + sizeof(struct dev_archdata)); + } + return 0; +} +#endif /* CONFIG_PCI_IOV */ + static int __init pcibios_init(void) { pci_dfl_cache_line_size = 64 >> 2;