Skip to content

Commit a79da69

Browse files
committed
Merge branch 'hinic-mailbox-channel-enhancement'
Luo bin says: ==================== hinic: mailbox channel enhancement add support to generate mailbox random id for VF to ensure that the mailbox message from VF is valid and PF should check whether the cmd from VF is supported before passing it to hw. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents da79554 + c8c29ec commit a79da69

File tree

6 files changed

+422
-2
lines changed

6 files changed

+422
-2
lines changed

drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
(((u64)(val) & HINIC_CMDQ_CTXT_##member##_MASK) \
3232
<< HINIC_CMDQ_CTXT_##member##_SHIFT)
3333

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+
3438
#define HINIC_CMDQ_CTXT_PAGE_INFO_CLEAR(val, member) \
3539
((val) & (~((u64)HINIC_CMDQ_CTXT_##member##_MASK \
3640
<< HINIC_CMDQ_CTXT_##member##_SHIFT)))
@@ -45,6 +49,10 @@
4549
(((u64)(val) & HINIC_CMDQ_CTXT_##member##_MASK) \
4650
<< HINIC_CMDQ_CTXT_##member##_SHIFT)
4751

52+
#define HINIC_CMDQ_CTXT_BLOCK_INFO_GET(val, member) \
53+
(((u64)(val) >> HINIC_CMDQ_CTXT_##member##_SHIFT) \
54+
& HINIC_CMDQ_CTXT_##member##_MASK)
55+
4856
#define HINIC_CMDQ_CTXT_BLOCK_INFO_CLEAR(val, member) \
4957
((val) & (~((u64)HINIC_CMDQ_CTXT_##member##_MASK \
5058
<< HINIC_CMDQ_CTXT_##member##_SHIFT)))

drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#define HINIC_MGMT_STATUS_EXIST 0x6
2929
#define HINIC_MGMT_CMD_UNSUPPORTED 0xFF
3030

31+
#define HINIC_CMD_VER_FUNC_ID 2
32+
3133
struct hinic_cap {
3234
u16 max_qps;
3335
u16 num_qps;
@@ -313,6 +315,17 @@ struct hinic_msix_config {
313315
u8 rsvd1[3];
314316
};
315317

318+
struct hinic_set_random_id {
319+
u8 status;
320+
u8 version;
321+
u8 rsvd0[6];
322+
323+
u8 vf_in_pf;
324+
u8 rsvd1;
325+
u16 func_idx;
326+
u32 random_id;
327+
};
328+
316329
struct hinic_board_info {
317330
u32 board_type;
318331
u32 port_num;

0 commit comments

Comments
 (0)