search for: pci_iov_virtfn_param

Displaying 6 results from an estimated 6 matches for "pci_iov_virtfn_param".

2008 Aug 12
1
SR-IOV: patches are available for Linux kernel [4/4]
...pletion according to SR-IOV specification. + +Following function can be used to query maximum number of Virtual Functions +that a Physical Function can support: + int pci_iov_max_virtfn(struct pci_dev *dev) + +Following function can be used to retrieve parameter of a Virtual Function: + const char *pci_iov_virtfn_param(struct pci_dev *dev, int vfid) + +3.2 Usage example + +Following piece of codes illustrates the usage of APIs above. + +static int callback(struct pci_dev *dev, int event, int arg) +{ + int err; + const char *param; + + switch (event) { + case PCI_IOV_VF_ENA: /* request to enable a VF */ + param =...
2008 Aug 12
1
SR-IOV: patches are available for Linux kernel [4/4]
...pletion according to SR-IOV specification. + +Following function can be used to query maximum number of Virtual Functions +that a Physical Function can support: + int pci_iov_max_virtfn(struct pci_dev *dev) + +Following function can be used to retrieve parameter of a Virtual Function: + const char *pci_iov_virtfn_param(struct pci_dev *dev, int vfid) + +3.2 Usage example + +Following piece of codes illustrates the usage of APIs above. + +static int callback(struct pci_dev *dev, int event, int arg) +{ + int err; + const char *param; + + switch (event) { + case PCI_IOV_VF_ENA: /* request to enable a VF */ + param =...
2008 Aug 12
1
SR-IOV: patches are available for Linux kernel [4/4]
...pletion according to SR-IOV specification. + +Following function can be used to query maximum number of Virtual Functions +that a Physical Function can support: + int pci_iov_max_virtfn(struct pci_dev *dev) + +Following function can be used to retrieve parameter of a Virtual Function: + const char *pci_iov_virtfn_param(struct pci_dev *dev, int vfid) + +3.2 Usage example + +Following piece of codes illustrates the usage of APIs above. + +static int callback(struct pci_dev *dev, int event, int arg) +{ + int err; + const char *param; + + switch (event) { + case PCI_IOV_VF_ENA: /* request to enable a VF */ + param =...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
...+ + err = notify_phyfn(pf, PCI_IOV_VF_NUM, nvfs); + if (err) + return err; + + iov_free_res(pf); + kfree(pf->iov->args); + pf->iov->args = NULL; + pf->iov->nr_virtfn = nvfs; + + err = iov_init(pf); + if (err) + notify_phyfn(pf, PCI_IOV_VF_ERR, err); + + return err; +} + +/** + * pci_iov_virtfn_param - retrieve parameter of a Virtual Function + * @dev: PCI device + * @vfid: Virtual Function ID (0 ~ nvfs-1) + * + * Returns pointer to string (which could be empty string) on success, + * and null pointer on failure. + */ +const char *pci_iov_virtfn_param(struct pci_dev *dev, int vfid) +{ + BUG_ON(...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
...+ + err = notify_phyfn(pf, PCI_IOV_VF_NUM, nvfs); + if (err) + return err; + + iov_free_res(pf); + kfree(pf->iov->args); + pf->iov->args = NULL; + pf->iov->nr_virtfn = nvfs; + + err = iov_init(pf); + if (err) + notify_phyfn(pf, PCI_IOV_VF_ERR, err); + + return err; +} + +/** + * pci_iov_virtfn_param - retrieve parameter of a Virtual Function + * @dev: PCI device + * @vfid: Virtual Function ID (0 ~ nvfs-1) + * + * Returns pointer to string (which could be empty string) on success, + * and null pointer on failure. + */ +const char *pci_iov_virtfn_param(struct pci_dev *dev, int vfid) +{ + BUG_ON(...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
...+ + err = notify_phyfn(pf, PCI_IOV_VF_NUM, nvfs); + if (err) + return err; + + iov_free_res(pf); + kfree(pf->iov->args); + pf->iov->args = NULL; + pf->iov->nr_virtfn = nvfs; + + err = iov_init(pf); + if (err) + notify_phyfn(pf, PCI_IOV_VF_ERR, err); + + return err; +} + +/** + * pci_iov_virtfn_param - retrieve parameter of a Virtual Function + * @dev: PCI device + * @vfid: Virtual Function ID (0 ~ nvfs-1) + * + * Returns pointer to string (which could be empty string) on success, + * and null pointer on failure. + */ +const char *pci_iov_virtfn_param(struct pci_dev *dev, int vfid) +{ + BUG_ON(...