#include "ocs.h"#include "ocs_driver.h"#include "ocs_vpd.h"#include "ocs_mgmt.h"#include "ocs_gendump.h"#include "ocs_ras.h"#include "ocs_recovery.h"#include "ocs_pm.h"#include "ocs_els.h"#include "ocs_params.h"Go to the source code of this file.
Data Structures | |
| struct | ocs_fw_write_result_t |
Macros | |
| #define | FW_WRITE_BUFSIZE 64*1024 |
| #define | INTERNAL_LOOPBACK 0x1 |
| #define | EXTERNAL_LOOPBACK 0x2 |
| #define | PCI_LOOPBACK 0x3 |
| #define | LOOPBACK_FRAME_TIMEOUT_SEC 5 |
Functions | |
| static void | ocs_device_interrupt_handler (ocs_t *ocs, uint32_t vector) |
| interrupt handler More... | |
| static void | ocs_driver_print_module_params (void) |
| void | ocs_mgmt_driver_list (ocs_textbuf_t *textbuf, void *driver) |
| void | ocs_mgmt_driver_get_all (ocs_textbuf_t *textbuf, void *driver) |
| int | ocs_mgmt_driver_get (ocs_textbuf_t *textbuf, char *parent, char *name, void *driver) |
| int | ocs_mgmt_driver_exec (char *parent, char *action, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length, void *driver) |
| int | ocs_run_link_loopback (ocs_t *ocs, void *tx_buf, uint32_t tx_buflen, void *rx_buf, uint32_t rx_buflen) |
| int | ocs_run_pci_loopback (ocs_t *ocs, void *tx_buf, uint32_t tx_buflen, void *rx_buf, uint32_t rx_buflen) |
| int | ocs_set_loopback_mode (ocs_t *ocs, uint32_t arg_in) |
| int | ocs_set_fc_trunk_mode (ocs_t *ocs, uint32_t trunk_mode) |
| int | ocs_get_fc_trunk_info (ocs_t *ocs, uint32_t *trunk_config) |
| int | ocs_ras_collect_diag_logs (ocs_t *ocs, void *user_tx_buf, uint32_t user_tx_buflen, void *user_rx_buf, uint32_t rx_buf_len) |
| static void | ocs_capture_hal_global_params (void) |
| int32_t | ocs_device_init (void) |
| Perform driver wide initialization. More... | |
| int32_t | ocs_device_init_complete (void) |
| Perform device initialization complete. More... | |
| void | ocs_device_shutdown (void) |
| Perform driver wide shutdown actions. More... | |
| void | ocs_device_shutdown_complete (void) |
| Perform driver wide shutdown complete actions. More... | |
| void * | ocs_device_alloc (int32_t nid) |
| void | ocs_device_free (ocs_t *ocs) |
| free ocs device More... | |
| int32_t | ocs_device_interrupts_required (ocs_t *ocs) |
| return the number of interrupts required per HBA More... | |
| int32_t | ocs_device_attach (ocs_t *ocs) |
| Initialize resources when pci devices attach. More... | |
| int32_t | ocs_device_detach (ocs_t *ocs) |
| free resources when pci device detach More... | |
| int32_t | ocs_get_property (const char *prop_name, char *buffer, uint32_t buffer_len) |
| get driver wide property value More... | |
| static void | ocs_fw_write_cb (int32_t status, int32_t ext_status, uint32_t actual_write_length, uint32_t change_status, void *arg) |
| int | ocs_firmware_write (ocs_t *ocs, const u8 *buf, size_t buf_len, uint8_t *change_status) |
| int | ocs_request_firmware_update (ocs_t *ocs) |
| const char * | ocs_display_name (void *os) |
| return OCS instance display name More... | |
Variables | |
| static ocs_mgmt_functions_t | driver_mgmt_functions |
| uint64_t | g_app_watchdog_cpu_mask = 0 |
| #define EXTERNAL_LOOPBACK 0x2 |
Definition at line 78 of file common/ocs_fc/ocs_driver.c.
| #define FW_WRITE_BUFSIZE 64*1024 |
Definition at line 68 of file common/ocs_fc/ocs_driver.c.
| #define INTERNAL_LOOPBACK 0x1 |
Definition at line 77 of file common/ocs_fc/ocs_driver.c.
| #define LOOPBACK_FRAME_TIMEOUT_SEC 5 |
Definition at line 80 of file common/ocs_fc/ocs_driver.c.
| #define PCI_LOOPBACK 0x3 |
Definition at line 79 of file common/ocs_fc/ocs_driver.c.
|
static |
Definition at line 88 of file common/ocs_fc/ocs_driver.c.
| void* ocs_device_alloc | ( | int32_t | nid | ) |
Definition at line 252 of file common/ocs_fc/ocs_driver.c.
| int32_t ocs_device_attach | ( | ocs_t * | ocs | ) |
Initialize resources when pci devices attach.
| ocs | pointer to ocs structure |
Definition at line 376 of file common/ocs_fc/ocs_driver.c.
| int32_t ocs_device_detach | ( | ocs_t * | ocs | ) |
free resources when pci device detach
| ocs | pointer to ocs structure |
Definition at line 553 of file common/ocs_fc/ocs_driver.c.
| void ocs_device_free | ( | ocs_t * | ocs | ) |
free ocs device
| ocs | pointer to ocs structure |
Definition at line 321 of file common/ocs_fc/ocs_driver.c.
| int32_t ocs_device_init | ( | void | ) |
Perform driver wide initialization.
This function is called prior to enumerating PCI devices, with subsequent calls to ocs_device_attach. For OCS, this function invokes the back end functions ocs_scsi_tgt_driver_init(), and ocs_scsi_ini_driver_init()
Definition at line 141 of file common/ocs_fc/ocs_driver.c.
| int32_t ocs_device_init_complete | ( | void | ) |
Perform device initialization complete.
This function is called after all PCI device/functions have been enumerated.
Definition at line 186 of file common/ocs_fc/ocs_driver.c.
|
static |
interrupt handler
Interrupt handler
| ocs | pointer to ocs structure |
| vector | Zero-based interrupt vector number. |
Definition at line 539 of file common/ocs_fc/ocs_driver.c.
| int32_t ocs_device_interrupts_required | ( | ocs_t * | ocs | ) |
return the number of interrupts required per HBA
| ocs | pointer to ocs structure |
Definition at line 358 of file common/ocs_fc/ocs_driver.c.
| void ocs_device_shutdown | ( | void | ) |
Perform driver wide shutdown actions.
This function is called prior to detatching devices during a driver unload.
Definition at line 218 of file common/ocs_fc/ocs_driver.c.
| void ocs_device_shutdown_complete | ( | void | ) |
Perform driver wide shutdown complete actions.
This function is called shutdown for all devices has completed
Definition at line 233 of file common/ocs_fc/ocs_driver.c.
| const char* ocs_display_name | ( | void * | os | ) |
return OCS instance display name
returns const char string of OCS instance display name
| os | pointer to OS (ocs_t) object |
Definition at line 822 of file common/ocs_fc/ocs_driver.c.
|
static |
Definition at line 1223 of file common/ocs_fc/ocs_driver.c.
| int ocs_firmware_write | ( | ocs_t * | ocs, |
| const u8 * | buf, | ||
| size_t | buf_len, | ||
| uint8_t * | change_status | ||
| ) |
Definition at line 676 of file common/ocs_fc/ocs_driver.c.
|
static |
Definition at line 663 of file common/ocs_fc/ocs_driver.c.
| int32_t ocs_get_fc_trunk_info | ( | ocs_t * | ocs, |
| uint32_t * | trunk_config | ||
| ) |
Definition at line 1304 of file common/ocs_fc/ocs_driver.c.
| int32_t ocs_get_property | ( | const char * | prop_name, |
| char * | buffer, | ||
| uint32_t | buffer_len | ||
| ) |
get driver wide property value
Return valued driver wide property. All property values using this interface are returned as null terminated text.
| prop_name | property name |
| buffer | pointer to buffer |
| buffer_len | length of buffer in bytes |
Definition at line 602 of file common/ocs_fc/ocs_driver.c.
| int ocs_mgmt_driver_exec | ( | char * | parent, |
| char * | action, | ||
| void * | arg_in, | ||
| uint32_t | arg_in_length, | ||
| void * | arg_out, | ||
| uint32_t | arg_out_length, | ||
| void * | driver | ||
| ) |
| int ocs_mgmt_driver_get | ( | ocs_textbuf_t * | textbuf, |
| char * | parent, | ||
| char * | name, | ||
| void * | driver | ||
| ) |
| void ocs_mgmt_driver_get_all | ( | ocs_textbuf_t * | textbuf, |
| void * | driver | ||
| ) |
| void ocs_mgmt_driver_list | ( | ocs_textbuf_t * | textbuf, |
| void * | driver | ||
| ) |
| int ocs_ras_collect_diag_logs | ( | ocs_t * | ocs, |
| void * | user_tx_buf, | ||
| uint32_t | user_tx_buflen, | ||
| void * | user_rx_buf, | ||
| uint32_t | rx_buf_len | ||
| ) |
Definition at line 1494 of file common/ocs_fc/ocs_driver.c.
| int ocs_request_firmware_update | ( | ocs_t * | ocs | ) |
Definition at line 740 of file common/ocs_fc/ocs_driver.c.
| int ocs_run_link_loopback | ( | ocs_t * | ocs, |
| void * | tx_buf, | ||
| uint32_t | tx_buflen, | ||
| void * | rx_buf, | ||
| uint32_t | rx_buflen | ||
| ) |
Definition at line 1345 of file common/ocs_fc/ocs_driver.c.
| int ocs_run_pci_loopback | ( | ocs_t * | ocs, |
| void * | tx_buf, | ||
| uint32_t | tx_buflen, | ||
| void * | rx_buf, | ||
| uint32_t | rx_buflen | ||
| ) |
Definition at line 1430 of file common/ocs_fc/ocs_driver.c.
| int32_t ocs_set_fc_trunk_mode | ( | ocs_t * | ocs, |
| uint32_t | trunk_mode | ||
| ) |
Definition at line 1290 of file common/ocs_fc/ocs_driver.c.
| int ocs_set_loopback_mode | ( | ocs_t * | ocs, |
| uint32_t | arg_in | ||
| ) |
Definition at line 1318 of file common/ocs_fc/ocs_driver.c.
|
static |
Definition at line 61 of file common/ocs_fc/ocs_driver.c.
| uint64_t g_app_watchdog_cpu_mask = 0 |
Definition at line 83 of file common/ocs_fc/ocs_driver.c.