Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man9/pci.9
Show All 19 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd May 24, 2014 | .Dd May 28, 2015 | ||||
.Dt PCI 9 | .Dt PCI 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm pci , | .Nm pci , | ||||
.Nm pci_alloc_msi , | .Nm pci_alloc_msi , | ||||
.Nm pci_alloc_msix , | .Nm pci_alloc_msix , | ||||
.Nm pci_disable_busmaster , | .Nm pci_disable_busmaster , | ||||
.Nm pci_disable_io , | .Nm pci_disable_io , | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
.Fn pci_get_max_read_req "device_t dev" | .Fn pci_get_max_read_req "device_t dev" | ||||
.Ft int | .Ft int | ||||
.Fn pci_get_powerstate "device_t dev" | .Fn pci_get_powerstate "device_t dev" | ||||
.Ft int | .Ft int | ||||
.Fn pci_get_vpd_ident "device_t dev" "const char **identptr" | .Fn pci_get_vpd_ident "device_t dev" "const char **identptr" | ||||
.Ft int | .Ft int | ||||
.Fn pci_get_vpd_readonly "device_t dev" "const char *kw" "const char **vptr" | .Fn pci_get_vpd_readonly "device_t dev" "const char *kw" "const char **vptr" | ||||
.Ft int | .Ft int | ||||
.Fn pci_iov_attach "device_t dev" "nvlist_t *pf_schema" "nvlist_t *vf_schema" | |||||
.Ft int | |||||
.Fn pci_iov_detach "device_t dev" | |||||
.Ft int | |||||
.Fn pci_msi_count "device_t dev" | .Fn pci_msi_count "device_t dev" | ||||
.Ft int | .Ft int | ||||
.Fn pci_msix_count "device_t dev" | .Fn pci_msix_count "device_t dev" | ||||
.Ft int | .Ft int | ||||
.Fn pci_pending_msix "device_t dev" "u_int index" | .Fn pci_pending_msix "device_t dev" "u_int index" | ||||
.Ft uint32_t | .Ft uint32_t | ||||
.Fn pci_read_config "device_t dev" "int reg" "int width" | .Fn pci_read_config "device_t dev" "int reg" "int width" | ||||
.Ft int | .Ft int | ||||
.Fn pci_release_msi "device_t dev" | .Fn pci_release_msi "device_t dev" | ||||
.Ft int | .Ft int | ||||
.Fn pci_remap_msix "device_t dev" "int count" "const u_int *vectors" | .Fn pci_remap_msix "device_t dev" "int count" "const u_int *vectors" | ||||
.Ft void | .Ft void | ||||
.Fn pci_restore_state "device_t dev" | .Fn pci_restore_state "device_t dev" | ||||
.Ft void | .Ft void | ||||
.Fn pci_save_state "device_t dev" | .Fn pci_save_state "device_t dev" | ||||
.Ft int | .Ft int | ||||
.Fn pci_set_max_read_req "device_t dev" "int size" | .Fn pci_set_max_read_req "device_t dev" "int size" | ||||
.Ft int | .Ft int | ||||
.Fn pci_set_powerstate "device_t dev" "int state" | .Fn pci_set_powerstate "device_t dev" "int state" | ||||
.Ft void | .Ft void | ||||
.Fn pci_write_config "device_t dev" "int reg" "uint32_t val" "int width" | .Fn pci_write_config "device_t dev" "int reg" "uint32_t val" "int width" | ||||
.In dev/pci/pci_iov.h | |||||
.Ft int | |||||
.Fn pci_iov_attach "device_t dev" "nvlist_t *pf_schema" "nvlist_t *vf_schema" | |||||
.Ft int | |||||
.Fn pci_iov_detach "device_t dev" | |||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
set of functions are used for managing PCI devices. | set of functions are used for managing PCI devices. | ||||
The functions are split into several groups: | The functions are split into several groups: | ||||
raw configuration access, | raw configuration access, | ||||
locating devices, | locating devices, | ||||
device information, | device information, | ||||
▲ Show 20 Lines • Show All 308 Lines • ▼ Show 20 Lines | |||||
.Pp | .Pp | ||||
The | The | ||||
.Fn pci_iov_attach | .Fn pci_iov_attach | ||||
function is used to advertise that the given device | function is used to advertise that the given device | ||||
.Pq and associated device driver | .Pq and associated device driver | ||||
supports PCI Single-Root I/O Virtualization | supports PCI Single-Root I/O Virtualization | ||||
.Po SR-IOV Pc . | .Po SR-IOV Pc . | ||||
A driver that supports SR-IOV must implement the | A driver that supports SR-IOV must implement the | ||||
.Xr PCI_INIT_IOV 9 , | .Xr PCI_IOV_INIT 9 , | ||||
.Xr PCI_ADD_VF 9 | .Xr PCI_IOV_ADD_VF 9 | ||||
and | and | ||||
.Xr PCI_UNIT_IOV 9 | .Xr PCI_IOV_UNINIT 9 | ||||
methods. | methods. | ||||
This function should be called during the | This function should be called during the | ||||
.Xr DEVICE_ATTACH 9 | .Xr DEVICE_ATTACH 9 | ||||
method. | method. | ||||
If this function returns an error, it is recommended that the device driver | If this function returns an error, it is recommended that the device driver | ||||
still successfully attaches, but runs with SR-IOV disabled. | still successfully attaches, but runs with SR-IOV disabled. | ||||
The | The | ||||
.Fa pf_schema | .Fa pf_schema | ||||
▲ Show 20 Lines • Show All 324 Lines • Show Last 20 Lines |