Commit 69c326b3 authored by Dmitry Kravkov's avatar Dmitry Kravkov Committed by David S. Miller

bnx2x: fix handling single MSIX mode for 57710/57711

commit 30a5de77 added
ability to use single MSI-X vector, but lack proper
handling for 57710/57711 HW
Signed-off-by: default avatarDmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6b42a9c5
...@@ -1281,14 +1281,17 @@ static void bnx2x_hc_int_enable(struct bnx2x *bp) ...@@ -1281,14 +1281,17 @@ static void bnx2x_hc_int_enable(struct bnx2x *bp)
int port = BP_PORT(bp); int port = BP_PORT(bp);
u32 addr = port ? HC_REG_CONFIG_1 : HC_REG_CONFIG_0; u32 addr = port ? HC_REG_CONFIG_1 : HC_REG_CONFIG_0;
u32 val = REG_RD(bp, addr); u32 val = REG_RD(bp, addr);
int msix = (bp->flags & USING_MSIX_FLAG) ? 1 : 0; bool msix = (bp->flags & USING_MSIX_FLAG) ? true : false;
int msi = (bp->flags & USING_MSI_FLAG) ? 1 : 0; bool single_msix = (bp->flags & USING_SINGLE_MSIX_FLAG) ? true : false;
bool msi = (bp->flags & USING_MSI_FLAG) ? true : false;
if (msix) { if (msix) {
val &= ~(HC_CONFIG_0_REG_SINGLE_ISR_EN_0 | val &= ~(HC_CONFIG_0_REG_SINGLE_ISR_EN_0 |
HC_CONFIG_0_REG_INT_LINE_EN_0); HC_CONFIG_0_REG_INT_LINE_EN_0);
val |= (HC_CONFIG_0_REG_MSI_MSIX_INT_EN_0 | val |= (HC_CONFIG_0_REG_MSI_MSIX_INT_EN_0 |
HC_CONFIG_0_REG_ATTN_BIT_EN_0); HC_CONFIG_0_REG_ATTN_BIT_EN_0);
if (single_msix)
val |= HC_CONFIG_0_REG_SINGLE_ISR_EN_0;
} else if (msi) { } else if (msi) {
val &= ~HC_CONFIG_0_REG_INT_LINE_EN_0; val &= ~HC_CONFIG_0_REG_INT_LINE_EN_0;
val |= (HC_CONFIG_0_REG_SINGLE_ISR_EN_0 | val |= (HC_CONFIG_0_REG_SINGLE_ISR_EN_0 |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment