Skip to content
/ linux Public

Commit f482644

Browse files
dthompsokuba-moo
authored andcommitted
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: David Thompson <davthompson@nvidia.com> Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com> Link: https://lore.kernel.org/r/20220511135251.2989-1-davthompson@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 9b19e57 commit f482644

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ struct mlxbf_gige {
9090
dma_addr_t rx_cqe_base_dma;
9191
u16 tx_pi;
9292
u16 prev_tx_ci;
93-
u64 error_intr_count;
94-
u64 rx_intr_count;
95-
u64 llu_plu_intr_count;
9693
struct sk_buff *rx_skb[MLXBF_GIGE_MAX_RXQ_SZ];
9794
struct sk_buff *tx_skb[MLXBF_GIGE_MAX_TXQ_SZ];
9895
int error_irq;

drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ static void mlxbf_gige_get_regs(struct net_device *netdev,
2424
regs->version = MLXBF_GIGE_REGS_VERSION;
2525

2626
/* Read entire MMIO register space and store results
27-
* into the provided buffer. Each 64-bit word is converted
28-
* to big-endian to make the output more readable.
29-
*
30-
* NOTE: by design, a read to an offset without an existing
31-
* register will be acknowledged and return zero.
27+
* into the provided buffer. By design, a read to an
28+
* offset without an existing register will be
29+
* acknowledged and return zero.
3230
*/
3331
memcpy_fromio(p, priv->base, MLXBF_GIGE_MMIO_REG_SZ);
3432
}

drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_intr.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ static irqreturn_t mlxbf_gige_error_intr(int irq, void *dev_id)
1717

1818
priv = dev_id;
1919

20-
priv->error_intr_count++;
21-
2220
int_status = readq(priv->base + MLXBF_GIGE_INT_STATUS);
2321

2422
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)
7573

7674
priv = dev_id;
7775

78-
priv->rx_intr_count++;
79-
8076
/* NOTE: GigE silicon automatically disables "packet rx" interrupt by
8177
* setting MLXBF_GIGE_INT_MASK bit0 upon triggering the interrupt
8278
* 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)
9086

9187
static irqreturn_t mlxbf_gige_llu_plu_intr(int irq, void *dev_id)
9288
{
93-
struct mlxbf_gige *priv;
94-
95-
priv = dev_id;
96-
priv->llu_plu_intr_count++;
97-
9889
return IRQ_HANDLED;
9990
}
10091

0 commit comments

Comments
 (0)