diff options
author | Yuval Mintz <yuvalmin@broadcom.com> | 2013-01-14 00:11:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-15 15:07:59 -0500 |
commit | ebe61d80b42662a1cf8d24e0b8605aa16fa6e4d0 (patch) | |
tree | 02e0b1f887597b64d5e3a5abc6289b9196050f36 | |
parent | 823e1d90797552687d2dfab2299464e5b663a8a9 (diff) |
bnx2x: Clean previous IGU status before ack
When enabling interrupts, acknowledge the interrupt only
after configuring the IGU to the correct interrupt mode
(otherwise it would dirty selftests)
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 17 |
2 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 5409b303a69b..b180a0379003 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -1681,7 +1681,6 @@ static int bnx2x_setup_irqs(struct bnx2x *bp) | |||
1681 | if (rc) | 1681 | if (rc) |
1682 | return rc; | 1682 | return rc; |
1683 | } else { | 1683 | } else { |
1684 | bnx2x_ack_int(bp); | ||
1685 | rc = bnx2x_req_irq(bp); | 1684 | rc = bnx2x_req_irq(bp); |
1686 | if (rc) { | 1685 | if (rc) { |
1687 | BNX2X_ERR("IRQ request failed rc %d, aborting\n", rc); | 1686 | BNX2X_ERR("IRQ request failed rc %d, aborting\n", rc); |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index b4838510f3da..dce452d33c61 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -1539,26 +1539,31 @@ static void bnx2x_igu_int_enable(struct bnx2x *bp) | |||
1539 | if (msix) { | 1539 | if (msix) { |
1540 | val &= ~(IGU_PF_CONF_INT_LINE_EN | | 1540 | val &= ~(IGU_PF_CONF_INT_LINE_EN | |
1541 | IGU_PF_CONF_SINGLE_ISR_EN); | 1541 | IGU_PF_CONF_SINGLE_ISR_EN); |
1542 | val |= (IGU_PF_CONF_FUNC_EN | | 1542 | val |= (IGU_PF_CONF_MSI_MSIX_EN | |
1543 | IGU_PF_CONF_MSI_MSIX_EN | | ||
1544 | IGU_PF_CONF_ATTN_BIT_EN); | 1543 | IGU_PF_CONF_ATTN_BIT_EN); |
1545 | 1544 | ||
1546 | if (single_msix) | 1545 | if (single_msix) |
1547 | val |= IGU_PF_CONF_SINGLE_ISR_EN; | 1546 | val |= IGU_PF_CONF_SINGLE_ISR_EN; |
1548 | } else if (msi) { | 1547 | } else if (msi) { |
1549 | val &= ~IGU_PF_CONF_INT_LINE_EN; | 1548 | val &= ~IGU_PF_CONF_INT_LINE_EN; |
1550 | val |= (IGU_PF_CONF_FUNC_EN | | 1549 | val |= (IGU_PF_CONF_MSI_MSIX_EN | |
1551 | IGU_PF_CONF_MSI_MSIX_EN | | ||
1552 | IGU_PF_CONF_ATTN_BIT_EN | | 1550 | IGU_PF_CONF_ATTN_BIT_EN | |
1553 | IGU_PF_CONF_SINGLE_ISR_EN); | 1551 | IGU_PF_CONF_SINGLE_ISR_EN); |
1554 | } else { | 1552 | } else { |
1555 | val &= ~IGU_PF_CONF_MSI_MSIX_EN; | 1553 | val &= ~IGU_PF_CONF_MSI_MSIX_EN; |
1556 | val |= (IGU_PF_CONF_FUNC_EN | | 1554 | val |= (IGU_PF_CONF_INT_LINE_EN | |
1557 | IGU_PF_CONF_INT_LINE_EN | | ||
1558 | IGU_PF_CONF_ATTN_BIT_EN | | 1555 | IGU_PF_CONF_ATTN_BIT_EN | |
1559 | IGU_PF_CONF_SINGLE_ISR_EN); | 1556 | IGU_PF_CONF_SINGLE_ISR_EN); |
1560 | } | 1557 | } |
1561 | 1558 | ||
1559 | /* Clean previous status - need to configure igu prior to ack*/ | ||
1560 | if ((!msix) || single_msix) { | ||
1561 | REG_WR(bp, IGU_REG_PF_CONFIGURATION, val); | ||
1562 | bnx2x_ack_int(bp); | ||
1563 | } | ||
1564 | |||
1565 | val |= IGU_PF_CONF_FUNC_EN; | ||
1566 | |||
1562 | DP(NETIF_MSG_IFUP, "write 0x%x to IGU mode %s\n", | 1567 | DP(NETIF_MSG_IFUP, "write 0x%x to IGU mode %s\n", |
1563 | val, (msix ? "MSI-X" : (msi ? "MSI" : "INTx"))); | 1568 | val, (msix ? "MSI-X" : (msi ? "MSI" : "INTx"))); |
1564 | 1569 | ||