From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/net/ethernet/chelsio/cxgb/sge.c | 53 +++++++----------------------------------------------
1 files changed, 7 insertions(+), 46 deletions(-)
diff --git a/kernel/drivers/net/ethernet/chelsio/cxgb/sge.c b/kernel/drivers/net/ethernet/chelsio/cxgb/sge.c
index cda01f2..2d9c2b5 100644
--- a/kernel/drivers/net/ethernet/chelsio/cxgb/sge.c
+++ b/kernel/drivers/net/ethernet/chelsio/cxgb/sge.c
@@ -940,11 +940,10 @@
/*
* SGE 'Error' interrupt handler
*/
-bool t1_sge_intr_error_handler(struct sge *sge)
+int t1_sge_intr_error_handler(struct sge *sge)
{
struct adapter *adapter = sge->adapter;
u32 cause = readl(adapter->regs + A_SG_INT_CAUSE);
- bool wake = false;
if (adapter->port[0].dev->hw_features & NETIF_F_TSO)
cause &= ~F_PACKET_TOO_BIG;
@@ -968,14 +967,11 @@
sge->stats.pkt_mismatch++;
pr_alert("%s: SGE packet mismatch\n", adapter->name);
}
- if (cause & SGE_INT_FATAL) {
- t1_interrupts_disable(adapter);
- adapter->pending_thread_intr |= F_PL_INTR_SGE_ERR;
- wake = true;
- }
+ if (cause & SGE_INT_FATAL)
+ t1_fatal_err(adapter);
writel(cause, adapter->regs + A_SG_INT_CAUSE);
- return wake;
+ return 0;
}
const struct sge_intr_counts *t1_sge_get_intr_counts(const struct sge *sge)
@@ -1623,46 +1619,11 @@
return work_done;
}
-irqreturn_t t1_interrupt_thread(int irq, void *data)
-{
- struct adapter *adapter = data;
- u32 pending_thread_intr;
-
- spin_lock_irq(&adapter->async_lock);
- pending_thread_intr = adapter->pending_thread_intr;
- adapter->pending_thread_intr = 0;
- spin_unlock_irq(&adapter->async_lock);
-
- if (!pending_thread_intr)
- return IRQ_NONE;
-
- if (pending_thread_intr & F_PL_INTR_EXT)
- t1_elmer0_ext_intr_handler(adapter);
-
- /* This error is fatal, interrupts remain off */
- if (pending_thread_intr & F_PL_INTR_SGE_ERR) {
- pr_alert("%s: encountered fatal error, operation suspended\n",
- adapter->name);
- t1_sge_stop(adapter->sge);
- return IRQ_HANDLED;
- }
-
- spin_lock_irq(&adapter->async_lock);
- adapter->slow_intr_mask |= F_PL_INTR_EXT;
-
- writel(F_PL_INTR_EXT, adapter->regs + A_PL_CAUSE);
- writel(adapter->slow_intr_mask | F_PL_INTR_SGE_DATA,
- adapter->regs + A_PL_ENABLE);
- spin_unlock_irq(&adapter->async_lock);
-
- return IRQ_HANDLED;
-}
-
irqreturn_t t1_interrupt(int irq, void *data)
{
struct adapter *adapter = data;
struct sge *sge = adapter->sge;
- irqreturn_t handled;
+ int handled;
if (likely(responses_pending(adapter))) {
writel(F_PL_INTR_SGE_DATA, adapter->regs + A_PL_CAUSE);
@@ -1684,10 +1645,10 @@
handled = t1_slow_intr_handler(adapter);
spin_unlock(&adapter->async_lock);
- if (handled == IRQ_NONE)
+ if (!handled)
sge->stats.unhandled_irqs++;
- return handled;
+ return IRQ_RETVAL(handled != 0);
}
/*
--
Gitblit v1.6.2