* [PATCH net 0/2] bnxt_en: 2 bug fixes.
@ 2021-05-15 7:25 Michael Chan
2021-05-15 7:25 ` [PATCH net 1/2] bnxt_en: Include new P5 HV definition in VF check Michael Chan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michael Chan @ 2021-05-15 7:25 UTC (permalink / raw)
To: davem; +Cc: netdev, kuba, gospo
The first one fixes a bug to properly identify some recently added HyperV
device IDs. The second one fixes device context memory set up on systems
with 64K page size.
Please queue these for -stable as well. Thanks.
Andy Gospodarek (1):
bnxt_en: Include new P5 HV definition in VF check.
Michael Chan (1):
bnxt_en: Fix context memory setup for 64K page size.
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 +++---------
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 10 ++++++++++
2 files changed, 13 insertions(+), 9 deletions(-)
--
2.18.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net 1/2] bnxt_en: Include new P5 HV definition in VF check.
2021-05-15 7:25 [PATCH net 0/2] bnxt_en: 2 bug fixes Michael Chan
@ 2021-05-15 7:25 ` Michael Chan
2021-05-15 7:25 ` [PATCH net 2/2] bnxt_en: Fix context memory setup for 64K page size Michael Chan
2021-05-17 21:10 ` [PATCH net 0/2] bnxt_en: 2 bug fixes patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Michael Chan @ 2021-05-15 7:25 UTC (permalink / raw)
To: davem; +Cc: netdev, kuba, gospo
From: Andy Gospodarek <gospo@broadcom.com>
Otherwise, some of the recently added HyperV VF IDs would not be
recognized as VF devices and they would not initialize properly.
Fixes: 7fbf359bb2c1 ("bnxt_en: Add PCI IDs for Hyper-V VF devices.")
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 46be4046ee51..4e57041b4775 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -282,7 +282,8 @@ static bool bnxt_vf_pciid(enum board_idx idx)
{
return (idx == NETXTREME_C_VF || idx == NETXTREME_E_VF ||
idx == NETXTREME_S_VF || idx == NETXTREME_C_VF_HV ||
- idx == NETXTREME_E_VF_HV || idx == NETXTREME_E_P5_VF);
+ idx == NETXTREME_E_VF_HV || idx == NETXTREME_E_P5_VF ||
+ idx == NETXTREME_E_P5_VF_HV);
}
#define DB_CP_REARM_FLAGS (DB_KEY_CP | DB_IDX_VALID)
--
2.18.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net 2/2] bnxt_en: Fix context memory setup for 64K page size.
2021-05-15 7:25 [PATCH net 0/2] bnxt_en: 2 bug fixes Michael Chan
2021-05-15 7:25 ` [PATCH net 1/2] bnxt_en: Include new P5 HV definition in VF check Michael Chan
@ 2021-05-15 7:25 ` Michael Chan
2021-05-17 21:10 ` [PATCH net 0/2] bnxt_en: 2 bug fixes patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Michael Chan @ 2021-05-15 7:25 UTC (permalink / raw)
To: davem; +Cc: netdev, kuba, gospo
There was a typo in the code that checks for 64K BNXT_PAGE_SHIFT in
bnxt_hwrm_set_pg_attr(). Fix it and make the code more understandable
with a new macro BNXT_SET_CTX_PAGE_ATTR().
Fixes: 1b9394e5a2ad ("bnxt_en: Configure context memory on new devices.")
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +--------
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 10 ++++++++++
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 4e57041b4775..fcc729d52b17 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -6933,17 +6933,10 @@ static int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
static void bnxt_hwrm_set_pg_attr(struct bnxt_ring_mem_info *rmem, u8 *pg_attr,
__le64 *pg_dir)
{
- u8 pg_size = 0;
-
if (!rmem->nr_pages)
return;
- if (BNXT_PAGE_SHIFT == 13)
- pg_size = 1 << 4;
- else if (BNXT_PAGE_SIZE == 16)
- pg_size = 2 << 4;
-
- *pg_attr = pg_size;
+ BNXT_SET_CTX_PAGE_ATTR(*pg_attr);
if (rmem->depth >= 1) {
if (rmem->depth == 2)
*pg_attr |= 2;
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index 98e0cef4532c..30e47ea343f9 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -1457,6 +1457,16 @@ struct bnxt_ctx_pg_info {
#define BNXT_BACKING_STORE_CFG_LEGACY_LEN 256
+#define BNXT_SET_CTX_PAGE_ATTR(attr) \
+do { \
+ if (BNXT_PAGE_SIZE == 0x2000) \
+ attr = FUNC_BACKING_STORE_CFG_REQ_SRQ_PG_SIZE_PG_8K; \
+ else if (BNXT_PAGE_SIZE == 0x10000) \
+ attr = FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_PG_64K; \
+ else \
+ attr = FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_PG_4K; \
+} while (0)
+
struct bnxt_ctx_mem_info {
u32 qp_max_entries;
u16 qp_min_qp1_entries;
--
2.18.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 0/2] bnxt_en: 2 bug fixes.
2021-05-15 7:25 [PATCH net 0/2] bnxt_en: 2 bug fixes Michael Chan
2021-05-15 7:25 ` [PATCH net 1/2] bnxt_en: Include new P5 HV definition in VF check Michael Chan
2021-05-15 7:25 ` [PATCH net 2/2] bnxt_en: Fix context memory setup for 64K page size Michael Chan
@ 2021-05-17 21:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-17 21:10 UTC (permalink / raw)
To: Michael Chan; +Cc: davem, netdev, kuba, gospo
Hello:
This series was applied to netdev/net.git (refs/heads/master):
On Sat, 15 May 2021 03:25:17 -0400 you wrote:
> The first one fixes a bug to properly identify some recently added HyperV
> device IDs. The second one fixes device context memory set up on systems
> with 64K page size.
>
> Please queue these for -stable as well. Thanks.
>
> Andy Gospodarek (1):
> bnxt_en: Include new P5 HV definition in VF check.
>
> [...]
Here is the summary with links:
- [net,1/2] bnxt_en: Include new P5 HV definition in VF check.
https://git.kernel.org/netdev/net/c/ab21494be9dc
- [net,2/2] bnxt_en: Fix context memory setup for 64K page size.
https://git.kernel.org/netdev/net/c/702279d2ce46
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-17 21:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15 7:25 [PATCH net 0/2] bnxt_en: 2 bug fixes Michael Chan
2021-05-15 7:25 ` [PATCH net 1/2] bnxt_en: Include new P5 HV definition in VF check Michael Chan
2021-05-15 7:25 ` [PATCH net 2/2] bnxt_en: Fix context memory setup for 64K page size Michael Chan
2021-05-17 21:10 ` [PATCH net 0/2] bnxt_en: 2 bug fixes patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.