.. | .. |
---|
| 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 "bfad_drv.h" |
---|
.. | .. |
---|
444 | 436 | return BFA_STATUS_OK; |
---|
445 | 437 | } |
---|
446 | 438 | |
---|
447 | | -void |
---|
| 439 | +static void |
---|
448 | 440 | bfa_ioim_profile_comp(struct bfa_ioim_s *ioim) |
---|
449 | 441 | { |
---|
450 | 442 | struct bfa_itnim_latency_s *io_lat = |
---|
.. | .. |
---|
461 | 453 | io_lat->avg[idx] += val; |
---|
462 | 454 | } |
---|
463 | 455 | |
---|
464 | | -void |
---|
| 456 | +static void |
---|
465 | 457 | bfa_ioim_profile_start(struct bfa_ioim_s *ioim) |
---|
466 | 458 | { |
---|
467 | 459 | ioim->start_time = jiffies; |
---|
.. | .. |
---|
2343 | 2335 | wwn_t rpwwn, struct scsi_lun lun) |
---|
2344 | 2336 | { |
---|
2345 | 2337 | struct bfa_lun_mask_s *lunm_list; |
---|
2346 | | - struct bfa_rport_s *rp = NULL; |
---|
2347 | 2338 | struct bfa_fcs_lport_s *port = NULL; |
---|
2348 | | - struct bfa_fcs_rport_s *rp_fcs; |
---|
2349 | 2339 | int i; |
---|
2350 | 2340 | |
---|
2351 | 2341 | /* in min cfg lunm_list could be NULL but no commands should run. */ |
---|
.. | .. |
---|
2361 | 2351 | port = bfa_fcs_lookup_port( |
---|
2362 | 2352 | &((struct bfad_s *)bfa->bfad)->bfa_fcs, |
---|
2363 | 2353 | vf_id, *pwwn); |
---|
2364 | | - if (port) { |
---|
| 2354 | + if (port) |
---|
2365 | 2355 | *pwwn = port->port_cfg.pwwn; |
---|
2366 | | - rp_fcs = bfa_fcs_lport_get_rport_by_pwwn(port, rpwwn); |
---|
2367 | | - if (rp_fcs) |
---|
2368 | | - rp = rp_fcs->bfa_rport; |
---|
2369 | | - } |
---|
2370 | 2356 | } |
---|
2371 | 2357 | |
---|
2372 | 2358 | lunm_list = bfa_get_lun_mask_list(bfa); |
---|
.. | .. |
---|
2586 | 2572 | case FCP_IODIR_RW: |
---|
2587 | 2573 | bfa_stats(itnim, input_reqs); |
---|
2588 | 2574 | bfa_stats(itnim, output_reqs); |
---|
| 2575 | + fallthrough; |
---|
2589 | 2576 | default: |
---|
2590 | 2577 | bfi_h2i_set(m->mh, BFI_MC_IOIM_IO, 0, bfa_fn_lpu(ioim->bfa)); |
---|
2591 | 2578 | } |
---|
.. | .. |
---|
2820 | 2807 | |
---|
2821 | 2808 | case BFI_IOIM_STS_TIMEDOUT: |
---|
2822 | 2809 | bfa_stats(ioim->itnim, iocomp_timedout); |
---|
| 2810 | + fallthrough; |
---|
2823 | 2811 | case BFI_IOIM_STS_ABORTED: |
---|
2824 | 2812 | rsp->io_status = BFI_IOIM_STS_ABORTED; |
---|
2825 | 2813 | bfa_stats(ioim->itnim, iocomp_aborted); |
---|
.. | .. |
---|
3215 | 3203 | switch (event) { |
---|
3216 | 3204 | case BFA_TSKIM_SM_DONE: |
---|
3217 | 3205 | bfa_reqq_wcancel(&tskim->reqq_wait); |
---|
3218 | | - /* |
---|
3219 | | - * Fall through !!! |
---|
3220 | | - */ |
---|
| 3206 | + fallthrough; |
---|
3221 | 3207 | case BFA_TSKIM_SM_QRESUME: |
---|
3222 | 3208 | bfa_sm_set_state(tskim, bfa_tskim_sm_cleanup); |
---|
3223 | 3209 | bfa_tskim_send_abort(tskim); |
---|
.. | .. |
---|
3826 | 3812 | } |
---|
3827 | 3813 | |
---|
3828 | 3814 | |
---|
3829 | | -/** |
---|
| 3815 | +/* |
---|
3830 | 3816 | * To send config req, first try to use throttle value from flash |
---|
3831 | 3817 | * If 0, then use driver parameter |
---|
3832 | 3818 | * We need to use min(flash_val, drv_val) because |
---|