Alexey Kardashevskiy wrote: [..trim reply..] > > +int pci_tsm_doe_transfer(struct pci_dev *pdev, enum pci_doe_proto type, > > + const void *req, size_t req_sz, void *resp, > > + size_t resp_sz) > > > This does not belong here yet - no user. I had been pulling things out without users, but Yilun and Aneesh ask for them to be included for staging purposes. When this staging branch goes upstream a user for all exported APIs is a requirement. However, per your comment below this is worth deleting. > > But if you still want it - "enum pci_doe_proto" should go to pci-doe.h like this https://github.com/AMDESE/linux-kvm/commit/af12dec97ed98a9f365bbbb6925e76c556937d01 Yeah, I will move it over there. > > +{ > > + struct pci_tsm_pf0 *tsm; > > + > > + if (!pdev->tsm || !is_pci_tsm_pf0(pdev)) > > + return -ENXIO; > > + > > + tsm = to_pci_tsm_pf0(pdev->tsm); > > + if (!tsm->doe_mb) > > + return -ENXIO; > > + > > + return pci_doe(tsm->doe_mb, PCI_VENDOR_ID_PCI_SIG, type, req, req_sz, > > + resp, resp_sz); > > The wrapper does not seem to be very helpful - the platform driver > (==TSM ==CCP) which is going to call it already knows it is a DSM and > mailboxes are initialized (otherwise the DSM's pci_tsm_ops::probe() > would've failed) so it can just call pci_doe() directly. Thanks, True, this is a weak helper the TSM driver already knows when and if it should be using the already exported pci_doe().