Skip to content

Commit b77ee1f

Browse files
Maggie ZhangJames Bottomley
authored andcommitted
[SCSI] bfa: remove a file with small size
Removed bfa_drv.c, merged it to bfa_core.c and modified Makefile. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
1 parent f7f7381 commit b77ee1f

5 files changed

Lines changed: 88 additions & 112 deletions

File tree

‎drivers/scsi/bfa/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ obj-$(CONFIG_SCSI_BFA_FC) := bfa.o
33
bfa-y := bfad.o bfad_im.o bfad_attr.o bfad_debugfs.o
44
bfa-y += bfa_ioc.o bfa_ioc_cb.o bfa_ioc_ct.o bfa_hw_cb.o bfa_hw_ct.o
55
bfa-y += bfa_fcs.o bfa_fcs_lport.o bfa_fcs_rport.o bfa_fcs_fcpim.o bfa_fcbuild.o
6-
bfa-y += bfa_port.o bfa_fcpim.o bfa_core.o bfa_drv.o bfa_svc.o
6+
bfa-y += bfa_port.o bfa_fcpim.o bfa_core.o bfa_svc.o
77

88
ccflags-y := -DBFA_PERF_BUILD

‎drivers/scsi/bfa/bfa.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ void bfa_hwct_msix_getvecs(struct bfa_s *bfa, u32 *vecmap, u32 *nvecs,
331331
u32 *maxvec);
332332
void bfa_hwct_msix_get_rme_range(struct bfa_s *bfa, u32 *start,
333333
u32 *end);
334-
void bfa_com_port_attach(struct bfa_s *bfa, struct bfa_meminfo_s *mi);
335334
void bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t *wwns);
336335
wwn_t bfa_iocfc_get_pwwn(struct bfa_s *bfa);
337336
wwn_t bfa_iocfc_get_nwwn(struct bfa_s *bfa);

‎drivers/scsi/bfa/bfa_core.c‎

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,93 @@
2121

2222
BFA_TRC_FILE(HAL, CORE);
2323

24+
/*
25+
* BFA module list terminated by NULL
26+
*/
27+
static struct bfa_module_s *hal_mods[] = {
28+
&hal_mod_sgpg,
29+
&hal_mod_fcport,
30+
&hal_mod_fcxp,
31+
&hal_mod_lps,
32+
&hal_mod_uf,
33+
&hal_mod_rport,
34+
&hal_mod_fcpim,
35+
NULL
36+
};
37+
38+
/*
39+
* Message handlers for various modules.
40+
*/
41+
static bfa_isr_func_t bfa_isrs[BFI_MC_MAX] = {
42+
bfa_isr_unhandled, /* NONE */
43+
bfa_isr_unhandled, /* BFI_MC_IOC */
44+
bfa_isr_unhandled, /* BFI_MC_DIAG */
45+
bfa_isr_unhandled, /* BFI_MC_FLASH */
46+
bfa_isr_unhandled, /* BFI_MC_CEE */
47+
bfa_fcport_isr, /* BFI_MC_FCPORT */
48+
bfa_isr_unhandled, /* BFI_MC_IOCFC */
49+
bfa_isr_unhandled, /* BFI_MC_LL */
50+
bfa_uf_isr, /* BFI_MC_UF */
51+
bfa_fcxp_isr, /* BFI_MC_FCXP */
52+
bfa_lps_isr, /* BFI_MC_LPS */
53+
bfa_rport_isr, /* BFI_MC_RPORT */
54+
bfa_itnim_isr, /* BFI_MC_ITNIM */
55+
bfa_isr_unhandled, /* BFI_MC_IOIM_READ */
56+
bfa_isr_unhandled, /* BFI_MC_IOIM_WRITE */
57+
bfa_isr_unhandled, /* BFI_MC_IOIM_IO */
58+
bfa_ioim_isr, /* BFI_MC_IOIM */
59+
bfa_ioim_good_comp_isr, /* BFI_MC_IOIM_IOCOM */
60+
bfa_tskim_isr, /* BFI_MC_TSKIM */
61+
bfa_isr_unhandled, /* BFI_MC_SBOOT */
62+
bfa_isr_unhandled, /* BFI_MC_IPFC */
63+
bfa_isr_unhandled, /* BFI_MC_PORT */
64+
bfa_isr_unhandled, /* --------- */
65+
bfa_isr_unhandled, /* --------- */
66+
bfa_isr_unhandled, /* --------- */
67+
bfa_isr_unhandled, /* --------- */
68+
bfa_isr_unhandled, /* --------- */
69+
bfa_isr_unhandled, /* --------- */
70+
bfa_isr_unhandled, /* --------- */
71+
bfa_isr_unhandled, /* --------- */
72+
bfa_isr_unhandled, /* --------- */
73+
bfa_isr_unhandled, /* --------- */
74+
};
75+
/*
76+
* Message handlers for mailbox command classes
77+
*/
78+
static bfa_ioc_mbox_mcfunc_t bfa_mbox_isrs[BFI_MC_MAX] = {
79+
NULL,
80+
NULL, /* BFI_MC_IOC */
81+
NULL, /* BFI_MC_DIAG */
82+
NULL, /* BFI_MC_FLASH */
83+
NULL, /* BFI_MC_CEE */
84+
NULL, /* BFI_MC_PORT */
85+
bfa_iocfc_isr, /* BFI_MC_IOCFC */
86+
NULL,
87+
};
88+
89+
90+
91+
static void
92+
bfa_com_port_attach(struct bfa_s *bfa, struct bfa_meminfo_s *mi)
93+
{
94+
struct bfa_port_s *port = &bfa->modules.port;
95+
u32 dm_len;
96+
u8 *dm_kva;
97+
u64 dm_pa;
98+
99+
dm_len = bfa_port_meminfo();
100+
dm_kva = bfa_meminfo_dma_virt(mi);
101+
dm_pa = bfa_meminfo_dma_phys(mi);
102+
103+
memset(port, 0, sizeof(struct bfa_port_s));
104+
bfa_port_attach(port, &bfa->ioc, bfa, bfa->trcmod);
105+
bfa_port_mem_claim(port, dm_kva, dm_pa);
106+
107+
bfa_meminfo_dma_virt(mi) = dm_kva + dm_len;
108+
bfa_meminfo_dma_phys(mi) = dm_pa + dm_len;
109+
}
110+
24111
/*
25112
* BFA IOC FC related definitions
26113
*/

‎drivers/scsi/bfa/bfa_drv.c‎

Lines changed: 0 additions & 107 deletions
This file was deleted.

‎drivers/scsi/bfa/bfa_modules.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ struct bfa_module_s {
9999
void (*iocdisable) (struct bfa_s *bfa);
100100
};
101101

102-
extern struct bfa_module_s *hal_mods[];
103102

104103
struct bfa_s {
105104
void *bfad; /* BFA driver instance */
@@ -116,8 +115,6 @@ struct bfa_s {
116115
struct bfa_msix_s msix;
117116
};
118117

119-
extern bfa_isr_func_t bfa_isrs[BFI_MC_MAX];
120-
extern bfa_ioc_mbox_mcfunc_t bfa_mbox_isrs[];
121118
extern bfa_boolean_t bfa_auto_recover;
122119
extern struct bfa_module_s hal_mod_sgpg;
123120
extern struct bfa_module_s hal_mod_fcport;

0 commit comments

Comments
 (0)