]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
bnx2x: fix handling single MSIX mode for 57710/57711
authorDmitry Kravkov <dmitry@broadcom.com>
Wed, 2 May 2012 01:16:33 +0000 (01:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 May 2012 00:03:51 +0000 (20:03 -0400)
commit 30a5de7723a8a4211be02e94236e9167a424fd07 added
ability to use single MSI-X vector, but lack proper
handling for 57710/57711 HW

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

index 35b82e00d0524eb68e6b09d350ff83621bb1f594..fcf73518f63c506d9e24f3ed5b08dfea4e273496 100644 (file)
@@ -1281,14 +1281,17 @@ static void bnx2x_hc_int_enable(struct bnx2x *bp)
        int port = BP_PORT(bp);
        u32 addr = port ? HC_REG_CONFIG_1 : HC_REG_CONFIG_0;
        u32 val = REG_RD(bp, addr);
-       int msix = (bp->flags & USING_MSIX_FLAG) ? 1 : 0;
-       int msi = (bp->flags & USING_MSI_FLAG) ? 1 : 0;
+       bool msix = (bp->flags & USING_MSIX_FLAG) ? true : false;
+       bool single_msix = (bp->flags & USING_SINGLE_MSIX_FLAG) ? true : false;
+       bool msi = (bp->flags & USING_MSI_FLAG) ? true : false;
 
        if (msix) {
                val &= ~(HC_CONFIG_0_REG_SINGLE_ISR_EN_0 |
                         HC_CONFIG_0_REG_INT_LINE_EN_0);
                val |= (HC_CONFIG_0_REG_MSI_MSIX_INT_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) {
                val &= ~HC_CONFIG_0_REG_INT_LINE_EN_0;
                val |= (HC_CONFIG_0_REG_SINGLE_ISR_EN_0 |