[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 21/30] xen/pci: split code to size BARs from pci_add_device
>>> On 27.09.16 at 17:57, <roger.pau@xxxxxxxxxx> wrote: > Because it's also going to be used by other code. If you want to make use of this for general purpose sizing, simply moving the existing code is not enough. For one I/O port BARs don't get handled (as SR-IOV devices aren't allowed to have such). And then I'm afraid there are a number of quirks to work around, so some code may need to be lifted from Linux. While it may be legitimate to not do this right here, it should be done before this code gets used for other than SR-IOV, and having peeked into the next patch I didn't find you doing any adjustments. > + ret = pci_size_bar(seg, bus, slot, func, pos + PCI_SRIOV_BAR, > + PCI_SRIOV_NUM_BARS, &i, &addr, > + &pdev->vf_rlen[i]); > + if ( ret ) > + printk_pdev(pdev, XENLOG_WARNING, > + "failed to size SR-IOV BAR%u\n", i); > } > } Just one remark on the code itself: With "addr" being of no interest to this caller (afaics), I think it would be prudent to make this an optional parameter (and pass NULL here). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |