Skip to content

Commit 1992ded

Browse files
chelsiocudbgdavem330
authored andcommitted
cxgb4: fix SGE queue dump destination buffer context
The data in destination buffer is expected to be be parsed in big endian. So, use the right context. Fixes following sparse warning: cudbg_lib.c:2041:44: warning: incorrect type in assignment (different base types) cudbg_lib.c:2041:44: expected unsigned long long [usertype] cudbg_lib.c:2041:44: got restricted __be64 [usertype] Fixes: 736c3b9 ("cxgb4: collect egress and ingress SGE queue contexts") Signed-off-by: Rahul Lakkireddy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f286dd8 commit 1992ded

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,7 +1975,6 @@ int cudbg_collect_dump_context(struct cudbg_init *pdbg_init,
19751975
u8 mem_type[CTXT_INGRESS + 1] = { 0 };
19761976
struct cudbg_buffer temp_buff = { 0 };
19771977
struct cudbg_ch_cntxt *buff;
1978-
u64 *dst_off, *src_off;
19791978
u8 *ctx_buf;
19801979
u8 i, k;
19811980
int rc;
@@ -2044,8 +2043,11 @@ int cudbg_collect_dump_context(struct cudbg_init *pdbg_init,
20442043
}
20452044

20462045
for (j = 0; j < max_ctx_qid; j++) {
2046+
__be64 *dst_off;
2047+
u64 *src_off;
2048+
20472049
src_off = (u64 *)(ctx_buf + j * SGE_CTXT_SIZE);
2048-
dst_off = (u64 *)buff->data;
2050+
dst_off = (__be64 *)buff->data;
20492051

20502052
/* The data is stored in 64-bit cpu order. Convert it
20512053
* to big endian before parsing.

0 commit comments

Comments
 (0)