summaryrefslogtreecommitdiffstats
path: root/drivers/staging/qlge/qlge.h
diff options
context:
space:
mode:
authorBenjamin Poirier <bpoirier@suse.com>2019-09-27 19:11:56 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-04 17:17:44 +0200
commite759b5cf70894a1a4a6a5e60a3bd63b7dc788b01 (patch)
treed05407aa7f8a2f0d28d98f5c5a7680560c99775d /drivers/staging/qlge/qlge.h
parentd7618e38461e6a3f190d88fb941befd51b7c29b0 (diff)
downloadlinux-e759b5cf70894a1a4a6a5e60a3bd63b7dc788b01.tar.bz2
staging: qlge: Remove irq_cnt
qlge uses an irq enable/disable refcounting scheme that is: * poorly implemented Uses a spin_lock to protect accesses to the irq_cnt atomic variable. * buggy Breaks when there is not a 1:1 sequence of irq - napi_poll, such as when using SO_BUSY_POLL. * unnecessary The purpose or irq_cnt is to reduce irq control writes when multiple work items result from one irq: the irq is re-enabled after all work is done. Analysis of the irq handler shows that there is only one case where there might be two workers scheduled at once, and those have separate irq masking bits. Therefore, remove irq_cnt. Additionally, we get a performance improvement: perf stat -e cycles -a -r5 super_netperf 100 -H 192.168.33.1 -t TCP_RR Before: 628560 628056 622103 622744 627202 [...] 268,803,947,669 cycles ( +- 0.09% ) After: 636300 634106 634984 638555 634188 [...] 259,237,291,449 cycles ( +- 0.19% ) Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Link: https://lore.kernel.org/r/20190927101210.23856-3-bpoirier@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/qlge/qlge.h')
-rw-r--r--drivers/staging/qlge/qlge.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/staging/qlge/qlge.h b/drivers/staging/qlge/qlge.h
index ad7c5eb8a3b6..5d9a36deda08 100644
--- a/drivers/staging/qlge/qlge.h
+++ b/drivers/staging/qlge/qlge.h
@@ -1982,11 +1982,6 @@ struct intr_context {
u32 intr_dis_mask; /* value/mask used to disable this intr */
u32 intr_read_mask; /* value/mask used to read this intr */
char name[IFNAMSIZ * 2];
- atomic_t irq_cnt; /* irq_cnt is used in single vector
- * environment. It's incremented for each
- * irq handler that is scheduled. When each
- * handler finishes it decrements irq_cnt and
- * enables interrupts if it's zero. */
irq_handler_t handler;
};
@@ -2074,7 +2069,6 @@ struct ql_adapter {
u32 port; /* Port number this adapter */
spinlock_t adapter_lock;
- spinlock_t hw_lock;
spinlock_t stats_lock;
/* PCI Bus Relative Register Addresses */
@@ -2235,7 +2229,6 @@ void ql_mpi_reset_work(struct work_struct *work);
void ql_mpi_core_to_log(struct work_struct *work);
int ql_wait_reg_rdy(struct ql_adapter *qdev, u32 reg, u32 bit, u32 ebit);
void ql_queue_asic_error(struct ql_adapter *qdev);
-u32 ql_enable_completion_interrupt(struct ql_adapter *qdev, u32 intr);
void ql_set_ethtool_ops(struct net_device *ndev);
int ql_read_xgmac_reg64(struct ql_adapter *qdev, u32 reg, u64 *data);
void ql_mpi_idc_work(struct work_struct *work);