Commit f4826443 authored by David Thompson's avatar David Thompson Committed by Jakub Kicinski

mlxbf_gige: remove driver-managed interrupt counts

The driver currently has three interrupt counters,
which are incremented every time each interrupt handler
executes.  These driver-managed counters are not
necessary as the kernel already has logic that manages
interrupt counts and exposes them via /proc/interrupts.
This patch removes the driver-managed counters.
Signed-off-by: default avatarDavid Thompson <davthompson@nvidia.com>
Signed-off-by: default avatarAsmaa Mnebhi <asmaa@nvidia.com>
Link: https://lore.kernel.org/r/20220511135251.2989-1-davthompson@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9b19e57a
...@@ -90,9 +90,6 @@ struct mlxbf_gige { ...@@ -90,9 +90,6 @@ struct mlxbf_gige {
dma_addr_t rx_cqe_base_dma; dma_addr_t rx_cqe_base_dma;
u16 tx_pi; u16 tx_pi;
u16 prev_tx_ci; u16 prev_tx_ci;
u64 error_intr_count;
u64 rx_intr_count;
u64 llu_plu_intr_count;
struct sk_buff *rx_skb[MLXBF_GIGE_MAX_RXQ_SZ]; struct sk_buff *rx_skb[MLXBF_GIGE_MAX_RXQ_SZ];
struct sk_buff *tx_skb[MLXBF_GIGE_MAX_TXQ_SZ]; struct sk_buff *tx_skb[MLXBF_GIGE_MAX_TXQ_SZ];
int error_irq; int error_irq;
......
...@@ -24,11 +24,9 @@ static void mlxbf_gige_get_regs(struct net_device *netdev, ...@@ -24,11 +24,9 @@ static void mlxbf_gige_get_regs(struct net_device *netdev,
regs->version = MLXBF_GIGE_REGS_VERSION; regs->version = MLXBF_GIGE_REGS_VERSION;
/* Read entire MMIO register space and store results /* Read entire MMIO register space and store results
* into the provided buffer. Each 64-bit word is converted * into the provided buffer. By design, a read to an
* to big-endian to make the output more readable. * offset without an existing register will be
* * acknowledged and return zero.
* NOTE: by design, a read to an offset without an existing
* register will be acknowledged and return zero.
*/ */
memcpy_fromio(p, priv->base, MLXBF_GIGE_MMIO_REG_SZ); memcpy_fromio(p, priv->base, MLXBF_GIGE_MMIO_REG_SZ);
} }
......
...@@ -17,8 +17,6 @@ static irqreturn_t mlxbf_gige_error_intr(int irq, void *dev_id) ...@@ -17,8 +17,6 @@ static irqreturn_t mlxbf_gige_error_intr(int irq, void *dev_id)
priv = dev_id; priv = dev_id;
priv->error_intr_count++;
int_status = readq(priv->base + MLXBF_GIGE_INT_STATUS); int_status = readq(priv->base + MLXBF_GIGE_INT_STATUS);
if (int_status & MLXBF_GIGE_INT_STATUS_HW_ACCESS_ERROR) if (int_status & MLXBF_GIGE_INT_STATUS_HW_ACCESS_ERROR)
...@@ -75,8 +73,6 @@ static irqreturn_t mlxbf_gige_rx_intr(int irq, void *dev_id) ...@@ -75,8 +73,6 @@ static irqreturn_t mlxbf_gige_rx_intr(int irq, void *dev_id)
priv = dev_id; priv = dev_id;
priv->rx_intr_count++;
/* NOTE: GigE silicon automatically disables "packet rx" interrupt by /* NOTE: GigE silicon automatically disables "packet rx" interrupt by
* setting MLXBF_GIGE_INT_MASK bit0 upon triggering the interrupt * setting MLXBF_GIGE_INT_MASK bit0 upon triggering the interrupt
* to the ARM cores. Software needs to re-enable "packet rx" * to the ARM cores. Software needs to re-enable "packet rx"
...@@ -90,11 +86,6 @@ static irqreturn_t mlxbf_gige_rx_intr(int irq, void *dev_id) ...@@ -90,11 +86,6 @@ static irqreturn_t mlxbf_gige_rx_intr(int irq, void *dev_id)
static irqreturn_t mlxbf_gige_llu_plu_intr(int irq, void *dev_id) static irqreturn_t mlxbf_gige_llu_plu_intr(int irq, void *dev_id)
{ {
struct mlxbf_gige *priv;
priv = dev_id;
priv->llu_plu_intr_count++;
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
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