.. | .. |
---|
940 | 940 | /* |
---|
941 | 941 | * SGE 'Error' interrupt handler |
---|
942 | 942 | */ |
---|
943 | | -bool t1_sge_intr_error_handler(struct sge *sge) |
---|
| 943 | +int t1_sge_intr_error_handler(struct sge *sge) |
---|
944 | 944 | { |
---|
945 | 945 | struct adapter *adapter = sge->adapter; |
---|
946 | 946 | u32 cause = readl(adapter->regs + A_SG_INT_CAUSE); |
---|
947 | | - bool wake = false; |
---|
948 | 947 | |
---|
949 | 948 | if (adapter->port[0].dev->hw_features & NETIF_F_TSO) |
---|
950 | 949 | cause &= ~F_PACKET_TOO_BIG; |
---|
.. | .. |
---|
968 | 967 | sge->stats.pkt_mismatch++; |
---|
969 | 968 | pr_alert("%s: SGE packet mismatch\n", adapter->name); |
---|
970 | 969 | } |
---|
971 | | - if (cause & SGE_INT_FATAL) { |
---|
972 | | - t1_interrupts_disable(adapter); |
---|
973 | | - adapter->pending_thread_intr |= F_PL_INTR_SGE_ERR; |
---|
974 | | - wake = true; |
---|
975 | | - } |
---|
| 970 | + if (cause & SGE_INT_FATAL) |
---|
| 971 | + t1_fatal_err(adapter); |
---|
976 | 972 | |
---|
977 | 973 | writel(cause, adapter->regs + A_SG_INT_CAUSE); |
---|
978 | | - return wake; |
---|
| 974 | + return 0; |
---|
979 | 975 | } |
---|
980 | 976 | |
---|
981 | 977 | const struct sge_intr_counts *t1_sge_get_intr_counts(const struct sge *sge) |
---|
.. | .. |
---|
1623 | 1619 | return work_done; |
---|
1624 | 1620 | } |
---|
1625 | 1621 | |
---|
1626 | | -irqreturn_t t1_interrupt_thread(int irq, void *data) |
---|
1627 | | -{ |
---|
1628 | | - struct adapter *adapter = data; |
---|
1629 | | - u32 pending_thread_intr; |
---|
1630 | | - |
---|
1631 | | - spin_lock_irq(&adapter->async_lock); |
---|
1632 | | - pending_thread_intr = adapter->pending_thread_intr; |
---|
1633 | | - adapter->pending_thread_intr = 0; |
---|
1634 | | - spin_unlock_irq(&adapter->async_lock); |
---|
1635 | | - |
---|
1636 | | - if (!pending_thread_intr) |
---|
1637 | | - return IRQ_NONE; |
---|
1638 | | - |
---|
1639 | | - if (pending_thread_intr & F_PL_INTR_EXT) |
---|
1640 | | - t1_elmer0_ext_intr_handler(adapter); |
---|
1641 | | - |
---|
1642 | | - /* This error is fatal, interrupts remain off */ |
---|
1643 | | - if (pending_thread_intr & F_PL_INTR_SGE_ERR) { |
---|
1644 | | - pr_alert("%s: encountered fatal error, operation suspended\n", |
---|
1645 | | - adapter->name); |
---|
1646 | | - t1_sge_stop(adapter->sge); |
---|
1647 | | - return IRQ_HANDLED; |
---|
1648 | | - } |
---|
1649 | | - |
---|
1650 | | - spin_lock_irq(&adapter->async_lock); |
---|
1651 | | - adapter->slow_intr_mask |= F_PL_INTR_EXT; |
---|
1652 | | - |
---|
1653 | | - writel(F_PL_INTR_EXT, adapter->regs + A_PL_CAUSE); |
---|
1654 | | - writel(adapter->slow_intr_mask | F_PL_INTR_SGE_DATA, |
---|
1655 | | - adapter->regs + A_PL_ENABLE); |
---|
1656 | | - spin_unlock_irq(&adapter->async_lock); |
---|
1657 | | - |
---|
1658 | | - return IRQ_HANDLED; |
---|
1659 | | -} |
---|
1660 | | - |
---|
1661 | 1622 | irqreturn_t t1_interrupt(int irq, void *data) |
---|
1662 | 1623 | { |
---|
1663 | 1624 | struct adapter *adapter = data; |
---|
1664 | 1625 | struct sge *sge = adapter->sge; |
---|
1665 | | - irqreturn_t handled; |
---|
| 1626 | + int handled; |
---|
1666 | 1627 | |
---|
1667 | 1628 | if (likely(responses_pending(adapter))) { |
---|
1668 | 1629 | writel(F_PL_INTR_SGE_DATA, adapter->regs + A_PL_CAUSE); |
---|
.. | .. |
---|
1684 | 1645 | handled = t1_slow_intr_handler(adapter); |
---|
1685 | 1646 | spin_unlock(&adapter->async_lock); |
---|
1686 | 1647 | |
---|
1687 | | - if (handled == IRQ_NONE) |
---|
| 1648 | + if (!handled) |
---|
1688 | 1649 | sge->stats.unhandled_irqs++; |
---|
1689 | 1650 | |
---|
1690 | | - return handled; |
---|
| 1651 | + return IRQ_RETVAL(handled != 0); |
---|
1691 | 1652 | } |
---|
1692 | 1653 | |
---|
1693 | 1654 | /* |
---|