/* * Copyright (c) 2011-2018, Emulex * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * */ #ifndef ELXU_DUMP_H_ #define ELXU_DUMP_H_ #define DEFAULT_OUTPUT_FILE_NAME "fat.data" typedef enum { NO_SPECIFIC_REQ, FAT_DATA, EFD_DATA, ECD_DATA, LANCER_DUMP, } data_type_req_t; extern int ext_fat_capabilities_upld (elxu_device_t *device_p); extern int hba_data_upload(elxu_device_t *device_p, char const *fname_p, data_type_req_t req); extern int hba_data_object_upload (elxu_device_t *device, char const *objname_p, char const *fname_p); extern int elxu_core_dump(elxu_device_t *, char *, int); extern int lancer_gen_dump(elxu_device_t *host_p, int); extern int lancer_dump_to_host(elxu_device_t *host_p, const char *fname, int); extern void elxu_driver_dump(elxu_device_t *device, int bufsize, ocs_ioctl_ddump_arg_t *arg); extern int elxu_get_fw_diagnostic_log(elxu_device_t *device_p, char const *fname); extern void os_cfg_read8(void *ctx, uint32_t offset, uint32_t *pdata); extern void os_cfg_read16(void *ctx, uint32_t offset, uint32_t *pdata); extern void os_cfg_read32(void *ctx, uint32_t offset, uint32_t *pdata); extern void os_cfg_write8(void *ctx, uint32_t offset, uint32_t pdata); extern void os_cfg_write16(void *ctx, uint32_t offset, uint32_t pdata); extern void os_cfg_write32(void *ctx, uint32_t offset, uint32_t pdata); extern void os_bar_read8(void *ctx, uint32_t bar, uint32_t offset, uint32_t *pdata); extern void os_bar_read16(void *ctx, uint32_t bar, uint32_t offset, uint32_t *pdata); extern void os_bar_read32(void *ctx, uint32_t bar, uint32_t offset, uint32_t *pdata); extern void os_bar_write8(void *ctx, uint32_t bar, uint32_t offset, uint32_t pdata); extern void os_bar_write16(void *ctx, uint32_t bar, uint32_t offset, uint32_t pdata); extern void os_bar_write32(void *ctx, uint32_t bar, uint32_t offset, uint32_t pdata); #endif /* ELXU_DUMP_H_ */