hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/scsi/bfa/bfad_bsg.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
34 * Copyright (c) 2014- QLogic Corporation.
....@@ -5,15 +6,6 @@
56 * www.qlogic.com
67 *
78 * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter.
8
- *
9
- * This program is free software; you can redistribute it and/or modify it
10
- * under the terms of the GNU General Public License (GPL) Version 2 as
11
- * published by the Free Software Foundation
12
- *
13
- * This program is distributed in the hope that it will be useful, but
14
- * WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
- * General Public License for more details.
179 */
1810
1911 #include <linux/uaccess.h>
....@@ -23,7 +15,7 @@
2315
2416 BFA_TRC_FILE(LDRV, BSG);
2517
26
-int
18
+static int
2719 bfad_iocmd_ioc_enable(struct bfad_s *bfad, void *cmd)
2820 {
2921 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -46,7 +38,7 @@
4638 return 0;
4739 }
4840
49
-int
41
+static int
5042 bfad_iocmd_ioc_disable(struct bfad_s *bfad, void *cmd)
5143 {
5244 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -144,7 +136,7 @@
144136 return 0;
145137 }
146138
147
-int
139
+static int
148140 bfad_iocmd_ioc_get_stats(struct bfad_s *bfad, void *cmd)
149141 {
150142 struct bfa_bsg_ioc_stats_s *iocmd = (struct bfa_bsg_ioc_stats_s *)cmd;
....@@ -154,7 +146,7 @@
154146 return 0;
155147 }
156148
157
-int
149
+static int
158150 bfad_iocmd_ioc_get_fwstats(struct bfad_s *bfad, void *cmd,
159151 unsigned int payload_len)
160152 {
....@@ -184,7 +176,7 @@
184176 return 0;
185177 }
186178
187
-int
179
+static int
188180 bfad_iocmd_ioc_reset_stats(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
189181 {
190182 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -202,7 +194,7 @@
202194 return 0;
203195 }
204196
205
-int
197
+static int
206198 bfad_iocmd_ioc_set_name(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
207199 {
208200 struct bfa_bsg_ioc_name_s *iocmd = (struct bfa_bsg_ioc_name_s *) cmd;
....@@ -216,7 +208,7 @@
216208 return 0;
217209 }
218210
219
-int
211
+static int
220212 bfad_iocmd_iocfc_get_attr(struct bfad_s *bfad, void *cmd)
221213 {
222214 struct bfa_bsg_iocfc_attr_s *iocmd = (struct bfa_bsg_iocfc_attr_s *)cmd;
....@@ -227,7 +219,7 @@
227219 return 0;
228220 }
229221
230
-int
222
+static int
231223 bfad_iocmd_ioc_fw_sig_inv(struct bfad_s *bfad, void *cmd)
232224 {
233225 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -239,7 +231,7 @@
239231 return 0;
240232 }
241233
242
-int
234
+static int
243235 bfad_iocmd_iocfc_set_intr(struct bfad_s *bfad, void *cmd)
244236 {
245237 struct bfa_bsg_iocfc_intr_s *iocmd = (struct bfa_bsg_iocfc_intr_s *)cmd;
....@@ -252,7 +244,7 @@
252244 return 0;
253245 }
254246
255
-int
247
+static int
256248 bfad_iocmd_port_enable(struct bfad_s *bfad, void *cmd)
257249 {
258250 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -273,7 +265,7 @@
273265 return 0;
274266 }
275267
276
-int
268
+static int
277269 bfad_iocmd_port_disable(struct bfad_s *bfad, void *cmd)
278270 {
279271 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -323,7 +315,7 @@
323315 return 0;
324316 }
325317
326
-int
318
+static int
327319 bfad_iocmd_port_get_stats(struct bfad_s *bfad, void *cmd,
328320 unsigned int payload_len)
329321 {
....@@ -357,7 +349,7 @@
357349 return 0;
358350 }
359351
360
-int
352
+static int
361353 bfad_iocmd_port_reset_stats(struct bfad_s *bfad, void *cmd)
362354 {
363355 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -378,7 +370,7 @@
378370 return 0;
379371 }
380372
381
-int
373
+static int
382374 bfad_iocmd_set_port_cfg(struct bfad_s *bfad, void *iocmd, unsigned int v_cmd)
383375 {
384376 struct bfa_bsg_port_cfg_s *cmd = (struct bfa_bsg_port_cfg_s *)iocmd;
....@@ -398,7 +390,7 @@
398390 return 0;
399391 }
400392
401
-int
393
+static int
402394 bfad_iocmd_port_cfg_maxfrsize(struct bfad_s *bfad, void *cmd)
403395 {
404396 struct bfa_bsg_port_cfg_maxfrsize_s *iocmd =
....@@ -412,7 +404,7 @@
412404 return 0;
413405 }
414406
415
-int
407
+static int
416408 bfad_iocmd_port_cfg_bbcr(struct bfad_s *bfad, unsigned int cmd, void *pcmd)
417409 {
418410 struct bfa_bsg_bbcr_enable_s *iocmd =
....@@ -435,7 +427,7 @@
435427 return 0;
436428 }
437429
438
-int
430
+static int
439431 bfad_iocmd_port_get_bbcr_attr(struct bfad_s *bfad, void *pcmd)
440432 {
441433 struct bfa_bsg_bbcr_attr_s *iocmd = (struct bfa_bsg_bbcr_attr_s *) pcmd;
....@@ -473,7 +465,7 @@
473465 return 0;
474466 }
475467
476
-int
468
+static int
477469 bfad_iocmd_lport_get_stats(struct bfad_s *bfad, void *cmd)
478470 {
479471 struct bfa_fcs_lport_s *fcs_port;
....@@ -497,7 +489,7 @@
497489 return 0;
498490 }
499491
500
-int
492
+static int
501493 bfad_iocmd_lport_reset_stats(struct bfad_s *bfad, void *cmd)
502494 {
503495 struct bfa_fcs_lport_s *fcs_port;
....@@ -531,7 +523,7 @@
531523 return 0;
532524 }
533525
534
-int
526
+static int
535527 bfad_iocmd_lport_get_iostats(struct bfad_s *bfad, void *cmd)
536528 {
537529 struct bfa_fcs_lport_s *fcs_port;
....@@ -556,7 +548,7 @@
556548 return 0;
557549 }
558550
559
-int
551
+static int
560552 bfad_iocmd_lport_get_rports(struct bfad_s *bfad, void *cmd,
561553 unsigned int payload_len)
562554 {
....@@ -598,7 +590,7 @@
598590 return 0;
599591 }
600592
601
-int
593
+static int
602594 bfad_iocmd_rport_get_attr(struct bfad_s *bfad, void *cmd)
603595 {
604596 struct bfa_bsg_rport_attr_s *iocmd = (struct bfa_bsg_rport_attr_s *)cmd;
....@@ -684,7 +676,7 @@
684676 return 0;
685677 }
686678
687
-int
679
+static int
688680 bfad_iocmd_rport_get_stats(struct bfad_s *bfad, void *cmd)
689681 {
690682 struct bfa_bsg_rport_stats_s *iocmd =
....@@ -725,7 +717,7 @@
725717 return 0;
726718 }
727719
728
-int
720
+static int
729721 bfad_iocmd_rport_clr_stats(struct bfad_s *bfad, void *cmd)
730722 {
731723 struct bfa_bsg_rport_reset_stats_s *iocmd =
....@@ -761,7 +753,7 @@
761753 return 0;
762754 }
763755
764
-int
756
+static int
765757 bfad_iocmd_rport_set_speed(struct bfad_s *bfad, void *cmd)
766758 {
767759 struct bfa_bsg_rport_set_speed_s *iocmd =
....@@ -797,7 +789,7 @@
797789 return 0;
798790 }
799791
800
-int
792
+static int
801793 bfad_iocmd_vport_get_attr(struct bfad_s *bfad, void *cmd)
802794 {
803795 struct bfa_fcs_vport_s *fcs_vport;
....@@ -820,7 +812,7 @@
820812 return 0;
821813 }
822814
823
-int
815
+static int
824816 bfad_iocmd_vport_get_stats(struct bfad_s *bfad, void *cmd)
825817 {
826818 struct bfa_fcs_vport_s *fcs_vport;
....@@ -848,7 +840,7 @@
848840 return 0;
849841 }
850842
851
-int
843
+static int
852844 bfad_iocmd_vport_clr_stats(struct bfad_s *bfad, void *cmd)
853845 {
854846 struct bfa_fcs_vport_s *fcs_vport;
....@@ -915,7 +907,7 @@
915907 return 0;
916908 }
917909
918
-int
910
+static int
919911 bfad_iocmd_qos_set_bw(struct bfad_s *bfad, void *pcmd)
920912 {
921913 struct bfa_bsg_qos_bw_s *iocmd = (struct bfa_bsg_qos_bw_s *)pcmd;
....@@ -928,7 +920,7 @@
928920 return 0;
929921 }
930922
931
-int
923
+static int
932924 bfad_iocmd_ratelim(struct bfad_s *bfad, unsigned int cmd, void *pcmd)
933925 {
934926 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd;
....@@ -957,7 +949,7 @@
957949 return 0;
958950 }
959951
960
-int
952
+static int
961953 bfad_iocmd_ratelim_speed(struct bfad_s *bfad, unsigned int cmd, void *pcmd)
962954 {
963955 struct bfa_bsg_trl_speed_s *iocmd = (struct bfa_bsg_trl_speed_s *)pcmd;
....@@ -986,7 +978,7 @@
986978 return 0;
987979 }
988980
989
-int
981
+static int
990982 bfad_iocmd_cfg_fcpim(struct bfad_s *bfad, void *cmd)
991983 {
992984 struct bfa_bsg_fcpim_s *iocmd = (struct bfa_bsg_fcpim_s *)cmd;
....@@ -999,7 +991,7 @@
999991 return 0;
1000992 }
1001993
1002
-int
994
+static int
1003995 bfad_iocmd_fcpim_get_modstats(struct bfad_s *bfad, void *cmd)
1004996 {
1005997 struct bfa_bsg_fcpim_modstats_s *iocmd =
....@@ -1021,7 +1013,7 @@
10211013 return 0;
10221014 }
10231015
1024
-int
1016
+static int
10251017 bfad_iocmd_fcpim_clr_modstats(struct bfad_s *bfad, void *cmd)
10261018 {
10271019 struct bfa_bsg_fcpim_modstatsclr_s *iocmd =
....@@ -1043,7 +1035,7 @@
10431035 return 0;
10441036 }
10451037
1046
-int
1038
+static int
10471039 bfad_iocmd_fcpim_get_del_itn_stats(struct bfad_s *bfad, void *cmd)
10481040 {
10491041 struct bfa_bsg_fcpim_del_itn_stats_s *iocmd =
....@@ -1168,7 +1160,7 @@
11681160 return 0;
11691161 }
11701162
1171
-int
1163
+static int
11721164 bfad_iocmd_fcport_enable(struct bfad_s *bfad, void *cmd)
11731165 {
11741166 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -1181,7 +1173,7 @@
11811173 return 0;
11821174 }
11831175
1184
-int
1176
+static int
11851177 bfad_iocmd_fcport_disable(struct bfad_s *bfad, void *cmd)
11861178 {
11871179 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -1194,7 +1186,7 @@
11941186 return 0;
11951187 }
11961188
1197
-int
1189
+static int
11981190 bfad_iocmd_ioc_get_pcifn_cfg(struct bfad_s *bfad, void *cmd)
11991191 {
12001192 struct bfa_bsg_pcifn_cfg_s *iocmd = (struct bfa_bsg_pcifn_cfg_s *)cmd;
....@@ -1216,7 +1208,7 @@
12161208 return 0;
12171209 }
12181210
1219
-int
1211
+static int
12201212 bfad_iocmd_pcifn_create(struct bfad_s *bfad, void *cmd)
12211213 {
12221214 struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd;
....@@ -1239,7 +1231,7 @@
12391231 return 0;
12401232 }
12411233
1242
-int
1234
+static int
12431235 bfad_iocmd_pcifn_delete(struct bfad_s *bfad, void *cmd)
12441236 {
12451237 struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd;
....@@ -1261,7 +1253,7 @@
12611253 return 0;
12621254 }
12631255
1264
-int
1256
+static int
12651257 bfad_iocmd_pcifn_bw(struct bfad_s *bfad, void *cmd)
12661258 {
12671259 struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd;
....@@ -1285,7 +1277,7 @@
12851277 return 0;
12861278 }
12871279
1288
-int
1280
+static int
12891281 bfad_iocmd_adapter_cfg_mode(struct bfad_s *bfad, void *cmd)
12901282 {
12911283 struct bfa_bsg_adapter_cfg_mode_s *iocmd =
....@@ -1308,7 +1300,7 @@
13081300 return 0;
13091301 }
13101302
1311
-int
1303
+static int
13121304 bfad_iocmd_port_cfg_mode(struct bfad_s *bfad, void *cmd)
13131305 {
13141306 struct bfa_bsg_port_cfg_mode_s *iocmd =
....@@ -1332,7 +1324,7 @@
13321324 return 0;
13331325 }
13341326
1335
-int
1327
+static int
13361328 bfad_iocmd_ablk_optrom(struct bfad_s *bfad, unsigned int cmd, void *pcmd)
13371329 {
13381330 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd;
....@@ -1358,7 +1350,7 @@
13581350 return 0;
13591351 }
13601352
1361
-int
1353
+static int
13621354 bfad_iocmd_faa_query(struct bfad_s *bfad, void *cmd)
13631355 {
13641356 struct bfa_bsg_faa_attr_s *iocmd = (struct bfa_bsg_faa_attr_s *)cmd;
....@@ -1381,7 +1373,7 @@
13811373 return 0;
13821374 }
13831375
1384
-int
1376
+static int
13851377 bfad_iocmd_cee_attr(struct bfad_s *bfad, void *cmd, unsigned int payload_len)
13861378 {
13871379 struct bfa_bsg_cee_attr_s *iocmd =
....@@ -1417,7 +1409,7 @@
14171409 return 0;
14181410 }
14191411
1420
-int
1412
+static int
14211413 bfad_iocmd_cee_get_stats(struct bfad_s *bfad, void *cmd,
14221414 unsigned int payload_len)
14231415 {
....@@ -1454,7 +1446,7 @@
14541446 return 0;
14551447 }
14561448
1457
-int
1449
+static int
14581450 bfad_iocmd_cee_reset_stats(struct bfad_s *bfad, void *cmd)
14591451 {
14601452 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -1468,7 +1460,7 @@
14681460 return 0;
14691461 }
14701462
1471
-int
1463
+static int
14721464 bfad_iocmd_sfp_media(struct bfad_s *bfad, void *cmd)
14731465 {
14741466 struct bfa_bsg_sfp_media_s *iocmd = (struct bfa_bsg_sfp_media_s *)cmd;
....@@ -1490,7 +1482,7 @@
14901482 return 0;
14911483 }
14921484
1493
-int
1485
+static int
14941486 bfad_iocmd_sfp_speed(struct bfad_s *bfad, void *cmd)
14951487 {
14961488 struct bfa_bsg_sfp_speed_s *iocmd = (struct bfa_bsg_sfp_speed_s *)cmd;
....@@ -1511,7 +1503,7 @@
15111503 return 0;
15121504 }
15131505
1514
-int
1506
+static int
15151507 bfad_iocmd_flash_get_attr(struct bfad_s *bfad, void *cmd)
15161508 {
15171509 struct bfa_bsg_flash_attr_s *iocmd =
....@@ -1532,7 +1524,7 @@
15321524 return 0;
15331525 }
15341526
1535
-int
1527
+static int
15361528 bfad_iocmd_flash_erase_part(struct bfad_s *bfad, void *cmd)
15371529 {
15381530 struct bfa_bsg_flash_s *iocmd = (struct bfa_bsg_flash_s *)cmd;
....@@ -1552,7 +1544,7 @@
15521544 return 0;
15531545 }
15541546
1555
-int
1547
+static int
15561548 bfad_iocmd_flash_update_part(struct bfad_s *bfad, void *cmd,
15571549 unsigned int payload_len)
15581550 {
....@@ -1584,7 +1576,7 @@
15841576 return 0;
15851577 }
15861578
1587
-int
1579
+static int
15881580 bfad_iocmd_flash_read_part(struct bfad_s *bfad, void *cmd,
15891581 unsigned int payload_len)
15901582 {
....@@ -1616,7 +1608,7 @@
16161608 return 0;
16171609 }
16181610
1619
-int
1611
+static int
16201612 bfad_iocmd_diag_temp(struct bfad_s *bfad, void *cmd)
16211613 {
16221614 struct bfa_bsg_diag_get_temp_s *iocmd =
....@@ -1638,7 +1630,7 @@
16381630 return 0;
16391631 }
16401632
1641
-int
1633
+static int
16421634 bfad_iocmd_diag_memtest(struct bfad_s *bfad, void *cmd)
16431635 {
16441636 struct bfa_bsg_diag_memtest_s *iocmd =
....@@ -1661,7 +1653,7 @@
16611653 return 0;
16621654 }
16631655
1664
-int
1656
+static int
16651657 bfad_iocmd_diag_loopback(struct bfad_s *bfad, void *cmd)
16661658 {
16671659 struct bfa_bsg_diag_loopback_s *iocmd =
....@@ -1684,7 +1676,7 @@
16841676 return 0;
16851677 }
16861678
1687
-int
1679
+static int
16881680 bfad_iocmd_diag_fwping(struct bfad_s *bfad, void *cmd)
16891681 {
16901682 struct bfa_bsg_diag_fwping_s *iocmd =
....@@ -1708,7 +1700,7 @@
17081700 return 0;
17091701 }
17101702
1711
-int
1703
+static int
17121704 bfad_iocmd_diag_queuetest(struct bfad_s *bfad, void *cmd)
17131705 {
17141706 struct bfa_bsg_diag_qtest_s *iocmd = (struct bfa_bsg_diag_qtest_s *)cmd;
....@@ -1729,7 +1721,7 @@
17291721 return 0;
17301722 }
17311723
1732
-int
1724
+static int
17331725 bfad_iocmd_diag_sfp(struct bfad_s *bfad, void *cmd)
17341726 {
17351727 struct bfa_bsg_sfp_show_s *iocmd =
....@@ -1752,7 +1744,7 @@
17521744 return 0;
17531745 }
17541746
1755
-int
1747
+static int
17561748 bfad_iocmd_diag_led(struct bfad_s *bfad, void *cmd)
17571749 {
17581750 struct bfa_bsg_diag_led_s *iocmd = (struct bfa_bsg_diag_led_s *)cmd;
....@@ -1765,7 +1757,7 @@
17651757 return 0;
17661758 }
17671759
1768
-int
1760
+static int
17691761 bfad_iocmd_diag_beacon_lport(struct bfad_s *bfad, void *cmd)
17701762 {
17711763 struct bfa_bsg_diag_beacon_s *iocmd =
....@@ -1780,7 +1772,7 @@
17801772 return 0;
17811773 }
17821774
1783
-int
1775
+static int
17841776 bfad_iocmd_diag_lb_stat(struct bfad_s *bfad, void *cmd)
17851777 {
17861778 struct bfa_bsg_diag_lb_stat_s *iocmd =
....@@ -1795,7 +1787,7 @@
17951787 return 0;
17961788 }
17971789
1798
-int
1790
+static int
17991791 bfad_iocmd_diag_dport_enable(struct bfad_s *bfad, void *pcmd)
18001792 {
18011793 struct bfa_bsg_dport_enable_s *iocmd =
....@@ -1817,7 +1809,7 @@
18171809 return 0;
18181810 }
18191811
1820
-int
1812
+static int
18211813 bfad_iocmd_diag_dport_disable(struct bfad_s *bfad, void *pcmd)
18221814 {
18231815 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd;
....@@ -1837,7 +1829,7 @@
18371829 return 0;
18381830 }
18391831
1840
-int
1832
+static int
18411833 bfad_iocmd_diag_dport_start(struct bfad_s *bfad, void *pcmd)
18421834 {
18431835 struct bfa_bsg_dport_enable_s *iocmd =
....@@ -1862,7 +1854,7 @@
18621854 return 0;
18631855 }
18641856
1865
-int
1857
+static int
18661858 bfad_iocmd_diag_dport_show(struct bfad_s *bfad, void *pcmd)
18671859 {
18681860 struct bfa_bsg_diag_dport_show_s *iocmd =
....@@ -1877,7 +1869,7 @@
18771869 }
18781870
18791871
1880
-int
1872
+static int
18811873 bfad_iocmd_phy_get_attr(struct bfad_s *bfad, void *cmd)
18821874 {
18831875 struct bfa_bsg_phy_attr_s *iocmd =
....@@ -1898,7 +1890,7 @@
18981890 return 0;
18991891 }
19001892
1901
-int
1893
+static int
19021894 bfad_iocmd_phy_get_stats(struct bfad_s *bfad, void *cmd)
19031895 {
19041896 struct bfa_bsg_phy_stats_s *iocmd =
....@@ -1919,7 +1911,7 @@
19191911 return 0;
19201912 }
19211913
1922
-int
1914
+static int
19231915 bfad_iocmd_phy_read(struct bfad_s *bfad, void *cmd, unsigned int payload_len)
19241916 {
19251917 struct bfa_bsg_phy_s *iocmd = (struct bfa_bsg_phy_s *)cmd;
....@@ -1951,7 +1943,7 @@
19511943 return 0;
19521944 }
19531945
1954
-int
1946
+static int
19551947 bfad_iocmd_vhba_query(struct bfad_s *bfad, void *cmd)
19561948 {
19571949 struct bfa_bsg_vhba_attr_s *iocmd =
....@@ -1970,7 +1962,7 @@
19701962 return 0;
19711963 }
19721964
1973
-int
1965
+static int
19741966 bfad_iocmd_phy_update(struct bfad_s *bfad, void *cmd, unsigned int payload_len)
19751967 {
19761968 struct bfa_bsg_phy_s *iocmd = (struct bfa_bsg_phy_s *)cmd;
....@@ -2000,7 +1992,7 @@
20001992 return 0;
20011993 }
20021994
2003
-int
1995
+static int
20041996 bfad_iocmd_porglog_get(struct bfad_s *bfad, void *cmd)
20051997 {
20061998 struct bfa_bsg_debug_s *iocmd = (struct bfa_bsg_debug_s *)cmd;
....@@ -2020,7 +2012,7 @@
20202012 }
20212013
20222014 #define BFA_DEBUG_FW_CORE_CHUNK_SZ 0x4000U /* 16K chunks for FW dump */
2023
-int
2015
+static int
20242016 bfad_iocmd_debug_fw_core(struct bfad_s *bfad, void *cmd,
20252017 unsigned int payload_len)
20262018 {
....@@ -2054,7 +2046,7 @@
20542046 return 0;
20552047 }
20562048
2057
-int
2049
+static int
20582050 bfad_iocmd_debug_ctl(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
20592051 {
20602052 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -2075,7 +2067,7 @@
20752067 return 0;
20762068 }
20772069
2078
-int
2070
+static int
20792071 bfad_iocmd_porglog_ctl(struct bfad_s *bfad, void *cmd)
20802072 {
20812073 struct bfa_bsg_portlogctl_s *iocmd = (struct bfa_bsg_portlogctl_s *)cmd;
....@@ -2089,7 +2081,7 @@
20892081 return 0;
20902082 }
20912083
2092
-int
2084
+static int
20932085 bfad_iocmd_fcpim_cfg_profile(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
20942086 {
20952087 struct bfa_bsg_fcpim_profile_s *iocmd =
....@@ -2133,7 +2125,7 @@
21332125 return 0;
21342126 }
21352127
2136
-int
2128
+static int
21372129 bfad_iocmd_fcport_get_stats(struct bfad_s *bfad, void *cmd)
21382130 {
21392131 struct bfa_bsg_fcport_stats_s *iocmd =
....@@ -2158,7 +2150,7 @@
21582150 return 0;
21592151 }
21602152
2161
-int
2153
+static int
21622154 bfad_iocmd_fcport_reset_stats(struct bfad_s *bfad, void *cmd)
21632155 {
21642156 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -2182,7 +2174,7 @@
21822174 return 0;
21832175 }
21842176
2185
-int
2177
+static int
21862178 bfad_iocmd_boot_cfg(struct bfad_s *bfad, void *cmd)
21872179 {
21882180 struct bfa_bsg_boot_s *iocmd = (struct bfa_bsg_boot_s *)cmd;
....@@ -2204,7 +2196,7 @@
22042196 return 0;
22052197 }
22062198
2207
-int
2199
+static int
22082200 bfad_iocmd_boot_query(struct bfad_s *bfad, void *cmd)
22092201 {
22102202 struct bfa_bsg_boot_s *iocmd = (struct bfa_bsg_boot_s *)cmd;
....@@ -2226,7 +2218,7 @@
22262218 return 0;
22272219 }
22282220
2229
-int
2221
+static int
22302222 bfad_iocmd_preboot_query(struct bfad_s *bfad, void *cmd)
22312223 {
22322224 struct bfa_bsg_preboot_s *iocmd = (struct bfa_bsg_preboot_s *)cmd;
....@@ -2245,7 +2237,7 @@
22452237 return 0;
22462238 }
22472239
2248
-int
2240
+static int
22492241 bfad_iocmd_ethboot_cfg(struct bfad_s *bfad, void *cmd)
22502242 {
22512243 struct bfa_bsg_ethboot_s *iocmd = (struct bfa_bsg_ethboot_s *)cmd;
....@@ -2268,7 +2260,7 @@
22682260 return 0;
22692261 }
22702262
2271
-int
2263
+static int
22722264 bfad_iocmd_ethboot_query(struct bfad_s *bfad, void *cmd)
22732265 {
22742266 struct bfa_bsg_ethboot_s *iocmd = (struct bfa_bsg_ethboot_s *)cmd;
....@@ -2291,7 +2283,7 @@
22912283 return 0;
22922284 }
22932285
2294
-int
2286
+static int
22952287 bfad_iocmd_cfg_trunk(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
22962288 {
22972289 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -2331,7 +2323,7 @@
23312323 return 0;
23322324 }
23332325
2334
-int
2326
+static int
23352327 bfad_iocmd_trunk_get_attr(struct bfad_s *bfad, void *cmd)
23362328 {
23372329 struct bfa_bsg_trunk_attr_s *iocmd = (struct bfa_bsg_trunk_attr_s *)cmd;
....@@ -2354,7 +2346,7 @@
23542346 return 0;
23552347 }
23562348
2357
-int
2349
+static int
23582350 bfad_iocmd_qos(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
23592351 {
23602352 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -2382,7 +2374,7 @@
23822374 return 0;
23832375 }
23842376
2385
-int
2377
+static int
23862378 bfad_iocmd_qos_get_attr(struct bfad_s *bfad, void *cmd)
23872379 {
23882380 struct bfa_bsg_qos_attr_s *iocmd = (struct bfa_bsg_qos_attr_s *)cmd;
....@@ -2408,7 +2400,7 @@
24082400 return 0;
24092401 }
24102402
2411
-int
2403
+static int
24122404 bfad_iocmd_qos_get_vc_attr(struct bfad_s *bfad, void *cmd)
24132405 {
24142406 struct bfa_bsg_qos_vc_attr_s *iocmd =
....@@ -2440,7 +2432,7 @@
24402432 return 0;
24412433 }
24422434
2443
-int
2435
+static int
24442436 bfad_iocmd_qos_get_stats(struct bfad_s *bfad, void *cmd)
24452437 {
24462438 struct bfa_bsg_fcport_stats_s *iocmd =
....@@ -2472,7 +2464,7 @@
24722464 return 0;
24732465 }
24742466
2475
-int
2467
+static int
24762468 bfad_iocmd_qos_reset_stats(struct bfad_s *bfad, void *cmd)
24772469 {
24782470 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
....@@ -2503,7 +2495,7 @@
25032495 return 0;
25042496 }
25052497
2506
-int
2498
+static int
25072499 bfad_iocmd_vf_get_stats(struct bfad_s *bfad, void *cmd)
25082500 {
25092501 struct bfa_bsg_vf_stats_s *iocmd =
....@@ -2526,7 +2518,7 @@
25262518 return 0;
25272519 }
25282520
2529
-int
2521
+static int
25302522 bfad_iocmd_vf_clr_stats(struct bfad_s *bfad, void *cmd)
25312523 {
25322524 struct bfa_bsg_vf_reset_stats_s *iocmd =
....@@ -2563,7 +2555,7 @@
25632555 bfad_reset_sdev_bflags(vport->drv_port.im_port, lunmask_cfg);
25642556 }
25652557
2566
-int
2558
+static int
25672559 bfad_iocmd_lunmask(struct bfad_s *bfad, void *pcmd, unsigned int v_cmd)
25682560 {
25692561 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd;
....@@ -2586,7 +2578,7 @@
25862578 return 0;
25872579 }
25882580
2589
-int
2581
+static int
25902582 bfad_iocmd_fcpim_lunmask_query(struct bfad_s *bfad, void *cmd)
25912583 {
25922584 struct bfa_bsg_fcpim_lunmask_query_s *iocmd =
....@@ -2600,7 +2592,7 @@
26002592 return 0;
26012593 }
26022594
2603
-int
2595
+static int
26042596 bfad_iocmd_fcpim_cfg_lunmask(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
26052597 {
26062598 struct bfa_bsg_fcpim_lunmask_s *iocmd =
....@@ -2619,7 +2611,7 @@
26192611 return 0;
26202612 }
26212613
2622
-int
2614
+static int
26232615 bfad_iocmd_fcpim_throttle_query(struct bfad_s *bfad, void *cmd)
26242616 {
26252617 struct bfa_bsg_fcpim_throttle_s *iocmd =
....@@ -2634,7 +2626,7 @@
26342626 return 0;
26352627 }
26362628
2637
-int
2629
+static int
26382630 bfad_iocmd_fcpim_throttle_set(struct bfad_s *bfad, void *cmd)
26392631 {
26402632 struct bfa_bsg_fcpim_throttle_s *iocmd =
....@@ -2649,7 +2641,7 @@
26492641 return 0;
26502642 }
26512643
2652
-int
2644
+static int
26532645 bfad_iocmd_tfru_read(struct bfad_s *bfad, void *cmd)
26542646 {
26552647 struct bfa_bsg_tfru_s *iocmd =
....@@ -2671,7 +2663,7 @@
26712663 return 0;
26722664 }
26732665
2674
-int
2666
+static int
26752667 bfad_iocmd_tfru_write(struct bfad_s *bfad, void *cmd)
26762668 {
26772669 struct bfa_bsg_tfru_s *iocmd =
....@@ -2693,7 +2685,7 @@
26932685 return 0;
26942686 }
26952687
2696
-int
2688
+static int
26972689 bfad_iocmd_fruvpd_read(struct bfad_s *bfad, void *cmd)
26982690 {
26992691 struct bfa_bsg_fruvpd_s *iocmd =
....@@ -2715,7 +2707,7 @@
27152707 return 0;
27162708 }
27172709
2718
-int
2710
+static int
27192711 bfad_iocmd_fruvpd_update(struct bfad_s *bfad, void *cmd)
27202712 {
27212713 struct bfa_bsg_fruvpd_s *iocmd =
....@@ -2737,7 +2729,7 @@
27372729 return 0;
27382730 }
27392731
2740
-int
2732
+static int
27412733 bfad_iocmd_fruvpd_get_max_size(struct bfad_s *bfad, void *cmd)
27422734 {
27432735 struct bfa_bsg_fruvpd_max_size_s *iocmd =
....@@ -3185,7 +3177,7 @@
31853177 }
31863178
31873179 /* FC passthru call backs */
3188
-u64
3180
+static u64
31893181 bfad_fcxp_get_req_sgaddr_cb(void *bfad_fcxp, int sgeid)
31903182 {
31913183 struct bfad_fcxp *drv_fcxp = bfad_fcxp;
....@@ -3197,7 +3189,7 @@
31973189 return addr;
31983190 }
31993191
3200
-u32
3192
+static u32
32013193 bfad_fcxp_get_req_sglen_cb(void *bfad_fcxp, int sgeid)
32023194 {
32033195 struct bfad_fcxp *drv_fcxp = bfad_fcxp;
....@@ -3207,7 +3199,7 @@
32073199 return sge->sg_len;
32083200 }
32093201
3210
-u64
3202
+static u64
32113203 bfad_fcxp_get_rsp_sgaddr_cb(void *bfad_fcxp, int sgeid)
32123204 {
32133205 struct bfad_fcxp *drv_fcxp = bfad_fcxp;
....@@ -3219,7 +3211,7 @@
32193211 return addr;
32203212 }
32213213
3222
-u32
3214
+static u32
32233215 bfad_fcxp_get_rsp_sglen_cb(void *bfad_fcxp, int sgeid)
32243216 {
32253217 struct bfad_fcxp *drv_fcxp = bfad_fcxp;
....@@ -3229,7 +3221,7 @@
32293221 return sge->sg_len;
32303222 }
32313223
3232
-void
3224
+static void
32333225 bfad_send_fcpt_cb(void *bfad_fcxp, struct bfa_fcxp_s *fcxp, void *cbarg,
32343226 bfa_status_t req_status, u32 rsp_len, u32 resid_len,
32353227 struct fchs_s *rsp_fchs)
....@@ -3244,7 +3236,7 @@
32443236 complete(&drv_fcxp->comp);
32453237 }
32463238
3247
-struct bfad_buf_info *
3239
+static struct bfad_buf_info *
32483240 bfad_fcxp_map_sg(struct bfad_s *bfad, void *payload_kbuf,
32493241 uint32_t payload_len, uint32_t *num_sgles)
32503242 {
....@@ -3264,9 +3256,9 @@
32643256 /* Allocate dma coherent memory */
32653257 buf_info = buf_base;
32663258 buf_info->size = payload_len;
3267
- buf_info->virt = dma_zalloc_coherent(&bfad->pcidev->dev,
3268
- buf_info->size, &buf_info->phys,
3269
- GFP_KERNEL);
3259
+ buf_info->virt = dma_alloc_coherent(&bfad->pcidev->dev,
3260
+ buf_info->size, &buf_info->phys,
3261
+ GFP_KERNEL);
32703262 if (!buf_info->virt)
32713263 goto out_free_mem;
32723264
....@@ -3288,7 +3280,7 @@
32883280 return NULL;
32893281 }
32903282
3291
-void
3283
+static void
32923284 bfad_fcxp_free_mem(struct bfad_s *bfad, struct bfad_buf_info *buf_base,
32933285 uint32_t num_sgles)
32943286 {
....@@ -3306,7 +3298,7 @@
33063298 }
33073299 }
33083300
3309
-int
3301
+static int
33103302 bfad_fcxp_bsg_send(struct bsg_job *job, struct bfad_fcxp *drv_fcxp,
33113303 bfa_bsg_fcpt_t *bsg_fcpt)
33123304 {
....@@ -3346,7 +3338,7 @@
33463338 return BFA_STATUS_OK;
33473339 }
33483340
3349
-int
3341
+static int
33503342 bfad_im_bsg_els_ct_request(struct bsg_job *job)
33513343 {
33523344 struct bfa_bsg_data *bsg_data;