]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Initialize "context kind" field for context memory blocks.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 14 Feb 2021 23:04:59 +0000 (18:04 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Feb 2021 01:27:51 +0000 (17:27 -0800)
commit5a925e66875ba1ca8cf571863ce5f527b1c8a4f3
treeec0620e65d9779b1e9285308495c45f484e005df
parent108d7b7547f9324b4849f4d5062d224b084aa652
bnxt_en: Initialize "context kind" field for context memory blocks.

If firmware provides the offset to the "context kind" field of the
relevant context memory blocks, we'll initialize just that field for
each block instead of initializing all of context memory.

Populate the bnxt_mem_init structure with the proper offset returned
by firmware.  If it is older firmware and the information is not
available, we set the offset to an invalid value and fall back to
the old behavior of initializing every byte.  Otherwise, we initialize
only the "context kind" byte at the offset.

Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c