summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amd/xgbe/xgbe.h
diff options
context:
space:
mode:
authorLendacky, Thomas2017-08-18 16:03:17 +0200
committerDavid S. Miller2017-08-19 01:30:16 +0200
commitcaa575afad73ce1a40848543461667c57a1ad989 (patch)
tree82a71d9a5a881bb70031e77818a5cbaa023fa276 /drivers/net/ethernet/amd/xgbe/xgbe.h
parentamd-xgbe: Add additional dynamic debug messages (diff)
downloadkernel-qcow2-linux-caa575afad73ce1a40848543461667c57a1ad989.tar.gz
kernel-qcow2-linux-caa575afad73ce1a40848543461667c57a1ad989.tar.xz
kernel-qcow2-linux-caa575afad73ce1a40848543461667c57a1ad989.zip
amd-xgbe: Optimize DMA channel interrupt enablement
Currently whenever the driver needs to enable or disable interrupts for a DMA channel it reads the interrupt enable register (IER), updates the value and then writes the new value back to the IER. Since the hardware does not change the IER, software can track this value and elimiate the need to read it each time. Add the IER value to the channel related data structure and use that as the base for enabling and disabling interrupts, thus removing the need for the MMIO read. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe/xgbe.h')
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
index 9a80f20adc1c..58bb455bf1a1 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe.h
+++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
@@ -182,8 +182,6 @@
#define XGBE_IRQ_MODE_EDGE 0
#define XGBE_IRQ_MODE_LEVEL 1
-#define XGBE_DMA_INTERRUPT_MASK 0x31c7
-
#define XGMAC_MIN_PACKET 60
#define XGMAC_STD_PACKET_MTU 1500
#define XGMAC_MAX_STD_PACKET 1518
@@ -462,6 +460,8 @@ struct xgbe_channel {
/* Netdev related settings */
struct napi_struct napi;
+ /* Per channel interrupt enablement tracker */
+ unsigned int curr_ier;
unsigned int saved_ier;
unsigned int tx_timer_active;