#include <sysfs/libsysfs.h>
#include "vlib.h"
Functions | |
static HBA_STATUS | addPortByName (struct vlib_adapter *adapter, char *name) |
add a port to the adapters repos | |
static HBA_STATUS | addAdapterByBusDev (struct sysfs_device *bus_dev) |
add an adapter to the adapters repos | |
static HBA_STATUS | getPortAttributes (HBA_PORTATTRIBUTES **pPortattributes, struct sysfs_class_device *class_dev) |
Retrieve adapter attributes. | |
HBA_STATUS | sysfs_createAndReadConfigPorts (struct vlib_adapter *adapter) |
Read and store all discovered ports of an adapter. | |
HBA_STATUS | sysfs_createAndReadConfigAdapter () |
Read all adapters from /sys/bus/ccw/drivers/zfcp and add them to the repository. | |
int | sysfs_getUnitsFromPort (struct vlib_port *port) |
Get unit configuration information for a port. | |
HBA_STATUS | sysfs_getDiscoveredPortAttributes (HBA_PORTATTRIBUTES **pAttrs, struct vlib_port *port) |
Retrieve adapter attributes. | |
HBA_STATUS | sysfs_getAdapterPortAttributes (HBA_PORTATTRIBUTES **pAttrs, struct vlib_adapter *adapter) |
Retrieve adapter attributes. | |
HBA_STATUS | sysfs_getAdapterAttributes (HBA_ADAPTERATTRIBUTES **pAttrs, struct vlib_adapter *adapter) |
Retrieve adapter attributes. | |
HBA_STATUS | sysfs_getPortStatistics (HBA_PORTSTATISTICS **pS, struct vlib_adapter *adapter) |
Retrieve adapter port statistics. |
static HBA_STATUS addAdapterByBusDev | ( | struct sysfs_device * | bus_dev | ) | [static] |
add an adapter to the adapters repos
*bus_dev | the sysfs bus device as seen under /sys/bus/ccw/drivers/zfcp/x.x.xxxx |
References addAdapterToRepos(), vlib_adapter_ident::bus_dev_name, vlib_adapter_ident::class_dev_name, vlib_adapter_ident::devid, vlib_adapter::ident, vlib_adapter_ident::wwnn, and vlib_adapter_ident::wwpn.
Referenced by sysfs_createAndReadConfigAdapter().
static HBA_STATUS addPortByName | ( | struct vlib_adapter * | adapter, | |
char * | name | |||
) | [static] |
add a port to the adapters repos
*adapter | the adapter to which the add the port to | |
*name | the unique name of the remote port as in fc_remote_ports |
References addPortToRepos(), vlib_port::channel, vlib_port::did, vlib_port::host, vlib_port::name, vlib_port::target, vlib_port::wwnn, and vlib_port::wwpn.
Referenced by sysfs_createAndReadConfigPorts(), and sysfs_getAdapterPortAttributes().
static HBA_STATUS getPortAttributes | ( | HBA_PORTATTRIBUTES ** | pPortattributes, | |
struct sysfs_class_device * | class_dev | |||
) | [static] |
Retrieve adapter attributes.
**pPortattributes,HBA_ADAPTERATTRIBUTES | to be filled | |
*adapter | to work with |
References vlib_FCID_to_hbaFCID(), vlib_wwn_to_HBA_WWN(), vlibCharToIntCOS(), vlibCharToIntPortSpeed(), vlibCharToIntPortState(), and vlibCharToIntPortType().
Referenced by sysfs_getAdapterPortAttributes(), and sysfs_getDiscoveredPortAttributes().
HBA_STATUS sysfs_createAndReadConfigAdapter | ( | ) |
Read all adapters from /sys/bus/ccw/drivers/zfcp and add them to the repository.
References addAdapterByBusDev(), and revalidateAdapters().
Referenced by HBA_LoadLibrary(), and revalidateRepository().
HBA_STATUS sysfs_createAndReadConfigPorts | ( | struct vlib_adapter * | adapter | ) |
Read and store all discovered ports of an adapter.
*adapter | pointer to the adapter in which we are interested |
References addPortByName(), vlib_adapter_ident::class_dev_name, vlib_adapter_ident::devid, and vlib_adapter::ident.
Referenced by revalidatePorts(), and updateAdapter().
HBA_STATUS sysfs_getAdapterAttributes | ( | HBA_ADAPTERATTRIBUTES ** | pAttrs, | |
struct vlib_adapter * | adapter | |||
) |
Retrieve adapter attributes.
**pAdapterattributes,HBA_ADAPTERATTRIBUTES | to be filled | |
*adapter | to work with |
References vlib_adapter_ident::bus_dev_name, vlib_adapter_ident::class_dev_name, vlib_adapter::ident, vlib_wwn_to_HBA_WWN(), and vlib_adapter_ident::wwnn.
Referenced by HBA_GetAdapterAttributes().
HBA_STATUS sysfs_getAdapterPortAttributes | ( | HBA_PORTATTRIBUTES ** | pAttrs, | |
struct vlib_adapter * | adapter | |||
) |
Retrieve adapter attributes.
**pPortattributes,HBA_ADAPTERATTRIBUTES | to be filled | |
*adapter | to work with |
References addPortByName(), vlib_adapter_ident::class_dev_name, vlib_adapter_ident::devid, getPortAttributes(), and vlib_adapter::ident.
Referenced by HBA_GetAdapterPortAttributes().
HBA_STATUS sysfs_getDiscoveredPortAttributes | ( | HBA_PORTATTRIBUTES ** | pAttrs, | |
struct vlib_port * | port | |||
) |
Retrieve adapter attributes.
**pPortattributes,HBA_ADAPTERATTRIBUTES | to be filled | |
*adapter | to work with |
References getPortAttributes(), and vlib_port::name.
Referenced by HBA_GetDiscoveredPortAttributes().
HBA_STATUS sysfs_getPortStatistics | ( | HBA_PORTSTATISTICS ** | pS, | |
struct vlib_adapter * | adapter | |||
) |
Retrieve adapter port statistics.
**pPortstatistics,HBA_PORTSTATISTICS | to be filled | |
*adapter | to work with |
References vlib_adapter_ident::class_dev_name, and vlib_adapter::ident.
Referenced by HBA_GetPortStatistics().
int sysfs_getUnitsFromPort | ( | struct vlib_port * | port | ) |
Get unit configuration information for a port.
*port | for which unit configuration is received |
References addUnitToRepos(), vlib_unit::channel, vlib_unit::fcLun, vlib_unit::host, vlib_unit::lun, vlib_port::name, vlib_unit::sg_dev, and vlib_unit::target.
Referenced by revalidateUnits(), and updateAdapter().