| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2005-2014 Brocade Communications Systems, Inc. |
|---|
| 3 | 4 | * Copyright (c) 2014- QLogic Corporation. |
|---|
| .. | .. |
|---|
| 5 | 6 | * www.qlogic.com |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * 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. |
|---|
| 17 | 9 | */ |
|---|
| 18 | 10 | |
|---|
| 19 | 11 | #include <linux/uaccess.h> |
|---|
| .. | .. |
|---|
| 23 | 15 | |
|---|
| 24 | 16 | BFA_TRC_FILE(LDRV, BSG); |
|---|
| 25 | 17 | |
|---|
| 26 | | -int |
|---|
| 18 | +static int |
|---|
| 27 | 19 | bfad_iocmd_ioc_enable(struct bfad_s *bfad, void *cmd) |
|---|
| 28 | 20 | { |
|---|
| 29 | 21 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 46 | 38 | return 0; |
|---|
| 47 | 39 | } |
|---|
| 48 | 40 | |
|---|
| 49 | | -int |
|---|
| 41 | +static int |
|---|
| 50 | 42 | bfad_iocmd_ioc_disable(struct bfad_s *bfad, void *cmd) |
|---|
| 51 | 43 | { |
|---|
| 52 | 44 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 144 | 136 | return 0; |
|---|
| 145 | 137 | } |
|---|
| 146 | 138 | |
|---|
| 147 | | -int |
|---|
| 139 | +static int |
|---|
| 148 | 140 | bfad_iocmd_ioc_get_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 149 | 141 | { |
|---|
| 150 | 142 | struct bfa_bsg_ioc_stats_s *iocmd = (struct bfa_bsg_ioc_stats_s *)cmd; |
|---|
| .. | .. |
|---|
| 154 | 146 | return 0; |
|---|
| 155 | 147 | } |
|---|
| 156 | 148 | |
|---|
| 157 | | -int |
|---|
| 149 | +static int |
|---|
| 158 | 150 | bfad_iocmd_ioc_get_fwstats(struct bfad_s *bfad, void *cmd, |
|---|
| 159 | 151 | unsigned int payload_len) |
|---|
| 160 | 152 | { |
|---|
| .. | .. |
|---|
| 184 | 176 | return 0; |
|---|
| 185 | 177 | } |
|---|
| 186 | 178 | |
|---|
| 187 | | -int |
|---|
| 179 | +static int |
|---|
| 188 | 180 | bfad_iocmd_ioc_reset_stats(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
|---|
| 189 | 181 | { |
|---|
| 190 | 182 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 202 | 194 | return 0; |
|---|
| 203 | 195 | } |
|---|
| 204 | 196 | |
|---|
| 205 | | -int |
|---|
| 197 | +static int |
|---|
| 206 | 198 | bfad_iocmd_ioc_set_name(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
|---|
| 207 | 199 | { |
|---|
| 208 | 200 | struct bfa_bsg_ioc_name_s *iocmd = (struct bfa_bsg_ioc_name_s *) cmd; |
|---|
| .. | .. |
|---|
| 216 | 208 | return 0; |
|---|
| 217 | 209 | } |
|---|
| 218 | 210 | |
|---|
| 219 | | -int |
|---|
| 211 | +static int |
|---|
| 220 | 212 | bfad_iocmd_iocfc_get_attr(struct bfad_s *bfad, void *cmd) |
|---|
| 221 | 213 | { |
|---|
| 222 | 214 | struct bfa_bsg_iocfc_attr_s *iocmd = (struct bfa_bsg_iocfc_attr_s *)cmd; |
|---|
| .. | .. |
|---|
| 227 | 219 | return 0; |
|---|
| 228 | 220 | } |
|---|
| 229 | 221 | |
|---|
| 230 | | -int |
|---|
| 222 | +static int |
|---|
| 231 | 223 | bfad_iocmd_ioc_fw_sig_inv(struct bfad_s *bfad, void *cmd) |
|---|
| 232 | 224 | { |
|---|
| 233 | 225 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 239 | 231 | return 0; |
|---|
| 240 | 232 | } |
|---|
| 241 | 233 | |
|---|
| 242 | | -int |
|---|
| 234 | +static int |
|---|
| 243 | 235 | bfad_iocmd_iocfc_set_intr(struct bfad_s *bfad, void *cmd) |
|---|
| 244 | 236 | { |
|---|
| 245 | 237 | struct bfa_bsg_iocfc_intr_s *iocmd = (struct bfa_bsg_iocfc_intr_s *)cmd; |
|---|
| .. | .. |
|---|
| 252 | 244 | return 0; |
|---|
| 253 | 245 | } |
|---|
| 254 | 246 | |
|---|
| 255 | | -int |
|---|
| 247 | +static int |
|---|
| 256 | 248 | bfad_iocmd_port_enable(struct bfad_s *bfad, void *cmd) |
|---|
| 257 | 249 | { |
|---|
| 258 | 250 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 273 | 265 | return 0; |
|---|
| 274 | 266 | } |
|---|
| 275 | 267 | |
|---|
| 276 | | -int |
|---|
| 268 | +static int |
|---|
| 277 | 269 | bfad_iocmd_port_disable(struct bfad_s *bfad, void *cmd) |
|---|
| 278 | 270 | { |
|---|
| 279 | 271 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 323 | 315 | return 0; |
|---|
| 324 | 316 | } |
|---|
| 325 | 317 | |
|---|
| 326 | | -int |
|---|
| 318 | +static int |
|---|
| 327 | 319 | bfad_iocmd_port_get_stats(struct bfad_s *bfad, void *cmd, |
|---|
| 328 | 320 | unsigned int payload_len) |
|---|
| 329 | 321 | { |
|---|
| .. | .. |
|---|
| 357 | 349 | return 0; |
|---|
| 358 | 350 | } |
|---|
| 359 | 351 | |
|---|
| 360 | | -int |
|---|
| 352 | +static int |
|---|
| 361 | 353 | bfad_iocmd_port_reset_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 362 | 354 | { |
|---|
| 363 | 355 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 378 | 370 | return 0; |
|---|
| 379 | 371 | } |
|---|
| 380 | 372 | |
|---|
| 381 | | -int |
|---|
| 373 | +static int |
|---|
| 382 | 374 | bfad_iocmd_set_port_cfg(struct bfad_s *bfad, void *iocmd, unsigned int v_cmd) |
|---|
| 383 | 375 | { |
|---|
| 384 | 376 | struct bfa_bsg_port_cfg_s *cmd = (struct bfa_bsg_port_cfg_s *)iocmd; |
|---|
| .. | .. |
|---|
| 398 | 390 | return 0; |
|---|
| 399 | 391 | } |
|---|
| 400 | 392 | |
|---|
| 401 | | -int |
|---|
| 393 | +static int |
|---|
| 402 | 394 | bfad_iocmd_port_cfg_maxfrsize(struct bfad_s *bfad, void *cmd) |
|---|
| 403 | 395 | { |
|---|
| 404 | 396 | struct bfa_bsg_port_cfg_maxfrsize_s *iocmd = |
|---|
| .. | .. |
|---|
| 412 | 404 | return 0; |
|---|
| 413 | 405 | } |
|---|
| 414 | 406 | |
|---|
| 415 | | -int |
|---|
| 407 | +static int |
|---|
| 416 | 408 | bfad_iocmd_port_cfg_bbcr(struct bfad_s *bfad, unsigned int cmd, void *pcmd) |
|---|
| 417 | 409 | { |
|---|
| 418 | 410 | struct bfa_bsg_bbcr_enable_s *iocmd = |
|---|
| .. | .. |
|---|
| 435 | 427 | return 0; |
|---|
| 436 | 428 | } |
|---|
| 437 | 429 | |
|---|
| 438 | | -int |
|---|
| 430 | +static int |
|---|
| 439 | 431 | bfad_iocmd_port_get_bbcr_attr(struct bfad_s *bfad, void *pcmd) |
|---|
| 440 | 432 | { |
|---|
| 441 | 433 | struct bfa_bsg_bbcr_attr_s *iocmd = (struct bfa_bsg_bbcr_attr_s *) pcmd; |
|---|
| .. | .. |
|---|
| 473 | 465 | return 0; |
|---|
| 474 | 466 | } |
|---|
| 475 | 467 | |
|---|
| 476 | | -int |
|---|
| 468 | +static int |
|---|
| 477 | 469 | bfad_iocmd_lport_get_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 478 | 470 | { |
|---|
| 479 | 471 | struct bfa_fcs_lport_s *fcs_port; |
|---|
| .. | .. |
|---|
| 497 | 489 | return 0; |
|---|
| 498 | 490 | } |
|---|
| 499 | 491 | |
|---|
| 500 | | -int |
|---|
| 492 | +static int |
|---|
| 501 | 493 | bfad_iocmd_lport_reset_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 502 | 494 | { |
|---|
| 503 | 495 | struct bfa_fcs_lport_s *fcs_port; |
|---|
| .. | .. |
|---|
| 531 | 523 | return 0; |
|---|
| 532 | 524 | } |
|---|
| 533 | 525 | |
|---|
| 534 | | -int |
|---|
| 526 | +static int |
|---|
| 535 | 527 | bfad_iocmd_lport_get_iostats(struct bfad_s *bfad, void *cmd) |
|---|
| 536 | 528 | { |
|---|
| 537 | 529 | struct bfa_fcs_lport_s *fcs_port; |
|---|
| .. | .. |
|---|
| 556 | 548 | return 0; |
|---|
| 557 | 549 | } |
|---|
| 558 | 550 | |
|---|
| 559 | | -int |
|---|
| 551 | +static int |
|---|
| 560 | 552 | bfad_iocmd_lport_get_rports(struct bfad_s *bfad, void *cmd, |
|---|
| 561 | 553 | unsigned int payload_len) |
|---|
| 562 | 554 | { |
|---|
| .. | .. |
|---|
| 598 | 590 | return 0; |
|---|
| 599 | 591 | } |
|---|
| 600 | 592 | |
|---|
| 601 | | -int |
|---|
| 593 | +static int |
|---|
| 602 | 594 | bfad_iocmd_rport_get_attr(struct bfad_s *bfad, void *cmd) |
|---|
| 603 | 595 | { |
|---|
| 604 | 596 | struct bfa_bsg_rport_attr_s *iocmd = (struct bfa_bsg_rport_attr_s *)cmd; |
|---|
| .. | .. |
|---|
| 684 | 676 | return 0; |
|---|
| 685 | 677 | } |
|---|
| 686 | 678 | |
|---|
| 687 | | -int |
|---|
| 679 | +static int |
|---|
| 688 | 680 | bfad_iocmd_rport_get_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 689 | 681 | { |
|---|
| 690 | 682 | struct bfa_bsg_rport_stats_s *iocmd = |
|---|
| .. | .. |
|---|
| 725 | 717 | return 0; |
|---|
| 726 | 718 | } |
|---|
| 727 | 719 | |
|---|
| 728 | | -int |
|---|
| 720 | +static int |
|---|
| 729 | 721 | bfad_iocmd_rport_clr_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 730 | 722 | { |
|---|
| 731 | 723 | struct bfa_bsg_rport_reset_stats_s *iocmd = |
|---|
| .. | .. |
|---|
| 761 | 753 | return 0; |
|---|
| 762 | 754 | } |
|---|
| 763 | 755 | |
|---|
| 764 | | -int |
|---|
| 756 | +static int |
|---|
| 765 | 757 | bfad_iocmd_rport_set_speed(struct bfad_s *bfad, void *cmd) |
|---|
| 766 | 758 | { |
|---|
| 767 | 759 | struct bfa_bsg_rport_set_speed_s *iocmd = |
|---|
| .. | .. |
|---|
| 797 | 789 | return 0; |
|---|
| 798 | 790 | } |
|---|
| 799 | 791 | |
|---|
| 800 | | -int |
|---|
| 792 | +static int |
|---|
| 801 | 793 | bfad_iocmd_vport_get_attr(struct bfad_s *bfad, void *cmd) |
|---|
| 802 | 794 | { |
|---|
| 803 | 795 | struct bfa_fcs_vport_s *fcs_vport; |
|---|
| .. | .. |
|---|
| 820 | 812 | return 0; |
|---|
| 821 | 813 | } |
|---|
| 822 | 814 | |
|---|
| 823 | | -int |
|---|
| 815 | +static int |
|---|
| 824 | 816 | bfad_iocmd_vport_get_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 825 | 817 | { |
|---|
| 826 | 818 | struct bfa_fcs_vport_s *fcs_vport; |
|---|
| .. | .. |
|---|
| 848 | 840 | return 0; |
|---|
| 849 | 841 | } |
|---|
| 850 | 842 | |
|---|
| 851 | | -int |
|---|
| 843 | +static int |
|---|
| 852 | 844 | bfad_iocmd_vport_clr_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 853 | 845 | { |
|---|
| 854 | 846 | struct bfa_fcs_vport_s *fcs_vport; |
|---|
| .. | .. |
|---|
| 915 | 907 | return 0; |
|---|
| 916 | 908 | } |
|---|
| 917 | 909 | |
|---|
| 918 | | -int |
|---|
| 910 | +static int |
|---|
| 919 | 911 | bfad_iocmd_qos_set_bw(struct bfad_s *bfad, void *pcmd) |
|---|
| 920 | 912 | { |
|---|
| 921 | 913 | struct bfa_bsg_qos_bw_s *iocmd = (struct bfa_bsg_qos_bw_s *)pcmd; |
|---|
| .. | .. |
|---|
| 928 | 920 | return 0; |
|---|
| 929 | 921 | } |
|---|
| 930 | 922 | |
|---|
| 931 | | -int |
|---|
| 923 | +static int |
|---|
| 932 | 924 | bfad_iocmd_ratelim(struct bfad_s *bfad, unsigned int cmd, void *pcmd) |
|---|
| 933 | 925 | { |
|---|
| 934 | 926 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; |
|---|
| .. | .. |
|---|
| 957 | 949 | return 0; |
|---|
| 958 | 950 | } |
|---|
| 959 | 951 | |
|---|
| 960 | | -int |
|---|
| 952 | +static int |
|---|
| 961 | 953 | bfad_iocmd_ratelim_speed(struct bfad_s *bfad, unsigned int cmd, void *pcmd) |
|---|
| 962 | 954 | { |
|---|
| 963 | 955 | struct bfa_bsg_trl_speed_s *iocmd = (struct bfa_bsg_trl_speed_s *)pcmd; |
|---|
| .. | .. |
|---|
| 986 | 978 | return 0; |
|---|
| 987 | 979 | } |
|---|
| 988 | 980 | |
|---|
| 989 | | -int |
|---|
| 981 | +static int |
|---|
| 990 | 982 | bfad_iocmd_cfg_fcpim(struct bfad_s *bfad, void *cmd) |
|---|
| 991 | 983 | { |
|---|
| 992 | 984 | struct bfa_bsg_fcpim_s *iocmd = (struct bfa_bsg_fcpim_s *)cmd; |
|---|
| .. | .. |
|---|
| 999 | 991 | return 0; |
|---|
| 1000 | 992 | } |
|---|
| 1001 | 993 | |
|---|
| 1002 | | -int |
|---|
| 994 | +static int |
|---|
| 1003 | 995 | bfad_iocmd_fcpim_get_modstats(struct bfad_s *bfad, void *cmd) |
|---|
| 1004 | 996 | { |
|---|
| 1005 | 997 | struct bfa_bsg_fcpim_modstats_s *iocmd = |
|---|
| .. | .. |
|---|
| 1021 | 1013 | return 0; |
|---|
| 1022 | 1014 | } |
|---|
| 1023 | 1015 | |
|---|
| 1024 | | -int |
|---|
| 1016 | +static int |
|---|
| 1025 | 1017 | bfad_iocmd_fcpim_clr_modstats(struct bfad_s *bfad, void *cmd) |
|---|
| 1026 | 1018 | { |
|---|
| 1027 | 1019 | struct bfa_bsg_fcpim_modstatsclr_s *iocmd = |
|---|
| .. | .. |
|---|
| 1043 | 1035 | return 0; |
|---|
| 1044 | 1036 | } |
|---|
| 1045 | 1037 | |
|---|
| 1046 | | -int |
|---|
| 1038 | +static int |
|---|
| 1047 | 1039 | bfad_iocmd_fcpim_get_del_itn_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 1048 | 1040 | { |
|---|
| 1049 | 1041 | struct bfa_bsg_fcpim_del_itn_stats_s *iocmd = |
|---|
| .. | .. |
|---|
| 1168 | 1160 | return 0; |
|---|
| 1169 | 1161 | } |
|---|
| 1170 | 1162 | |
|---|
| 1171 | | -int |
|---|
| 1163 | +static int |
|---|
| 1172 | 1164 | bfad_iocmd_fcport_enable(struct bfad_s *bfad, void *cmd) |
|---|
| 1173 | 1165 | { |
|---|
| 1174 | 1166 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 1181 | 1173 | return 0; |
|---|
| 1182 | 1174 | } |
|---|
| 1183 | 1175 | |
|---|
| 1184 | | -int |
|---|
| 1176 | +static int |
|---|
| 1185 | 1177 | bfad_iocmd_fcport_disable(struct bfad_s *bfad, void *cmd) |
|---|
| 1186 | 1178 | { |
|---|
| 1187 | 1179 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 1194 | 1186 | return 0; |
|---|
| 1195 | 1187 | } |
|---|
| 1196 | 1188 | |
|---|
| 1197 | | -int |
|---|
| 1189 | +static int |
|---|
| 1198 | 1190 | bfad_iocmd_ioc_get_pcifn_cfg(struct bfad_s *bfad, void *cmd) |
|---|
| 1199 | 1191 | { |
|---|
| 1200 | 1192 | struct bfa_bsg_pcifn_cfg_s *iocmd = (struct bfa_bsg_pcifn_cfg_s *)cmd; |
|---|
| .. | .. |
|---|
| 1216 | 1208 | return 0; |
|---|
| 1217 | 1209 | } |
|---|
| 1218 | 1210 | |
|---|
| 1219 | | -int |
|---|
| 1211 | +static int |
|---|
| 1220 | 1212 | bfad_iocmd_pcifn_create(struct bfad_s *bfad, void *cmd) |
|---|
| 1221 | 1213 | { |
|---|
| 1222 | 1214 | struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd; |
|---|
| .. | .. |
|---|
| 1239 | 1231 | return 0; |
|---|
| 1240 | 1232 | } |
|---|
| 1241 | 1233 | |
|---|
| 1242 | | -int |
|---|
| 1234 | +static int |
|---|
| 1243 | 1235 | bfad_iocmd_pcifn_delete(struct bfad_s *bfad, void *cmd) |
|---|
| 1244 | 1236 | { |
|---|
| 1245 | 1237 | struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd; |
|---|
| .. | .. |
|---|
| 1261 | 1253 | return 0; |
|---|
| 1262 | 1254 | } |
|---|
| 1263 | 1255 | |
|---|
| 1264 | | -int |
|---|
| 1256 | +static int |
|---|
| 1265 | 1257 | bfad_iocmd_pcifn_bw(struct bfad_s *bfad, void *cmd) |
|---|
| 1266 | 1258 | { |
|---|
| 1267 | 1259 | struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd; |
|---|
| .. | .. |
|---|
| 1285 | 1277 | return 0; |
|---|
| 1286 | 1278 | } |
|---|
| 1287 | 1279 | |
|---|
| 1288 | | -int |
|---|
| 1280 | +static int |
|---|
| 1289 | 1281 | bfad_iocmd_adapter_cfg_mode(struct bfad_s *bfad, void *cmd) |
|---|
| 1290 | 1282 | { |
|---|
| 1291 | 1283 | struct bfa_bsg_adapter_cfg_mode_s *iocmd = |
|---|
| .. | .. |
|---|
| 1308 | 1300 | return 0; |
|---|
| 1309 | 1301 | } |
|---|
| 1310 | 1302 | |
|---|
| 1311 | | -int |
|---|
| 1303 | +static int |
|---|
| 1312 | 1304 | bfad_iocmd_port_cfg_mode(struct bfad_s *bfad, void *cmd) |
|---|
| 1313 | 1305 | { |
|---|
| 1314 | 1306 | struct bfa_bsg_port_cfg_mode_s *iocmd = |
|---|
| .. | .. |
|---|
| 1332 | 1324 | return 0; |
|---|
| 1333 | 1325 | } |
|---|
| 1334 | 1326 | |
|---|
| 1335 | | -int |
|---|
| 1327 | +static int |
|---|
| 1336 | 1328 | bfad_iocmd_ablk_optrom(struct bfad_s *bfad, unsigned int cmd, void *pcmd) |
|---|
| 1337 | 1329 | { |
|---|
| 1338 | 1330 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; |
|---|
| .. | .. |
|---|
| 1358 | 1350 | return 0; |
|---|
| 1359 | 1351 | } |
|---|
| 1360 | 1352 | |
|---|
| 1361 | | -int |
|---|
| 1353 | +static int |
|---|
| 1362 | 1354 | bfad_iocmd_faa_query(struct bfad_s *bfad, void *cmd) |
|---|
| 1363 | 1355 | { |
|---|
| 1364 | 1356 | struct bfa_bsg_faa_attr_s *iocmd = (struct bfa_bsg_faa_attr_s *)cmd; |
|---|
| .. | .. |
|---|
| 1381 | 1373 | return 0; |
|---|
| 1382 | 1374 | } |
|---|
| 1383 | 1375 | |
|---|
| 1384 | | -int |
|---|
| 1376 | +static int |
|---|
| 1385 | 1377 | bfad_iocmd_cee_attr(struct bfad_s *bfad, void *cmd, unsigned int payload_len) |
|---|
| 1386 | 1378 | { |
|---|
| 1387 | 1379 | struct bfa_bsg_cee_attr_s *iocmd = |
|---|
| .. | .. |
|---|
| 1417 | 1409 | return 0; |
|---|
| 1418 | 1410 | } |
|---|
| 1419 | 1411 | |
|---|
| 1420 | | -int |
|---|
| 1412 | +static int |
|---|
| 1421 | 1413 | bfad_iocmd_cee_get_stats(struct bfad_s *bfad, void *cmd, |
|---|
| 1422 | 1414 | unsigned int payload_len) |
|---|
| 1423 | 1415 | { |
|---|
| .. | .. |
|---|
| 1454 | 1446 | return 0; |
|---|
| 1455 | 1447 | } |
|---|
| 1456 | 1448 | |
|---|
| 1457 | | -int |
|---|
| 1449 | +static int |
|---|
| 1458 | 1450 | bfad_iocmd_cee_reset_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 1459 | 1451 | { |
|---|
| 1460 | 1452 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 1468 | 1460 | return 0; |
|---|
| 1469 | 1461 | } |
|---|
| 1470 | 1462 | |
|---|
| 1471 | | -int |
|---|
| 1463 | +static int |
|---|
| 1472 | 1464 | bfad_iocmd_sfp_media(struct bfad_s *bfad, void *cmd) |
|---|
| 1473 | 1465 | { |
|---|
| 1474 | 1466 | struct bfa_bsg_sfp_media_s *iocmd = (struct bfa_bsg_sfp_media_s *)cmd; |
|---|
| .. | .. |
|---|
| 1490 | 1482 | return 0; |
|---|
| 1491 | 1483 | } |
|---|
| 1492 | 1484 | |
|---|
| 1493 | | -int |
|---|
| 1485 | +static int |
|---|
| 1494 | 1486 | bfad_iocmd_sfp_speed(struct bfad_s *bfad, void *cmd) |
|---|
| 1495 | 1487 | { |
|---|
| 1496 | 1488 | struct bfa_bsg_sfp_speed_s *iocmd = (struct bfa_bsg_sfp_speed_s *)cmd; |
|---|
| .. | .. |
|---|
| 1511 | 1503 | return 0; |
|---|
| 1512 | 1504 | } |
|---|
| 1513 | 1505 | |
|---|
| 1514 | | -int |
|---|
| 1506 | +static int |
|---|
| 1515 | 1507 | bfad_iocmd_flash_get_attr(struct bfad_s *bfad, void *cmd) |
|---|
| 1516 | 1508 | { |
|---|
| 1517 | 1509 | struct bfa_bsg_flash_attr_s *iocmd = |
|---|
| .. | .. |
|---|
| 1532 | 1524 | return 0; |
|---|
| 1533 | 1525 | } |
|---|
| 1534 | 1526 | |
|---|
| 1535 | | -int |
|---|
| 1527 | +static int |
|---|
| 1536 | 1528 | bfad_iocmd_flash_erase_part(struct bfad_s *bfad, void *cmd) |
|---|
| 1537 | 1529 | { |
|---|
| 1538 | 1530 | struct bfa_bsg_flash_s *iocmd = (struct bfa_bsg_flash_s *)cmd; |
|---|
| .. | .. |
|---|
| 1552 | 1544 | return 0; |
|---|
| 1553 | 1545 | } |
|---|
| 1554 | 1546 | |
|---|
| 1555 | | -int |
|---|
| 1547 | +static int |
|---|
| 1556 | 1548 | bfad_iocmd_flash_update_part(struct bfad_s *bfad, void *cmd, |
|---|
| 1557 | 1549 | unsigned int payload_len) |
|---|
| 1558 | 1550 | { |
|---|
| .. | .. |
|---|
| 1584 | 1576 | return 0; |
|---|
| 1585 | 1577 | } |
|---|
| 1586 | 1578 | |
|---|
| 1587 | | -int |
|---|
| 1579 | +static int |
|---|
| 1588 | 1580 | bfad_iocmd_flash_read_part(struct bfad_s *bfad, void *cmd, |
|---|
| 1589 | 1581 | unsigned int payload_len) |
|---|
| 1590 | 1582 | { |
|---|
| .. | .. |
|---|
| 1616 | 1608 | return 0; |
|---|
| 1617 | 1609 | } |
|---|
| 1618 | 1610 | |
|---|
| 1619 | | -int |
|---|
| 1611 | +static int |
|---|
| 1620 | 1612 | bfad_iocmd_diag_temp(struct bfad_s *bfad, void *cmd) |
|---|
| 1621 | 1613 | { |
|---|
| 1622 | 1614 | struct bfa_bsg_diag_get_temp_s *iocmd = |
|---|
| .. | .. |
|---|
| 1638 | 1630 | return 0; |
|---|
| 1639 | 1631 | } |
|---|
| 1640 | 1632 | |
|---|
| 1641 | | -int |
|---|
| 1633 | +static int |
|---|
| 1642 | 1634 | bfad_iocmd_diag_memtest(struct bfad_s *bfad, void *cmd) |
|---|
| 1643 | 1635 | { |
|---|
| 1644 | 1636 | struct bfa_bsg_diag_memtest_s *iocmd = |
|---|
| .. | .. |
|---|
| 1661 | 1653 | return 0; |
|---|
| 1662 | 1654 | } |
|---|
| 1663 | 1655 | |
|---|
| 1664 | | -int |
|---|
| 1656 | +static int |
|---|
| 1665 | 1657 | bfad_iocmd_diag_loopback(struct bfad_s *bfad, void *cmd) |
|---|
| 1666 | 1658 | { |
|---|
| 1667 | 1659 | struct bfa_bsg_diag_loopback_s *iocmd = |
|---|
| .. | .. |
|---|
| 1684 | 1676 | return 0; |
|---|
| 1685 | 1677 | } |
|---|
| 1686 | 1678 | |
|---|
| 1687 | | -int |
|---|
| 1679 | +static int |
|---|
| 1688 | 1680 | bfad_iocmd_diag_fwping(struct bfad_s *bfad, void *cmd) |
|---|
| 1689 | 1681 | { |
|---|
| 1690 | 1682 | struct bfa_bsg_diag_fwping_s *iocmd = |
|---|
| .. | .. |
|---|
| 1708 | 1700 | return 0; |
|---|
| 1709 | 1701 | } |
|---|
| 1710 | 1702 | |
|---|
| 1711 | | -int |
|---|
| 1703 | +static int |
|---|
| 1712 | 1704 | bfad_iocmd_diag_queuetest(struct bfad_s *bfad, void *cmd) |
|---|
| 1713 | 1705 | { |
|---|
| 1714 | 1706 | struct bfa_bsg_diag_qtest_s *iocmd = (struct bfa_bsg_diag_qtest_s *)cmd; |
|---|
| .. | .. |
|---|
| 1729 | 1721 | return 0; |
|---|
| 1730 | 1722 | } |
|---|
| 1731 | 1723 | |
|---|
| 1732 | | -int |
|---|
| 1724 | +static int |
|---|
| 1733 | 1725 | bfad_iocmd_diag_sfp(struct bfad_s *bfad, void *cmd) |
|---|
| 1734 | 1726 | { |
|---|
| 1735 | 1727 | struct bfa_bsg_sfp_show_s *iocmd = |
|---|
| .. | .. |
|---|
| 1752 | 1744 | return 0; |
|---|
| 1753 | 1745 | } |
|---|
| 1754 | 1746 | |
|---|
| 1755 | | -int |
|---|
| 1747 | +static int |
|---|
| 1756 | 1748 | bfad_iocmd_diag_led(struct bfad_s *bfad, void *cmd) |
|---|
| 1757 | 1749 | { |
|---|
| 1758 | 1750 | struct bfa_bsg_diag_led_s *iocmd = (struct bfa_bsg_diag_led_s *)cmd; |
|---|
| .. | .. |
|---|
| 1765 | 1757 | return 0; |
|---|
| 1766 | 1758 | } |
|---|
| 1767 | 1759 | |
|---|
| 1768 | | -int |
|---|
| 1760 | +static int |
|---|
| 1769 | 1761 | bfad_iocmd_diag_beacon_lport(struct bfad_s *bfad, void *cmd) |
|---|
| 1770 | 1762 | { |
|---|
| 1771 | 1763 | struct bfa_bsg_diag_beacon_s *iocmd = |
|---|
| .. | .. |
|---|
| 1780 | 1772 | return 0; |
|---|
| 1781 | 1773 | } |
|---|
| 1782 | 1774 | |
|---|
| 1783 | | -int |
|---|
| 1775 | +static int |
|---|
| 1784 | 1776 | bfad_iocmd_diag_lb_stat(struct bfad_s *bfad, void *cmd) |
|---|
| 1785 | 1777 | { |
|---|
| 1786 | 1778 | struct bfa_bsg_diag_lb_stat_s *iocmd = |
|---|
| .. | .. |
|---|
| 1795 | 1787 | return 0; |
|---|
| 1796 | 1788 | } |
|---|
| 1797 | 1789 | |
|---|
| 1798 | | -int |
|---|
| 1790 | +static int |
|---|
| 1799 | 1791 | bfad_iocmd_diag_dport_enable(struct bfad_s *bfad, void *pcmd) |
|---|
| 1800 | 1792 | { |
|---|
| 1801 | 1793 | struct bfa_bsg_dport_enable_s *iocmd = |
|---|
| .. | .. |
|---|
| 1817 | 1809 | return 0; |
|---|
| 1818 | 1810 | } |
|---|
| 1819 | 1811 | |
|---|
| 1820 | | -int |
|---|
| 1812 | +static int |
|---|
| 1821 | 1813 | bfad_iocmd_diag_dport_disable(struct bfad_s *bfad, void *pcmd) |
|---|
| 1822 | 1814 | { |
|---|
| 1823 | 1815 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; |
|---|
| .. | .. |
|---|
| 1837 | 1829 | return 0; |
|---|
| 1838 | 1830 | } |
|---|
| 1839 | 1831 | |
|---|
| 1840 | | -int |
|---|
| 1832 | +static int |
|---|
| 1841 | 1833 | bfad_iocmd_diag_dport_start(struct bfad_s *bfad, void *pcmd) |
|---|
| 1842 | 1834 | { |
|---|
| 1843 | 1835 | struct bfa_bsg_dport_enable_s *iocmd = |
|---|
| .. | .. |
|---|
| 1862 | 1854 | return 0; |
|---|
| 1863 | 1855 | } |
|---|
| 1864 | 1856 | |
|---|
| 1865 | | -int |
|---|
| 1857 | +static int |
|---|
| 1866 | 1858 | bfad_iocmd_diag_dport_show(struct bfad_s *bfad, void *pcmd) |
|---|
| 1867 | 1859 | { |
|---|
| 1868 | 1860 | struct bfa_bsg_diag_dport_show_s *iocmd = |
|---|
| .. | .. |
|---|
| 1877 | 1869 | } |
|---|
| 1878 | 1870 | |
|---|
| 1879 | 1871 | |
|---|
| 1880 | | -int |
|---|
| 1872 | +static int |
|---|
| 1881 | 1873 | bfad_iocmd_phy_get_attr(struct bfad_s *bfad, void *cmd) |
|---|
| 1882 | 1874 | { |
|---|
| 1883 | 1875 | struct bfa_bsg_phy_attr_s *iocmd = |
|---|
| .. | .. |
|---|
| 1898 | 1890 | return 0; |
|---|
| 1899 | 1891 | } |
|---|
| 1900 | 1892 | |
|---|
| 1901 | | -int |
|---|
| 1893 | +static int |
|---|
| 1902 | 1894 | bfad_iocmd_phy_get_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 1903 | 1895 | { |
|---|
| 1904 | 1896 | struct bfa_bsg_phy_stats_s *iocmd = |
|---|
| .. | .. |
|---|
| 1919 | 1911 | return 0; |
|---|
| 1920 | 1912 | } |
|---|
| 1921 | 1913 | |
|---|
| 1922 | | -int |
|---|
| 1914 | +static int |
|---|
| 1923 | 1915 | bfad_iocmd_phy_read(struct bfad_s *bfad, void *cmd, unsigned int payload_len) |
|---|
| 1924 | 1916 | { |
|---|
| 1925 | 1917 | struct bfa_bsg_phy_s *iocmd = (struct bfa_bsg_phy_s *)cmd; |
|---|
| .. | .. |
|---|
| 1951 | 1943 | return 0; |
|---|
| 1952 | 1944 | } |
|---|
| 1953 | 1945 | |
|---|
| 1954 | | -int |
|---|
| 1946 | +static int |
|---|
| 1955 | 1947 | bfad_iocmd_vhba_query(struct bfad_s *bfad, void *cmd) |
|---|
| 1956 | 1948 | { |
|---|
| 1957 | 1949 | struct bfa_bsg_vhba_attr_s *iocmd = |
|---|
| .. | .. |
|---|
| 1970 | 1962 | return 0; |
|---|
| 1971 | 1963 | } |
|---|
| 1972 | 1964 | |
|---|
| 1973 | | -int |
|---|
| 1965 | +static int |
|---|
| 1974 | 1966 | bfad_iocmd_phy_update(struct bfad_s *bfad, void *cmd, unsigned int payload_len) |
|---|
| 1975 | 1967 | { |
|---|
| 1976 | 1968 | struct bfa_bsg_phy_s *iocmd = (struct bfa_bsg_phy_s *)cmd; |
|---|
| .. | .. |
|---|
| 2000 | 1992 | return 0; |
|---|
| 2001 | 1993 | } |
|---|
| 2002 | 1994 | |
|---|
| 2003 | | -int |
|---|
| 1995 | +static int |
|---|
| 2004 | 1996 | bfad_iocmd_porglog_get(struct bfad_s *bfad, void *cmd) |
|---|
| 2005 | 1997 | { |
|---|
| 2006 | 1998 | struct bfa_bsg_debug_s *iocmd = (struct bfa_bsg_debug_s *)cmd; |
|---|
| .. | .. |
|---|
| 2020 | 2012 | } |
|---|
| 2021 | 2013 | |
|---|
| 2022 | 2014 | #define BFA_DEBUG_FW_CORE_CHUNK_SZ 0x4000U /* 16K chunks for FW dump */ |
|---|
| 2023 | | -int |
|---|
| 2015 | +static int |
|---|
| 2024 | 2016 | bfad_iocmd_debug_fw_core(struct bfad_s *bfad, void *cmd, |
|---|
| 2025 | 2017 | unsigned int payload_len) |
|---|
| 2026 | 2018 | { |
|---|
| .. | .. |
|---|
| 2054 | 2046 | return 0; |
|---|
| 2055 | 2047 | } |
|---|
| 2056 | 2048 | |
|---|
| 2057 | | -int |
|---|
| 2049 | +static int |
|---|
| 2058 | 2050 | bfad_iocmd_debug_ctl(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
|---|
| 2059 | 2051 | { |
|---|
| 2060 | 2052 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 2075 | 2067 | return 0; |
|---|
| 2076 | 2068 | } |
|---|
| 2077 | 2069 | |
|---|
| 2078 | | -int |
|---|
| 2070 | +static int |
|---|
| 2079 | 2071 | bfad_iocmd_porglog_ctl(struct bfad_s *bfad, void *cmd) |
|---|
| 2080 | 2072 | { |
|---|
| 2081 | 2073 | struct bfa_bsg_portlogctl_s *iocmd = (struct bfa_bsg_portlogctl_s *)cmd; |
|---|
| .. | .. |
|---|
| 2089 | 2081 | return 0; |
|---|
| 2090 | 2082 | } |
|---|
| 2091 | 2083 | |
|---|
| 2092 | | -int |
|---|
| 2084 | +static int |
|---|
| 2093 | 2085 | bfad_iocmd_fcpim_cfg_profile(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
|---|
| 2094 | 2086 | { |
|---|
| 2095 | 2087 | struct bfa_bsg_fcpim_profile_s *iocmd = |
|---|
| .. | .. |
|---|
| 2133 | 2125 | return 0; |
|---|
| 2134 | 2126 | } |
|---|
| 2135 | 2127 | |
|---|
| 2136 | | -int |
|---|
| 2128 | +static int |
|---|
| 2137 | 2129 | bfad_iocmd_fcport_get_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 2138 | 2130 | { |
|---|
| 2139 | 2131 | struct bfa_bsg_fcport_stats_s *iocmd = |
|---|
| .. | .. |
|---|
| 2158 | 2150 | return 0; |
|---|
| 2159 | 2151 | } |
|---|
| 2160 | 2152 | |
|---|
| 2161 | | -int |
|---|
| 2153 | +static int |
|---|
| 2162 | 2154 | bfad_iocmd_fcport_reset_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 2163 | 2155 | { |
|---|
| 2164 | 2156 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 2182 | 2174 | return 0; |
|---|
| 2183 | 2175 | } |
|---|
| 2184 | 2176 | |
|---|
| 2185 | | -int |
|---|
| 2177 | +static int |
|---|
| 2186 | 2178 | bfad_iocmd_boot_cfg(struct bfad_s *bfad, void *cmd) |
|---|
| 2187 | 2179 | { |
|---|
| 2188 | 2180 | struct bfa_bsg_boot_s *iocmd = (struct bfa_bsg_boot_s *)cmd; |
|---|
| .. | .. |
|---|
| 2204 | 2196 | return 0; |
|---|
| 2205 | 2197 | } |
|---|
| 2206 | 2198 | |
|---|
| 2207 | | -int |
|---|
| 2199 | +static int |
|---|
| 2208 | 2200 | bfad_iocmd_boot_query(struct bfad_s *bfad, void *cmd) |
|---|
| 2209 | 2201 | { |
|---|
| 2210 | 2202 | struct bfa_bsg_boot_s *iocmd = (struct bfa_bsg_boot_s *)cmd; |
|---|
| .. | .. |
|---|
| 2226 | 2218 | return 0; |
|---|
| 2227 | 2219 | } |
|---|
| 2228 | 2220 | |
|---|
| 2229 | | -int |
|---|
| 2221 | +static int |
|---|
| 2230 | 2222 | bfad_iocmd_preboot_query(struct bfad_s *bfad, void *cmd) |
|---|
| 2231 | 2223 | { |
|---|
| 2232 | 2224 | struct bfa_bsg_preboot_s *iocmd = (struct bfa_bsg_preboot_s *)cmd; |
|---|
| .. | .. |
|---|
| 2245 | 2237 | return 0; |
|---|
| 2246 | 2238 | } |
|---|
| 2247 | 2239 | |
|---|
| 2248 | | -int |
|---|
| 2240 | +static int |
|---|
| 2249 | 2241 | bfad_iocmd_ethboot_cfg(struct bfad_s *bfad, void *cmd) |
|---|
| 2250 | 2242 | { |
|---|
| 2251 | 2243 | struct bfa_bsg_ethboot_s *iocmd = (struct bfa_bsg_ethboot_s *)cmd; |
|---|
| .. | .. |
|---|
| 2268 | 2260 | return 0; |
|---|
| 2269 | 2261 | } |
|---|
| 2270 | 2262 | |
|---|
| 2271 | | -int |
|---|
| 2263 | +static int |
|---|
| 2272 | 2264 | bfad_iocmd_ethboot_query(struct bfad_s *bfad, void *cmd) |
|---|
| 2273 | 2265 | { |
|---|
| 2274 | 2266 | struct bfa_bsg_ethboot_s *iocmd = (struct bfa_bsg_ethboot_s *)cmd; |
|---|
| .. | .. |
|---|
| 2291 | 2283 | return 0; |
|---|
| 2292 | 2284 | } |
|---|
| 2293 | 2285 | |
|---|
| 2294 | | -int |
|---|
| 2286 | +static int |
|---|
| 2295 | 2287 | bfad_iocmd_cfg_trunk(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
|---|
| 2296 | 2288 | { |
|---|
| 2297 | 2289 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 2331 | 2323 | return 0; |
|---|
| 2332 | 2324 | } |
|---|
| 2333 | 2325 | |
|---|
| 2334 | | -int |
|---|
| 2326 | +static int |
|---|
| 2335 | 2327 | bfad_iocmd_trunk_get_attr(struct bfad_s *bfad, void *cmd) |
|---|
| 2336 | 2328 | { |
|---|
| 2337 | 2329 | struct bfa_bsg_trunk_attr_s *iocmd = (struct bfa_bsg_trunk_attr_s *)cmd; |
|---|
| .. | .. |
|---|
| 2354 | 2346 | return 0; |
|---|
| 2355 | 2347 | } |
|---|
| 2356 | 2348 | |
|---|
| 2357 | | -int |
|---|
| 2349 | +static int |
|---|
| 2358 | 2350 | bfad_iocmd_qos(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
|---|
| 2359 | 2351 | { |
|---|
| 2360 | 2352 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 2382 | 2374 | return 0; |
|---|
| 2383 | 2375 | } |
|---|
| 2384 | 2376 | |
|---|
| 2385 | | -int |
|---|
| 2377 | +static int |
|---|
| 2386 | 2378 | bfad_iocmd_qos_get_attr(struct bfad_s *bfad, void *cmd) |
|---|
| 2387 | 2379 | { |
|---|
| 2388 | 2380 | struct bfa_bsg_qos_attr_s *iocmd = (struct bfa_bsg_qos_attr_s *)cmd; |
|---|
| .. | .. |
|---|
| 2408 | 2400 | return 0; |
|---|
| 2409 | 2401 | } |
|---|
| 2410 | 2402 | |
|---|
| 2411 | | -int |
|---|
| 2403 | +static int |
|---|
| 2412 | 2404 | bfad_iocmd_qos_get_vc_attr(struct bfad_s *bfad, void *cmd) |
|---|
| 2413 | 2405 | { |
|---|
| 2414 | 2406 | struct bfa_bsg_qos_vc_attr_s *iocmd = |
|---|
| .. | .. |
|---|
| 2440 | 2432 | return 0; |
|---|
| 2441 | 2433 | } |
|---|
| 2442 | 2434 | |
|---|
| 2443 | | -int |
|---|
| 2435 | +static int |
|---|
| 2444 | 2436 | bfad_iocmd_qos_get_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 2445 | 2437 | { |
|---|
| 2446 | 2438 | struct bfa_bsg_fcport_stats_s *iocmd = |
|---|
| .. | .. |
|---|
| 2472 | 2464 | return 0; |
|---|
| 2473 | 2465 | } |
|---|
| 2474 | 2466 | |
|---|
| 2475 | | -int |
|---|
| 2467 | +static int |
|---|
| 2476 | 2468 | bfad_iocmd_qos_reset_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 2477 | 2469 | { |
|---|
| 2478 | 2470 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
|---|
| .. | .. |
|---|
| 2503 | 2495 | return 0; |
|---|
| 2504 | 2496 | } |
|---|
| 2505 | 2497 | |
|---|
| 2506 | | -int |
|---|
| 2498 | +static int |
|---|
| 2507 | 2499 | bfad_iocmd_vf_get_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 2508 | 2500 | { |
|---|
| 2509 | 2501 | struct bfa_bsg_vf_stats_s *iocmd = |
|---|
| .. | .. |
|---|
| 2526 | 2518 | return 0; |
|---|
| 2527 | 2519 | } |
|---|
| 2528 | 2520 | |
|---|
| 2529 | | -int |
|---|
| 2521 | +static int |
|---|
| 2530 | 2522 | bfad_iocmd_vf_clr_stats(struct bfad_s *bfad, void *cmd) |
|---|
| 2531 | 2523 | { |
|---|
| 2532 | 2524 | struct bfa_bsg_vf_reset_stats_s *iocmd = |
|---|
| .. | .. |
|---|
| 2563 | 2555 | bfad_reset_sdev_bflags(vport->drv_port.im_port, lunmask_cfg); |
|---|
| 2564 | 2556 | } |
|---|
| 2565 | 2557 | |
|---|
| 2566 | | -int |
|---|
| 2558 | +static int |
|---|
| 2567 | 2559 | bfad_iocmd_lunmask(struct bfad_s *bfad, void *pcmd, unsigned int v_cmd) |
|---|
| 2568 | 2560 | { |
|---|
| 2569 | 2561 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; |
|---|
| .. | .. |
|---|
| 2586 | 2578 | return 0; |
|---|
| 2587 | 2579 | } |
|---|
| 2588 | 2580 | |
|---|
| 2589 | | -int |
|---|
| 2581 | +static int |
|---|
| 2590 | 2582 | bfad_iocmd_fcpim_lunmask_query(struct bfad_s *bfad, void *cmd) |
|---|
| 2591 | 2583 | { |
|---|
| 2592 | 2584 | struct bfa_bsg_fcpim_lunmask_query_s *iocmd = |
|---|
| .. | .. |
|---|
| 2600 | 2592 | return 0; |
|---|
| 2601 | 2593 | } |
|---|
| 2602 | 2594 | |
|---|
| 2603 | | -int |
|---|
| 2595 | +static int |
|---|
| 2604 | 2596 | bfad_iocmd_fcpim_cfg_lunmask(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
|---|
| 2605 | 2597 | { |
|---|
| 2606 | 2598 | struct bfa_bsg_fcpim_lunmask_s *iocmd = |
|---|
| .. | .. |
|---|
| 2619 | 2611 | return 0; |
|---|
| 2620 | 2612 | } |
|---|
| 2621 | 2613 | |
|---|
| 2622 | | -int |
|---|
| 2614 | +static int |
|---|
| 2623 | 2615 | bfad_iocmd_fcpim_throttle_query(struct bfad_s *bfad, void *cmd) |
|---|
| 2624 | 2616 | { |
|---|
| 2625 | 2617 | struct bfa_bsg_fcpim_throttle_s *iocmd = |
|---|
| .. | .. |
|---|
| 2634 | 2626 | return 0; |
|---|
| 2635 | 2627 | } |
|---|
| 2636 | 2628 | |
|---|
| 2637 | | -int |
|---|
| 2629 | +static int |
|---|
| 2638 | 2630 | bfad_iocmd_fcpim_throttle_set(struct bfad_s *bfad, void *cmd) |
|---|
| 2639 | 2631 | { |
|---|
| 2640 | 2632 | struct bfa_bsg_fcpim_throttle_s *iocmd = |
|---|
| .. | .. |
|---|
| 2649 | 2641 | return 0; |
|---|
| 2650 | 2642 | } |
|---|
| 2651 | 2643 | |
|---|
| 2652 | | -int |
|---|
| 2644 | +static int |
|---|
| 2653 | 2645 | bfad_iocmd_tfru_read(struct bfad_s *bfad, void *cmd) |
|---|
| 2654 | 2646 | { |
|---|
| 2655 | 2647 | struct bfa_bsg_tfru_s *iocmd = |
|---|
| .. | .. |
|---|
| 2671 | 2663 | return 0; |
|---|
| 2672 | 2664 | } |
|---|
| 2673 | 2665 | |
|---|
| 2674 | | -int |
|---|
| 2666 | +static int |
|---|
| 2675 | 2667 | bfad_iocmd_tfru_write(struct bfad_s *bfad, void *cmd) |
|---|
| 2676 | 2668 | { |
|---|
| 2677 | 2669 | struct bfa_bsg_tfru_s *iocmd = |
|---|
| .. | .. |
|---|
| 2693 | 2685 | return 0; |
|---|
| 2694 | 2686 | } |
|---|
| 2695 | 2687 | |
|---|
| 2696 | | -int |
|---|
| 2688 | +static int |
|---|
| 2697 | 2689 | bfad_iocmd_fruvpd_read(struct bfad_s *bfad, void *cmd) |
|---|
| 2698 | 2690 | { |
|---|
| 2699 | 2691 | struct bfa_bsg_fruvpd_s *iocmd = |
|---|
| .. | .. |
|---|
| 2715 | 2707 | return 0; |
|---|
| 2716 | 2708 | } |
|---|
| 2717 | 2709 | |
|---|
| 2718 | | -int |
|---|
| 2710 | +static int |
|---|
| 2719 | 2711 | bfad_iocmd_fruvpd_update(struct bfad_s *bfad, void *cmd) |
|---|
| 2720 | 2712 | { |
|---|
| 2721 | 2713 | struct bfa_bsg_fruvpd_s *iocmd = |
|---|
| .. | .. |
|---|
| 2737 | 2729 | return 0; |
|---|
| 2738 | 2730 | } |
|---|
| 2739 | 2731 | |
|---|
| 2740 | | -int |
|---|
| 2732 | +static int |
|---|
| 2741 | 2733 | bfad_iocmd_fruvpd_get_max_size(struct bfad_s *bfad, void *cmd) |
|---|
| 2742 | 2734 | { |
|---|
| 2743 | 2735 | struct bfa_bsg_fruvpd_max_size_s *iocmd = |
|---|
| .. | .. |
|---|
| 3185 | 3177 | } |
|---|
| 3186 | 3178 | |
|---|
| 3187 | 3179 | /* FC passthru call backs */ |
|---|
| 3188 | | -u64 |
|---|
| 3180 | +static u64 |
|---|
| 3189 | 3181 | bfad_fcxp_get_req_sgaddr_cb(void *bfad_fcxp, int sgeid) |
|---|
| 3190 | 3182 | { |
|---|
| 3191 | 3183 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; |
|---|
| .. | .. |
|---|
| 3197 | 3189 | return addr; |
|---|
| 3198 | 3190 | } |
|---|
| 3199 | 3191 | |
|---|
| 3200 | | -u32 |
|---|
| 3192 | +static u32 |
|---|
| 3201 | 3193 | bfad_fcxp_get_req_sglen_cb(void *bfad_fcxp, int sgeid) |
|---|
| 3202 | 3194 | { |
|---|
| 3203 | 3195 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; |
|---|
| .. | .. |
|---|
| 3207 | 3199 | return sge->sg_len; |
|---|
| 3208 | 3200 | } |
|---|
| 3209 | 3201 | |
|---|
| 3210 | | -u64 |
|---|
| 3202 | +static u64 |
|---|
| 3211 | 3203 | bfad_fcxp_get_rsp_sgaddr_cb(void *bfad_fcxp, int sgeid) |
|---|
| 3212 | 3204 | { |
|---|
| 3213 | 3205 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; |
|---|
| .. | .. |
|---|
| 3219 | 3211 | return addr; |
|---|
| 3220 | 3212 | } |
|---|
| 3221 | 3213 | |
|---|
| 3222 | | -u32 |
|---|
| 3214 | +static u32 |
|---|
| 3223 | 3215 | bfad_fcxp_get_rsp_sglen_cb(void *bfad_fcxp, int sgeid) |
|---|
| 3224 | 3216 | { |
|---|
| 3225 | 3217 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; |
|---|
| .. | .. |
|---|
| 3229 | 3221 | return sge->sg_len; |
|---|
| 3230 | 3222 | } |
|---|
| 3231 | 3223 | |
|---|
| 3232 | | -void |
|---|
| 3224 | +static void |
|---|
| 3233 | 3225 | bfad_send_fcpt_cb(void *bfad_fcxp, struct bfa_fcxp_s *fcxp, void *cbarg, |
|---|
| 3234 | 3226 | bfa_status_t req_status, u32 rsp_len, u32 resid_len, |
|---|
| 3235 | 3227 | struct fchs_s *rsp_fchs) |
|---|
| .. | .. |
|---|
| 3244 | 3236 | complete(&drv_fcxp->comp); |
|---|
| 3245 | 3237 | } |
|---|
| 3246 | 3238 | |
|---|
| 3247 | | -struct bfad_buf_info * |
|---|
| 3239 | +static struct bfad_buf_info * |
|---|
| 3248 | 3240 | bfad_fcxp_map_sg(struct bfad_s *bfad, void *payload_kbuf, |
|---|
| 3249 | 3241 | uint32_t payload_len, uint32_t *num_sgles) |
|---|
| 3250 | 3242 | { |
|---|
| .. | .. |
|---|
| 3264 | 3256 | /* Allocate dma coherent memory */ |
|---|
| 3265 | 3257 | buf_info = buf_base; |
|---|
| 3266 | 3258 | 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); |
|---|
| 3270 | 3262 | if (!buf_info->virt) |
|---|
| 3271 | 3263 | goto out_free_mem; |
|---|
| 3272 | 3264 | |
|---|
| .. | .. |
|---|
| 3288 | 3280 | return NULL; |
|---|
| 3289 | 3281 | } |
|---|
| 3290 | 3282 | |
|---|
| 3291 | | -void |
|---|
| 3283 | +static void |
|---|
| 3292 | 3284 | bfad_fcxp_free_mem(struct bfad_s *bfad, struct bfad_buf_info *buf_base, |
|---|
| 3293 | 3285 | uint32_t num_sgles) |
|---|
| 3294 | 3286 | { |
|---|
| .. | .. |
|---|
| 3306 | 3298 | } |
|---|
| 3307 | 3299 | } |
|---|
| 3308 | 3300 | |
|---|
| 3309 | | -int |
|---|
| 3301 | +static int |
|---|
| 3310 | 3302 | bfad_fcxp_bsg_send(struct bsg_job *job, struct bfad_fcxp *drv_fcxp, |
|---|
| 3311 | 3303 | bfa_bsg_fcpt_t *bsg_fcpt) |
|---|
| 3312 | 3304 | { |
|---|
| .. | .. |
|---|
| 3346 | 3338 | return BFA_STATUS_OK; |
|---|
| 3347 | 3339 | } |
|---|
| 3348 | 3340 | |
|---|
| 3349 | | -int |
|---|
| 3341 | +static int |
|---|
| 3350 | 3342 | bfad_im_bsg_els_ct_request(struct bsg_job *job) |
|---|
| 3351 | 3343 | { |
|---|
| 3352 | 3344 | struct bfa_bsg_data *bsg_data; |
|---|