#include <stdio.h>#include <unistd.h>#include <stdlib.h>#include <string.h>#include <stdint.h>#include <stdarg.h>#include <ctype.h>#include <sys/ioctl.h>#include <ocs_ioctl.h>#include <ocsu_io.h>#include "elxu_common.h"#include "elxu_device.h"#include "elxu_mgmt.h"#include "elx_pt_ioctl.h"Go to the source code of this file.
Data Structures | |
| struct | device_type_info_t |
| struct | device_protocol_info_t |
| struct | pci_device_map_t |
Macros | |
| #define | MIN(x, y) ((x) < (y) ? (x) : (y)) |
| #define | ELX_PT_MAX_DMA_ALLOC 64*1024 |
| #define | FW_BUFFER_SIZE 64*1024 |
Functions | |
| static void | dev_parse_wwn (char *, uint8_t *) |
| static void | dev_parse_mac (char *, uint8_t *) |
| void | elxu_build_device_list (int argc, char *argv[]) |
| Create a list of devices. More... | |
| void | elxu_delete_device_list () |
| elxu_device_t * | elxu_open_device (elxu_device_name_t *devname) |
| Open a device file. More... | |
| void | fill_device_details (elxu_device_t *device) |
| 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_lancer_run_loopback (elxu_device_t *device_p, const char *fname, int type) |
| int | elxu_lancer_set_loopback (elxu_device_t *device_p, const char *fname, int *type) |
| int | elxu_lancer_get_link_state (elxu_device_t *device_p, uint32_t *status) |
| int | elxu_lancer_set_link_state (elxu_device_t *device_p, uint32_t *status) |
| int | elx_pt_set_dump_location (elxu_device_t *device, uint32_t num_buffers, memref_t **dump_buffers, uint8_t fdb) |
| 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... | |
| void | set_protocol (elxu_device_t *device) |
| int | is_iscsi (elxu_device_t *device_p) |
| Return true IFF the HBA is an iSCSI HBA. More... | |
| int | is_nic (elxu_device_t *device_p) |
| Return true IFF the HBA is a NIC HBA. More... | |
| int | is_fc (elxu_device_t *device_p) |
| Return true IFF the HBA is a FC HBA. More... | |
| int | is_fcoe (elxu_device_t *device_p) |
| Return true IFF the HBA is a FCoE HBA. More... | |
| int | is_skyhawk (elxu_device_t *device_p) |
| Return true IFF the HBA is a Skyhawk. More... | |
| int | is_lancer (elxu_device_t *device_p) |
| Return true IFF the HBA is a Lancer. More... | |
| int | is_lancer_g5 (elxu_device_t *device_p) |
| Return true IFF the HBA is a Lancer G5. More... | |
| int | is_prism (elxu_device_t *device_p) |
| Return true IFF the HBA is a Prism. More... | |
| int | is_calypso (elxu_device_t *device_p) |
| Return true IFF the HBA is a Calypso. More... | |
| int | is_uspace (elxu_device_t *device_p) |
| Return true IFF the device is managed by a user space driver. More... | |
Variables | |
| static elxu_device_t * | device_list |
| static device_type_info_t | device_type_info [] |
| static device_protocol_info_t | device_protocol_info [] |
| pci_device_map_t | pci_device_map [] |
| #define ELX_PT_MAX_DMA_ALLOC 64*1024 |
| #define FW_BUFFER_SIZE 64*1024 |
| #define MIN | ( | x, | |
| y | |||
| ) | ((x) < (y) ? (x) : (y)) |
Definition at line 55 of file elxu_device.c.
|
static |
Definition at line 285 of file elxu_device.c.
|
static |
Definition at line 261 of file elxu_device.c.
| int elx_pt_set_dump_location | ( | elxu_device_t * | device, |
| uint32_t | num_buffers, | ||
| memref_t ** | dump_buffers, | ||
| uint8_t | fdb | ||
| ) |
Definition at line 880 of file elxu_device.c.
| void elxu_delete_device_list | ( | ) |
Definition at line 164 of file elxu_device.c.
| int elxu_lancer_get_link_state | ( | elxu_device_t * | device_p, |
| uint32_t * | status | ||
| ) |
Definition at line 857 of file elxu_device.c.
| int elxu_lancer_run_loopback | ( | elxu_device_t * | device_p, |
| const char * | fname, | ||
| int | type | ||
| ) |
Definition at line 785 of file elxu_device.c.
| int elxu_lancer_set_link_state | ( | elxu_device_t * | device_p, |
| uint32_t * | status | ||
| ) |
Definition at line 868 of file elxu_device.c.
| int elxu_lancer_set_loopback | ( | elxu_device_t * | device_p, |
| const char * | fname, | ||
| int * | type | ||
| ) |
Definition at line 843 of file elxu_device.c.
| void fill_device_details | ( | elxu_device_t * | device | ) |
Definition at line 225 of file elxu_device.c.
| int is_calypso | ( | elxu_device_t * | device_p | ) |
Return true IFF the HBA is a Calypso.
Given a pointer to a device structure, return 1 if the HBA is Calypso and 0 if it is not.
| device_p | A pointer to HBA node |
Definition at line 1287 of file elxu_device.c.
| int is_fc | ( | elxu_device_t * | device_p | ) |
Return true IFF the HBA is a FC HBA.
Given a pointer to a device structure, return 1 if the HBA is FC and 0 if it is not.
| device_p | A pointer to HBA node |
Definition at line 1185 of file elxu_device.c.
| int is_fcoe | ( | elxu_device_t * | device_p | ) |
Return true IFF the HBA is a FCoE HBA.
Given a pointer to a device structure, return 1 if the HBA is FCoE and 0 if it is not.
| device_p | A pointer to HBA node |
Definition at line 1202 of file elxu_device.c.
| int is_iscsi | ( | elxu_device_t * | device_p | ) |
Return true IFF the HBA is an iSCSI HBA.
Given a pointer to a device structure, return 1 if the HBA is iSCSI and 0 if it is not.
| device_p | A pointer to HBA node |
Definition at line 1151 of file elxu_device.c.
| int is_lancer | ( | elxu_device_t * | device_p | ) |
Return true IFF the HBA is a Lancer.
Given a pointer to a device structure, return 1 if the HBA is Lancer and 0 if it is not.
| device_p | A pointer to HBA node |
Definition at line 1236 of file elxu_device.c.
| int is_lancer_g5 | ( | elxu_device_t * | device_p | ) |
Return true IFF the HBA is a Lancer G5.
Given a pointer to a device structure, return 1 if the HBA is Lancer and 0 if it is not.
| device_p | A pointer to HBA node |
Definition at line 1253 of file elxu_device.c.
| int is_nic | ( | elxu_device_t * | device_p | ) |
Return true IFF the HBA is a NIC HBA.
Given a pointer to a device structure, return 1 if the HBA is NIC and 0 if it is not.
| device_p | A pointer to HBA node |
Definition at line 1168 of file elxu_device.c.
| int is_prism | ( | elxu_device_t * | device_p | ) |
Return true IFF the HBA is a Prism.
Given a pointer to a device structure, return 1 if the HBA is Prism and 0 if it is not.
| device_p | A pointer to HBA node |
Definition at line 1270 of file elxu_device.c.
| int is_skyhawk | ( | elxu_device_t * | device_p | ) |
Return true IFF the HBA is a Skyhawk.
Given a pointer to a device structure, return 1 if the HBA is Skyhawk and 0 if it is not.
| device_p | A pointer to HBA node |
Definition at line 1219 of file elxu_device.c.
| int is_uspace | ( | elxu_device_t * | device_p | ) |
Return true IFF the device is managed by a user space driver.
Given a pointer to a device structure, return 1 if the driver is user space and 0 if it is not.
| device_p | A pointer to HBA node |
Definition at line 1305 of file elxu_device.c.
| void set_protocol | ( | elxu_device_t * | device | ) |
Definition at line 1129 of file elxu_device.c.
|
static |
Definition at line 60 of file elxu_device.c.
|
static |
Definition at line 87 of file elxu_device.c.
|
static |
Definition at line 71 of file elxu_device.c.
| pci_device_map_t pci_device_map[] |
Definition at line 106 of file elxu_device.c.