[PATCH v3 0/3] PCI: endpoint: fix bug for 2 APIs and simplify 1 API