// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2005-2014 Brocade Communications Systems, Inc. * Copyright (c) 2014- QLogic Corporation. * All rights reserved * www.qlogic.com * * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter. */ #include "bfad_drv.h" #include "bfa_defs_svc.h" #include "bfa_port.h" #include "bfi.h" #include "bfa_ioc.h" BFA_TRC_FILE(…); static void bfa_port_stats_swap(struct bfa_port_s *port, union bfa_port_stats_u *stats) { … } /* * bfa_port_enable_isr() * * * @param[in] port - Pointer to the port module * status - Return status from the f/w * * @return void */ static void bfa_port_enable_isr(struct bfa_port_s *port, bfa_status_t status) { … } /* * bfa_port_disable_isr() * * * @param[in] port - Pointer to the port module * status - Return status from the f/w * * @return void */ static void bfa_port_disable_isr(struct bfa_port_s *port, bfa_status_t status) { … } /* * bfa_port_get_stats_isr() * * * @param[in] port - Pointer to the Port module * status - Return status from the f/w * * @return void */ static void bfa_port_get_stats_isr(struct bfa_port_s *port, bfa_status_t status) { … } /* * bfa_port_clear_stats_isr() * * * @param[in] port - Pointer to the Port module * status - Return status from the f/w * * @return void */ static void bfa_port_clear_stats_isr(struct bfa_port_s *port, bfa_status_t status) { … } /* * bfa_port_isr() * * * @param[in] Pointer to the Port module data structure. * * @return void */ static void bfa_port_isr(void *cbarg, struct bfi_mbmsg_s *m) { … } /* * bfa_port_meminfo() * * * @param[in] void * * @return Size of DMA region */ u32 bfa_port_meminfo(void) { … } /* * bfa_port_mem_claim() * * * @param[in] port Port module pointer * dma_kva Kernel Virtual Address of Port DMA Memory * dma_pa Physical Address of Port DMA Memory * * @return void */ void bfa_port_mem_claim(struct bfa_port_s *port, u8 *dma_kva, u64 dma_pa) { … } /* * bfa_port_enable() * * Send the Port enable request to the f/w * * @param[in] Pointer to the Port module data structure. * * @return Status */ bfa_status_t bfa_port_enable(struct bfa_port_s *port, bfa_port_endis_cbfn_t cbfn, void *cbarg) { … } /* * bfa_port_disable() * * Send the Port disable request to the f/w * * @param[in] Pointer to the Port module data structure. * * @return Status */ bfa_status_t bfa_port_disable(struct bfa_port_s *port, bfa_port_endis_cbfn_t cbfn, void *cbarg) { … } /* * bfa_port_get_stats() * * Send the request to the f/w to fetch Port statistics. * * @param[in] Pointer to the Port module data structure. * * @return Status */ bfa_status_t bfa_port_get_stats(struct bfa_port_s *port, union bfa_port_stats_u *stats, bfa_port_stats_cbfn_t cbfn, void *cbarg) { … } /* * bfa_port_clear_stats() * * * @param[in] Pointer to the Port module data structure. * * @return Status */ bfa_status_t bfa_port_clear_stats(struct bfa_port_s *port, bfa_port_stats_cbfn_t cbfn, void *cbarg) { … } /* * bfa_port_notify() * * Port module IOC event handler * * @param[in] Pointer to the Port module data structure. * @param[in] IOC event structure * * @return void */ void bfa_port_notify(void *arg, enum bfa_ioc_event_e event) { … } /* * bfa_port_attach() * * * @param[in] port - Pointer to the Port module data structure * ioc - Pointer to the ioc module data structure * dev - Pointer to the device driver module data structure * The device driver specific mbox ISR functions have * this pointer as one of the parameters. * trcmod - * * @return void */ void bfa_port_attach(struct bfa_port_s *port, struct bfa_ioc_s *ioc, void *dev, struct bfa_trc_mod_s *trcmod) { … } /* * bfa_port_set_dportenabled(); * * Port module- set pbc disabled flag * * @param[in] port - Pointer to the Port module data structure * * @return void */ void bfa_port_set_dportenabled(struct bfa_port_s *port, bfa_boolean_t enabled) { … } /* * CEE module specific definitions */ /* * bfa_cee_get_attr_isr() * * @brief CEE ISR for get-attributes responses from f/w * * @param[in] cee - Pointer to the CEE module * status - Return status from the f/w * * @return void */ static void bfa_cee_get_attr_isr(struct bfa_cee_s *cee, bfa_status_t status) { … } /* * bfa_cee_get_stats_isr() * * @brief CEE ISR for get-stats responses from f/w * * @param[in] cee - Pointer to the CEE module * status - Return status from the f/w * * @return void */ static void bfa_cee_get_stats_isr(struct bfa_cee_s *cee, bfa_status_t status) { … } /* * bfa_cee_reset_stats_isr() * * @brief CEE ISR for reset-stats responses from f/w * * @param[in] cee - Pointer to the CEE module * status - Return status from the f/w * * @return void */ static void bfa_cee_reset_stats_isr(struct bfa_cee_s *cee, bfa_status_t status) { … } /* * bfa_cee_meminfo() * * @brief Returns the size of the DMA memory needed by CEE module * * @param[in] void * * @return Size of DMA region */ u32 bfa_cee_meminfo(void) { … } /* * bfa_cee_mem_claim() * * @brief Initialized CEE DMA Memory * * @param[in] cee CEE module pointer * dma_kva Kernel Virtual Address of CEE DMA Memory * dma_pa Physical Address of CEE DMA Memory * * @return void */ void bfa_cee_mem_claim(struct bfa_cee_s *cee, u8 *dma_kva, u64 dma_pa) { … } /* * bfa_cee_get_attr() * * @brief * Send the request to the f/w to fetch CEE attributes. * * @param[in] Pointer to the CEE module data structure. * * @return Status */ bfa_status_t bfa_cee_get_attr(struct bfa_cee_s *cee, struct bfa_cee_attr_s *attr, bfa_cee_get_attr_cbfn_t cbfn, void *cbarg) { … } /* * bfa_cee_get_stats() * * @brief * Send the request to the f/w to fetch CEE statistics. * * @param[in] Pointer to the CEE module data structure. * * @return Status */ bfa_status_t bfa_cee_get_stats(struct bfa_cee_s *cee, struct bfa_cee_stats_s *stats, bfa_cee_get_stats_cbfn_t cbfn, void *cbarg) { … } /* * bfa_cee_reset_stats() * * @brief Clears CEE Stats in the f/w. * * @param[in] Pointer to the CEE module data structure. * * @return Status */ bfa_status_t bfa_cee_reset_stats(struct bfa_cee_s *cee, bfa_cee_reset_stats_cbfn_t cbfn, void *cbarg) { … } /* * bfa_cee_isrs() * * @brief Handles Mail-box interrupts for CEE module. * * @param[in] Pointer to the CEE module data structure. * * @return void */ static void bfa_cee_isr(void *cbarg, struct bfi_mbmsg_s *m) { … } /* * bfa_cee_notify() * * @brief CEE module IOC event handler. * * @param[in] Pointer to the CEE module data structure. * @param[in] IOC event type * * @return void */ static void bfa_cee_notify(void *arg, enum bfa_ioc_event_e event) { … } /* * bfa_cee_attach() * * @brief CEE module-attach API * * @param[in] cee - Pointer to the CEE module data structure * ioc - Pointer to the ioc module data structure * dev - Pointer to the device driver module data structure * The device driver specific mbox ISR functions have * this pointer as one of the parameters. * * @return void */ void bfa_cee_attach(struct bfa_cee_s *cee, struct bfa_ioc_s *ioc, void *dev) { … }