Functions | |
| void | elxu_build_device_list (int argc, char *argv[]) |
| Create a list of devices. More... | |
| elxu_device_t * | elxu_open_device (elxu_device_name_t *devname) |
| Open a device file. More... | |
| int | elxu_ioctl_device (elxu_device_t *device, int req, void *arg) |
| Send an ioctl to a device. More... | |
| void | elxu_close_device (elxu_device_t *device) |
| Close a device. More... | |
| char * | elxu_get_modeldesc (elxu_device_t *device) |
| Return the model description for a device. More... | |
| char * | elxu_get_fwrev (elxu_device_t *device) |
| Return the firmware revision for a device. More... | |
| char * | elxu_get_ipl (elxu_device_t *device) |
| Return the IPL version for a device. More... | |
| char * | elxu_get_serialnumber (elxu_device_t *device) |
| Return the serial number for a device. More... | |
| uint32_t | elxu_get_phy_port_num (elxu_device_t *device) |
| Return the physical port number for a device. More... | |
| uint32_t | elxu_get_sliintf (elxu_device_t *device) |
| Return the sli_intf value for a device. More... | |
| uint32_t | elxu_get_asic_id (elxu_device_t *device) |
| Return the ASIC ID value for a device. More... | |
| char * | elxu_decode_family (uint32_t family) |
| Lookup a family name. More... | |
| char * | elxu_decode_asic_id (uint32_t asic_id) |
| Lookup an ASIC ID name. More... | |
| const char * | elxu_get_vendor_name (elxu_device_t *device) |
| Return the vendor name for a device. More... | |
| const char * | elxu_get_device_name (elxu_device_t *device) |
| Return the device name for a device. More... | |
| const char * | elxu_get_subsystem_device (elxu_device_t *device) |
| Return the PCI subsystem device value for a device. More... | |
| const char * | elxu_get_subsystem_vendor (elxu_device_t *device) |
| Return the PCI subsystem vendor value for a device. More... | |
| elxu_device_t * | elxu_device_from_args (int argc, char *argv[]) |
| Return a pointer to a device based on command line args. More... | |
| elxu_device_t * | elxu_device_by_index (int index) |
| Return a pointer to a device given an index. More... | |
| char * | elxu_device_get_value (elxu_device_t *device, char *key) |
| Return a property value for a device. More... | |
| int | elxu_device_exec (elxu_device_t *device, char *name, void *arg_in, int arg_in_len, void *arg_out, int arg_out_len) |
| Execute a management function on a device. More... | |
| elxu_device_t * | os_build_device_list (char *path) |
| Build a list of devices. More... | |
| void elxu_build_device_list | ( | int | argc, |
| char * | argv[] | ||
| ) |
Create a list of devices.
| argc | argc from command line |
| argv | argv from command line |
Definition at line 131 of file elxu_device.c.
| void elxu_close_device | ( | elxu_device_t * | device | ) |
Close a device.
| device | The elxu device structure of the device. |
Definition at line 340 of file elxu_device.c.
| char* elxu_decode_asic_id | ( | uint32_t | asic_id | ) |
Lookup an ASIC ID name.
| asic_id | The ASIC ID to lookup. |
Definition at line 526 of file elxu_device.c.
| char* elxu_decode_family | ( | uint32_t | family | ) |
Lookup a family name.
| family | The family number. |
Definition at line 495 of file elxu_device.c.
| elxu_device_t* elxu_device_by_index | ( | int | index | ) |
Return a pointer to a device given an index.
| index | Device index to find. |
Definition at line 730 of file elxu_device.c.
| int elxu_device_exec | ( | elxu_device_t * | device, |
| char * | name, | ||
| void * | arg_in, | ||
| int | arg_in_len, | ||
| void * | arg_out, | ||
| int | arg_out_len | ||
| ) |
Execute a management function on a device.
For the elx_pt driver we have to simulate the mgmt_exec function because the driver doesn't have the mgmt interface. For a limited set of key this function will perform the equivalent operation in other ways.
| device | Device to access. |
| key | Name of the property to retrieve. |
Definition at line 952 of file elxu_device.c.
| elxu_device_t* elxu_device_from_args | ( | int | argc, |
| char * | argv[] | ||
| ) |
Return a pointer to a device based on command line args.
| argc | Argument count from the command line |
| argv | Arguments from the command line |
Definition at line 688 of file elxu_device.c.
| char* elxu_device_get_value | ( | elxu_device_t * | device, |
| char * | key | ||
| ) |
Return a property value for a device.
For the elx_pt driver we have to simulate the mgmt_get_value function because the driver doesn't have the mgmt interface. For a limited set of key this function will determine the correct value in other ways.
| device | Device to access. |
| key | Name of the property to retrieve. |
Definition at line 765 of file elxu_device.c.
| uint32_t elxu_get_asic_id | ( | elxu_device_t * | device | ) |
Return the ASIC ID value for a device.
| device | The elxu device structure of the device. |
Definition at line 478 of file elxu_device.c.
| const char* elxu_get_device_name | ( | elxu_device_t * | device | ) |
Return the device name for a device.
| device | The elxu device structure of the device. |
Definition at line 602 of file elxu_device.c.
| char* elxu_get_fwrev | ( | elxu_device_t * | device | ) |
Return the firmware revision for a device.
| device | The elxu device structure of the device. |
Definition at line 384 of file elxu_device.c.
| char* elxu_get_ipl | ( | elxu_device_t * | device | ) |
Return the IPL version for a device.
| device | The elxu device structure of the device. |
Definition at line 404 of file elxu_device.c.
| char* elxu_get_modeldesc | ( | elxu_device_t * | device | ) |
Return the model description for a device.
| device | The elxu device structure of the device. |
Definition at line 363 of file elxu_device.c.
| uint32_t elxu_get_phy_port_num | ( | elxu_device_t * | device | ) |
Return the physical port number for a device.
| device | The elxu device structure of the device. |
Definition at line 446 of file elxu_device.c.
| char* elxu_get_serialnumber | ( | elxu_device_t * | device | ) |
Return the serial number for a device.
| device | The elxu device structure of the device. |
Definition at line 425 of file elxu_device.c.
| uint32_t elxu_get_sliintf | ( | elxu_device_t * | device | ) |
Return the sli_intf value for a device.
| device | The elxu device structure of the device. |
Definition at line 462 of file elxu_device.c.
| const char* elxu_get_subsystem_device | ( | elxu_device_t * | device | ) |
Return the PCI subsystem device value for a device.
| device | The elxu device structure of the device. |
Definition at line 642 of file elxu_device.c.
| const char* elxu_get_subsystem_vendor | ( | elxu_device_t * | device | ) |
Return the PCI subsystem vendor value for a device.
| device | The elxu device structure of the device. |
Definition at line 664 of file elxu_device.c.
| const char* elxu_get_vendor_name | ( | elxu_device_t * | device | ) |
Return the vendor name for a device.
| device | The elxu device structure of the device. |
Definition at line 576 of file elxu_device.c.
| int elxu_ioctl_device | ( | elxu_device_t * | device, |
| int | req, | ||
| void * | arg | ||
| ) |
Send an ioctl to a device.
| device | The elxu device structure of the device. |
| req | The ioctl request. |
| arg | The ioctl argument. |
Definition at line 322 of file elxu_device.c.
| elxu_device_t* elxu_open_device | ( | elxu_device_name_t * | devname | ) |
Open a device file.
NOTE: This function requires that the global device list has already been built by elxu_build_device_list.
| devname | A pointer to a device_name structure. This structure contains a device index and optionally a hostname if the device is accessed through the userspace driver. |
Definition at line 212 of file elxu_device.c.
| elxu_device_t* os_build_device_list | ( | char * | path | ) |
Build a list of devices.
For each Emulex device found on the bus it will determine the driver controlling the device, and will only add the device to the list if the driver is either one of the ocs_* drivers or is elx_pt.
Definition at line 194 of file elxu_linux.c.