| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Huawei HiNIC PCI Express Linux driver |
|---|
| 3 | 4 | * Copyright(c) 2017 Huawei Technologies Co., Ltd |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 6 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 7 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 10 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 11 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|---|
| 12 | | - * for more details. |
|---|
| 13 | | - * |
|---|
| 14 | 5 | */ |
|---|
| 15 | 6 | |
|---|
| 16 | 7 | #ifndef HINIC_CMDQ_H |
|---|
| .. | .. |
|---|
| 40 | 31 | (((u64)(val) & HINIC_CMDQ_CTXT_##member##_MASK) \ |
|---|
| 41 | 32 | << HINIC_CMDQ_CTXT_##member##_SHIFT) |
|---|
| 42 | 33 | |
|---|
| 34 | +#define HINIC_CMDQ_CTXT_PAGE_INFO_GET(val, member) \ |
|---|
| 35 | + (((u64)(val) >> HINIC_CMDQ_CTXT_##member##_SHIFT) \ |
|---|
| 36 | + & HINIC_CMDQ_CTXT_##member##_MASK) |
|---|
| 37 | + |
|---|
| 43 | 38 | #define HINIC_CMDQ_CTXT_PAGE_INFO_CLEAR(val, member) \ |
|---|
| 44 | 39 | ((val) & (~((u64)HINIC_CMDQ_CTXT_##member##_MASK \ |
|---|
| 45 | 40 | << HINIC_CMDQ_CTXT_##member##_SHIFT))) |
|---|
| .. | .. |
|---|
| 53 | 48 | #define HINIC_CMDQ_CTXT_BLOCK_INFO_SET(val, member) \ |
|---|
| 54 | 49 | (((u64)(val) & HINIC_CMDQ_CTXT_##member##_MASK) \ |
|---|
| 55 | 50 | << HINIC_CMDQ_CTXT_##member##_SHIFT) |
|---|
| 51 | + |
|---|
| 52 | +#define HINIC_CMDQ_CTXT_BLOCK_INFO_GET(val, member) \ |
|---|
| 53 | + (((u64)(val) >> HINIC_CMDQ_CTXT_##member##_SHIFT) \ |
|---|
| 54 | + & HINIC_CMDQ_CTXT_##member##_MASK) |
|---|
| 56 | 55 | |
|---|
| 57 | 56 | #define HINIC_CMDQ_CTXT_BLOCK_INFO_CLEAR(val, member) \ |
|---|
| 58 | 57 | ((val) & (~((u64)HINIC_CMDQ_CTXT_##member##_MASK \ |
|---|
| .. | .. |
|---|
| 131 | 130 | |
|---|
| 132 | 131 | u16 func_idx; |
|---|
| 133 | 132 | u8 cmdq_type; |
|---|
| 134 | | - u8 rsvd1[1]; |
|---|
| 133 | + u8 ppf_idx; |
|---|
| 135 | 134 | |
|---|
| 136 | 135 | u8 rsvd2[4]; |
|---|
| 137 | 136 | |
|---|
| .. | .. |
|---|
| 139 | 138 | }; |
|---|
| 140 | 139 | |
|---|
| 141 | 140 | struct hinic_cmdq { |
|---|
| 141 | + struct hinic_hwdev *hwdev; |
|---|
| 142 | + |
|---|
| 142 | 143 | struct hinic_wq *wq; |
|---|
| 143 | 144 | |
|---|
| 144 | 145 | enum hinic_cmdq_type cmdq_type; |
|---|