| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright(c) 2007 Intel Corporation. All rights reserved. |
|---|
| 3 | 4 | * Copyright(c) 2008 Red Hat, Inc. All rights reserved. |
|---|
| 4 | 5 | * Copyright(c) 2008 Mike Christie |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 7 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 8 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 11 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 12 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 13 | | - * more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 16 | | - * this program; if not, write to the Free Software Foundation, Inc., |
|---|
| 17 | | - * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
|---|
| 18 | 6 | * |
|---|
| 19 | 7 | * Maintained at www.Open-FCoE.org |
|---|
| 20 | 8 | */ |
|---|
| .. | .. |
|---|
| 61 | 49 | * @total_exches: Total allocated exchanges |
|---|
| 62 | 50 | * @lock: Exch pool lock |
|---|
| 63 | 51 | * @ex_list: List of exchanges |
|---|
| 52 | + * @left: Cache of free slot in exch array |
|---|
| 53 | + * @right: Cache of free slot in exch array |
|---|
| 64 | 54 | * |
|---|
| 65 | 55 | * This structure manages per cpu exchanges in array of exchange pointers. |
|---|
| 66 | 56 | * This array is allocated followed by struct fc_exch_pool memory for |
|---|
| .. | .. |
|---|
| 72 | 62 | u16 next_index; |
|---|
| 73 | 63 | u16 total_exches; |
|---|
| 74 | 64 | |
|---|
| 75 | | - /* two cache of free slot in exch array */ |
|---|
| 76 | 65 | u16 left; |
|---|
| 77 | 66 | u16 right; |
|---|
| 78 | 67 | } ____cacheline_aligned_in_smp; |
|---|
| .. | .. |
|---|
| 86 | 75 | * @ep_pool: Reserved exchange pointers |
|---|
| 87 | 76 | * @pool_max_index: Max exch array index in exch pool |
|---|
| 88 | 77 | * @pool: Per cpu exch pool |
|---|
| 78 | + * @lport: Local exchange port |
|---|
| 89 | 79 | * @stats: Statistics structure |
|---|
| 90 | 80 | * |
|---|
| 91 | 81 | * This structure is the center for creating exchanges and sequences. |
|---|
| .. | .. |
|---|
| 714 | 704 | |
|---|
| 715 | 705 | /** |
|---|
| 716 | 706 | * fc_invoke_resp() - invoke ep->resp() |
|---|
| 707 | + * @ep: The exchange to be operated on |
|---|
| 708 | + * @fp: The frame pointer to pass through to ->resp() |
|---|
| 709 | + * @sp: The sequence pointer to pass through to ->resp() |
|---|
| 717 | 710 | * |
|---|
| 718 | 711 | * Notes: |
|---|
| 719 | 712 | * It is assumed that after initialization finished (this means the |
|---|
| .. | .. |
|---|
| 1709 | 1702 | if (cancel_delayed_work_sync(&ep->timeout_work)) { |
|---|
| 1710 | 1703 | FC_EXCH_DBG(ep, "Exchange timer canceled due to ABTS response\n"); |
|---|
| 1711 | 1704 | fc_exch_release(ep); /* release from pending timer hold */ |
|---|
| 1705 | + return; |
|---|
| 1712 | 1706 | } |
|---|
| 1713 | 1707 | |
|---|
| 1714 | 1708 | spin_lock_bh(&ep->ex_lock); |
|---|
| .. | .. |
|---|
| 2127 | 2121 | switch (op) { |
|---|
| 2128 | 2122 | case ELS_LS_RJT: |
|---|
| 2129 | 2123 | FC_EXCH_DBG(aborted_ep, "LS_RJT for RRQ\n"); |
|---|
| 2130 | | - /* fall through */ |
|---|
| 2124 | + fallthrough; |
|---|
| 2131 | 2125 | case ELS_LS_ACC: |
|---|
| 2132 | 2126 | goto cleanup; |
|---|
| 2133 | 2127 | default: |
|---|
| .. | .. |
|---|
| 2641 | 2635 | case FC_EOF_T: |
|---|
| 2642 | 2636 | if (f_ctl & FC_FC_END_SEQ) |
|---|
| 2643 | 2637 | skb_trim(fp_skb(fp), fr_len(fp) - FC_FC_FILL(f_ctl)); |
|---|
| 2644 | | - /* fall through */ |
|---|
| 2638 | + fallthrough; |
|---|
| 2645 | 2639 | case FC_EOF_N: |
|---|
| 2646 | 2640 | if (fh->fh_type == FC_TYPE_BLS) |
|---|
| 2647 | 2641 | fc_exch_recv_bls(ema->mp, fp); |
|---|