.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Linux network driver for QLogic BR-series Converged Network Adapter. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify it |
---|
5 | | - * under the terms of the GNU General Public License (GPL) Version 2 as |
---|
6 | | - * published by the Free Software Foundation |
---|
7 | | - * |
---|
8 | | - * This program is distributed in the hope that it will be useful, but |
---|
9 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
10 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
11 | | - * General Public License for more details. |
---|
12 | 4 | */ |
---|
13 | 5 | /* |
---|
14 | 6 | * Copyright (c) 2005-2014 Brocade Communications Systems, Inc. |
---|
.. | .. |
---|
277 | 269 | break; |
---|
278 | 270 | |
---|
279 | 271 | case IOC_E_PFFAILED: |
---|
280 | | - /* !!! fall through !!! */ |
---|
| 272 | + fallthrough; |
---|
281 | 273 | case IOC_E_HWERROR: |
---|
282 | 274 | ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); |
---|
283 | 275 | bfa_fsm_set_state(ioc, bfa_ioc_sm_fail); |
---|
.. | .. |
---|
329 | 321 | case IOC_E_PFFAILED: |
---|
330 | 322 | case IOC_E_HWERROR: |
---|
331 | 323 | del_timer(&ioc->ioc_timer); |
---|
332 | | - /* fall through */ |
---|
| 324 | + fallthrough; |
---|
333 | 325 | case IOC_E_TIMEOUT: |
---|
334 | 326 | ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); |
---|
335 | 327 | bfa_fsm_set_state(ioc, bfa_ioc_sm_fail); |
---|
.. | .. |
---|
373 | 365 | case IOC_E_PFFAILED: |
---|
374 | 366 | case IOC_E_HWERROR: |
---|
375 | 367 | bfa_ioc_hb_stop(ioc); |
---|
376 | | - /* !!! fall through !!! */ |
---|
| 368 | + fallthrough; |
---|
| 369 | + |
---|
377 | 370 | case IOC_E_HBFAIL: |
---|
378 | 371 | if (ioc->iocpf.auto_recover) |
---|
379 | 372 | bfa_fsm_set_state(ioc, bfa_ioc_sm_fail_retry); |
---|
.. | .. |
---|
743 | 736 | |
---|
744 | 737 | case IOCPF_E_TIMEOUT: |
---|
745 | 738 | bfa_nw_ioc_hw_sem_release(ioc); |
---|
746 | | - bfa_ioc_pf_failed(ioc); |
---|
| 739 | + bfa_ioc_pf_failed(ioc); |
---|
747 | 740 | bfa_fsm_set_state(iocpf, bfa_iocpf_sm_initfail_sync); |
---|
748 | 741 | break; |
---|
749 | 742 | |
---|
.. | .. |
---|
788 | 781 | |
---|
789 | 782 | case IOCPF_E_INITFAIL: |
---|
790 | 783 | del_timer(&ioc->iocpf_timer); |
---|
791 | | - /* |
---|
792 | | - * !!! fall through !!! |
---|
793 | | - */ |
---|
| 784 | + fallthrough; |
---|
| 785 | + |
---|
794 | 786 | case IOCPF_E_TIMEOUT: |
---|
795 | 787 | bfa_nw_ioc_hw_sem_release(ioc); |
---|
796 | 788 | if (event == IOCPF_E_TIMEOUT) |
---|
.. | .. |
---|
858 | 850 | |
---|
859 | 851 | case IOCPF_E_FAIL: |
---|
860 | 852 | del_timer(&ioc->iocpf_timer); |
---|
861 | | - /* |
---|
862 | | - * !!! fall through !!! |
---|
863 | | - */ |
---|
| 853 | + fallthrough; |
---|
864 | 854 | |
---|
865 | 855 | case IOCPF_E_TIMEOUT: |
---|
866 | 856 | bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL); |
---|
.. | .. |
---|
1135 | 1125 | static void |
---|
1136 | 1126 | bfa_ioc_fwver_clear(struct bfa_ioc *ioc) |
---|
1137 | 1127 | { |
---|
1138 | | - u32 pgnum, pgoff, loff = 0; |
---|
| 1128 | + u32 pgnum, loff = 0; |
---|
1139 | 1129 | int i; |
---|
1140 | 1130 | |
---|
1141 | 1131 | pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); |
---|
1142 | | - pgoff = PSS_SMEM_PGOFF(loff); |
---|
1143 | 1132 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); |
---|
1144 | 1133 | |
---|
1145 | 1134 | for (i = 0; i < (sizeof(struct bfi_ioc_image_hdr) / sizeof(u32)); i++) { |
---|
.. | .. |
---|
1547 | 1536 | bfa_flash_fifo_flush(void __iomem *pci_bar) |
---|
1548 | 1537 | { |
---|
1549 | 1538 | u32 i; |
---|
1550 | | - u32 t; |
---|
1551 | 1539 | union bfa_flash_dev_status_reg dev_status; |
---|
1552 | 1540 | |
---|
1553 | 1541 | dev_status.i = readl(pci_bar + FLI_DEV_STATUS_REG); |
---|
.. | .. |
---|
1557 | 1545 | |
---|
1558 | 1546 | /* fifo counter in terms of words */ |
---|
1559 | 1547 | for (i = 0; i < dev_status.r.fifo_cnt; i++) |
---|
1560 | | - t = readl(pci_bar + FLI_RDDATA_REG); |
---|
| 1548 | + readl(pci_bar + FLI_RDDATA_REG); |
---|
1561 | 1549 | |
---|
1562 | 1550 | /* Check the device status. It may take some time. */ |
---|
1563 | 1551 | for (i = 0; i < BFA_FLASH_CHECK_MAX; i++) { |
---|
.. | .. |
---|
1776 | 1764 | return BFI_IOC_IMG_VER_INCOMP; |
---|
1777 | 1765 | } |
---|
1778 | 1766 | |
---|
1779 | | -/** |
---|
| 1767 | +/* |
---|
1780 | 1768 | * Returns TRUE if driver is willing to work with current smem f/w version. |
---|
1781 | 1769 | */ |
---|
1782 | 1770 | bool |
---|
.. | .. |
---|
2482 | 2470 | * |
---|
2483 | 2471 | * @ioc: memory for IOC |
---|
2484 | 2472 | * @bfa: driver instance structure |
---|
| 2473 | + * @cbfn: callback function |
---|
2485 | 2474 | */ |
---|
2486 | 2475 | void |
---|
2487 | 2476 | bfa_nw_ioc_attach(struct bfa_ioc *ioc, void *bfa, struct bfa_ioc_cbfn *cbfn) |
---|
.. | .. |
---|
2513 | 2502 | /** |
---|
2514 | 2503 | * bfa_nw_ioc_pci_init - Setup IOC PCI properties. |
---|
2515 | 2504 | * |
---|
| 2505 | + * @ioc: memory for IOC |
---|
2516 | 2506 | * @pcidev: PCI device information for this IOC |
---|
| 2507 | + * @clscode: class code |
---|
2517 | 2508 | */ |
---|
2518 | 2509 | void |
---|
2519 | 2510 | bfa_nw_ioc_pci_init(struct bfa_ioc *ioc, struct bfa_pcidev *pcidev, |
---|
.. | .. |
---|
2582 | 2573 | /** |
---|
2583 | 2574 | * bfa_nw_ioc_mem_claim - Initialize IOC dma memory |
---|
2584 | 2575 | * |
---|
| 2576 | + * @ioc: memory for IOC |
---|
2585 | 2577 | * @dm_kva: kernel virtual address of IOC dma memory |
---|
2586 | 2578 | * @dm_pa: physical address of IOC dma memory |
---|
2587 | 2579 | */ |
---|
.. | .. |
---|
2649 | 2641 | * |
---|
2650 | 2642 | * @ioc: IOC instance |
---|
2651 | 2643 | * @cmd: Mailbox command |
---|
| 2644 | + * @cbfn: callback function |
---|
| 2645 | + * @cbarg: arguments to callback |
---|
2652 | 2646 | * |
---|
2653 | 2647 | * Waits if mailbox is busy. Responsibility of caller to serialize |
---|
2654 | 2648 | */ |
---|