2 * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License (GPL) Version 2 as
10 * published by the Free Software Foundation
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
18 #include "bfa_modules.h"
21 * BFA module list terminated by NULL
23 struct bfa_module_s *hal_mods[] = {
35 * Message handlers for various modules.
37 bfa_isr_func_t bfa_isrs[BFI_MC_MAX] = {
38 bfa_isr_unhandled, /* NONE */
39 bfa_isr_unhandled, /* BFI_MC_IOC */
40 bfa_isr_unhandled, /* BFI_MC_DIAG */
41 bfa_isr_unhandled, /* BFI_MC_FLASH */
42 bfa_isr_unhandled, /* BFI_MC_CEE */
43 bfa_fcport_isr, /* BFI_MC_FCPORT */
44 bfa_isr_unhandled, /* BFI_MC_IOCFC */
45 bfa_isr_unhandled, /* BFI_MC_LL */
46 bfa_uf_isr, /* BFI_MC_UF */
47 bfa_fcxp_isr, /* BFI_MC_FCXP */
48 bfa_lps_isr, /* BFI_MC_LPS */
49 bfa_rport_isr, /* BFI_MC_RPORT */
50 bfa_itnim_isr, /* BFI_MC_ITNIM */
51 bfa_isr_unhandled, /* BFI_MC_IOIM_READ */
52 bfa_isr_unhandled, /* BFI_MC_IOIM_WRITE */
53 bfa_isr_unhandled, /* BFI_MC_IOIM_IO */
54 bfa_ioim_isr, /* BFI_MC_IOIM */
55 bfa_ioim_good_comp_isr, /* BFI_MC_IOIM_IOCOM */
56 bfa_tskim_isr, /* BFI_MC_TSKIM */
57 bfa_isr_unhandled, /* BFI_MC_SBOOT */
58 bfa_isr_unhandled, /* BFI_MC_IPFC */
59 bfa_isr_unhandled, /* BFI_MC_PORT */
60 bfa_isr_unhandled, /* --------- */
61 bfa_isr_unhandled, /* --------- */
62 bfa_isr_unhandled, /* --------- */
63 bfa_isr_unhandled, /* --------- */
64 bfa_isr_unhandled, /* --------- */
65 bfa_isr_unhandled, /* --------- */
66 bfa_isr_unhandled, /* --------- */
67 bfa_isr_unhandled, /* --------- */
68 bfa_isr_unhandled, /* --------- */
69 bfa_isr_unhandled, /* --------- */
74 * Message handlers for mailbox command classes
76 bfa_ioc_mbox_mcfunc_t bfa_mbox_isrs[BFI_MC_MAX] = {
78 NULL, /* BFI_MC_IOC */
79 NULL, /* BFI_MC_DIAG */
80 NULL, /* BFI_MC_FLASH */
81 NULL, /* BFI_MC_CEE */
82 NULL, /* BFI_MC_PORT */
83 bfa_iocfc_isr, /* BFI_MC_IOCFC */
90 bfa_com_port_attach(struct bfa_s *bfa, struct bfa_meminfo_s *mi)
92 struct bfa_port_s *port = &bfa->modules.port;
97 dm_len = bfa_port_meminfo();
98 dm_kva = bfa_meminfo_dma_virt(mi);
99 dm_pa = bfa_meminfo_dma_phys(mi);
101 memset(port, 0, sizeof(struct bfa_port_s));
102 bfa_port_attach(port, &bfa->ioc, bfa, bfa->trcmod);
103 bfa_port_mem_claim(port, dm_kva, dm_pa);
105 bfa_meminfo_dma_virt(mi) = dm_kva + dm_len;
106 bfa_meminfo_dma_phys(mi) = dm_pa + dm_len;