Skip Navigation Links | |
Exit Print View | |
man pages section 9: DDI and DKI Kernel Functions Oracle Solaris 11.1 Information Library |
csx_AccessConfigurationRegister(9F)
csx_Parse_CISTPL_BYTEORDER(9F)
csx_Parse_CISTPL_CFTABLE_ENTRY(9F)
csx_Parse_CISTPL_DEVICEGEO(9F)
csx_Parse_CISTPL_DEVICEGEO_A(9F)
csx_Parse_CISTPL_DEVICE_OA(9F)
csx_Parse_CISTPL_DEVICE_OC(9F)
csx_Parse_CISTPL_LINKTARGET(9F)
csx_Parse_CISTPL_LONGLINK_A(9F)
csx_Parse_CISTPL_LONGLINK_C(9F)
csx_Parse_CISTPL_LONGLINK_MFC(9F)
ddi_get_soft_iblock_cookie(9F)
ddi_intr_get_supported_types(9F)
ddi_prop_lookup_byte_array(9F)
ddi_prop_lookup_int64_array(9F)
ddi_prop_lookup_string_array(9F)
ddi_prop_update_byte_array(9F)
ddi_prop_update_int64_array(9F)
ddi_prop_update_string_array(9F)
ldi_prop_lookup_byte_array(9F)
ldi_prop_lookup_int64_array(9F)
ldi_prop_lookup_string_array(9F)
mac_prop_info_set_default_link_flowctrl(9F)
mac_prop_info_set_default_str(9F)
mac_prop_info_set_default_uint8(9F)
mac_prop_info_set_range_uint32(9F)
net_event_notify_unregister(9F)
net_instance_notify_register(9F)
net_instance_notify_unregister(9F)
net_instance_protocol_unregister(9F)
net_protocol_notify_register(9F)
nvlist_lookup_boolean_array(9F)
nvlist_lookup_boolean_value(9F)
nvlist_lookup_nvlist_array(9F)
nvlist_lookup_string_array(9F)
nvlist_lookup_uint16_array(9F)
nvlist_lookup_uint32_array(9F)
nvlist_lookup_uint64_array(9F)
nvpair_value_boolean_array(9F)
pci_plist_lookup_int16_array(9F)
pci_plist_lookup_int32_array(9F)
pci_plist_lookup_int64_array(9F)
pci_plist_lookup_int8_array(9F)
pci_plist_lookup_string_array(9F)
pci_plist_lookup_uint16_array(9F)
pci_plist_lookup_uint32_array(9F)
pci_plist_lookup_uint64_array(9F)
pci_plist_lookup_uint8_array(9F)
scsi_get_device_type_scsi_options(9F)
scsi_get_device_type_string(9F)
scsi_sense_cmdspecific_uint64(9F)
usb_get_current_frame_number(9F)
usb_get_max_pkts_per_isoc_request(9F)
usb_pipe_get_max_bulk_transfer_size(9F)
usb_pipe_stop_intr_polling(9F)
usb_pipe_stop_isoc_polling(9F)
- get the name-value pair list from the backend store
#include <sys/sunddi.h> int pci_param_get(dev_info_t *dip, pci_param_t *php);
A pointer to a dev_info structure
A pointer to a (void *)param handle
On successful return a non—null handle is returned.
The param handle pointer (php) returned by pci_param_get() contains the name-value information of both PF (Physical Function) and its configured VF (Virtual Function) devices. The caller should use pci_plist_get(9F) to get the param list of the PF device and pci_plist_getvf(9F) to obtain the param lists for the configured VFs.
The name-value pairs are defined on a per device basis. There is one set of name-value pairs for the PF and each of the configured VFs. The name-value pairs are optional and may be absent for any or all of the devices.
The param handle is invalid after the device is detached.
The caller is responsible to free the php (param handle pointer) after each call to pci_param_get() using pci_param_free(9F).
A valid param handle pointer php is returned.
No name-value pairs defined for devices.
Use the DDI pci_plist_lookup_xxx() on the param list of the PF/VF devices to obtain the name-value pairs. Validate all parameters as a whole; that is, both PF parameters and VF parameters. If the current configuration cannot be satisfied, the driver needs to fail the attach. The validation needs to be done before VFs are configured using pciv_vf_config(9F) interface. Apply these parameters and corresponding action for PF and VFs.
Example 1 pci_param_get() example
pci_param_t my_params; pci_plist_t pf_plist; pci_plist_t vf_plist[8]; labelp = NULL; rval = pci_param_get(dip, &my_params); if (rval || (my_params == NULL)) { cmn_err(CE_NOTE, "No params available\n"); goto continue_with_attach; } rval = pci_plist_get(my_params, &pf_plist); if (rval || (pf_plist == NULL)) { cmn_err(CE_NOTE, "No params for PF \n"); goto continue_with_attach; } for (i = 0; i < 8; i++) { rval = pci_plist_getvf(my_params, i, &vf_plist[i]); if (rval || (vf_plist[i] == NULL)) { cmn_err(CE_WARN, "No params for VF %d\n", i); continue; } } pci_param_free(my_params); /* * Validate the PF and VF params lists. * Fail the attach if the params are incompatible or exceed the * resources available. */ continue_with_attach:
The pci_param_get() function can be called from kernel non-interrupt context.
See attributes(5) for descriptions of the following attributes:
|
attributes(5), pci_param_free(9F), pci_plist_get(9F), pci_plist_getvf(9F), pciv_vf_config(9F)