Skip to content

Commit 10aa3b7

Browse files
Hariprasad Shenaidavem330
authored andcommitted
cxgb4vf: Update to 128 byte mailbox size for T6 adapter
Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2216d01 commit 10aa3b7

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

drivers/net/ethernet/chelsio/cxgb4vf/t4vf_defs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
#define T4VF_MPS_BASE_ADDR 0x0100
5555
#define T4VF_PL_BASE_ADDR 0x0200
5656
#define T4VF_MBDATA_BASE_ADDR 0x0240
57+
#define T6VF_MBDATA_BASE_ADDR 0x0280
5758
#define T4VF_CIM_BASE_ADDR 0x0300
5859

5960
#define T4VF_REGMAP_START 0x0000

drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,19 @@ int t4vf_wr_mbox_core(struct adapter *adapter, const void *cmd, int size,
120120
1, 1, 3, 5, 10, 10, 20, 50, 100
121121
};
122122

123-
u32 v;
123+
u32 v, mbox_data;
124124
int i, ms, delay_idx;
125125
const __be64 *p;
126-
u32 mbox_data = T4VF_MBDATA_BASE_ADDR;
127126
u32 mbox_ctl = T4VF_CIM_BASE_ADDR + CIM_VF_EXT_MAILBOX_CTRL;
128127

128+
/* In T6, mailbox size is changed to 128 bytes to avoid
129+
* invalidating the entire prefetch buffer.
130+
*/
131+
if (CHELSIO_CHIP_VERSION(adapter->params.chip) <= CHELSIO_T5)
132+
mbox_data = T4VF_MBDATA_BASE_ADDR;
133+
else
134+
mbox_data = T6VF_MBDATA_BASE_ADDR;
135+
129136
/*
130137
* Commands must be multiples of 16 bytes in length and may not be
131138
* larger than the size of the Mailbox Data register array.

0 commit comments

Comments
 (0)