summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/genet/bcmgenet.h
diff options
context:
space:
mode:
authorPetri Gynther <pgynther@google.com>2015-03-25 12:35:16 -0700
committerDavid S. Miller <davem@davemloft.net>2015-03-27 14:26:16 -0700
commit4055eaefb3603a2a55305c81292379922a742131 (patch)
tree1ffcc5ab7dd245e0f828c34b27fad2adcf00ff18 /drivers/net/ethernet/broadcom/genet/bcmgenet.h
parent3ab113399b633bacb500a903d2f96f25ded2226c (diff)
downloadlinux-4055eaefb3603a2a55305c81292379922a742131.tar.gz
linux-4055eaefb3603a2a55305c81292379922a742131.tar.bz2
linux-4055eaefb3603a2a55305c81292379922a742131.zip
net: bcmgenet: add support for multiple Rx queues
Add support for multiple Rx queues: 1. Add NAPI context per Rx queue 2. Modify Rx interrupt and Rx NAPI code to handle multiple Rx queues Signed-off-by: Petri Gynther <pgynther@google.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/genet/bcmgenet.h')
-rw-r--r--drivers/net/ethernet/broadcom/genet/bcmgenet.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.h b/drivers/net/ethernet/broadcom/genet/bcmgenet.h
index 7b11e7a7e153..a834da1dfe4c 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.h
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.h
@@ -310,6 +310,11 @@ struct bcmgenet_mib_counters {
#define UMAC_IRQ_MDIO_DONE (1 << 23)
#define UMAC_IRQ_MDIO_ERROR (1 << 24)
+/* INTRL2 instance 1 definitions */
+#define UMAC_IRQ1_TX_INTR_MASK 0xFFFF
+#define UMAC_IRQ1_RX_INTR_MASK 0xFFFF
+#define UMAC_IRQ1_RX_INTR_SHIFT 16
+
/* Register block offsets */
#define GENET_SYS_OFF 0x0000
#define GENET_GR_BRIDGE_OFF 0x0040
@@ -541,6 +546,7 @@ struct bcmgenet_tx_ring {
};
struct bcmgenet_rx_ring {
+ struct napi_struct napi; /* Rx NAPI struct */
unsigned int index; /* Rx ring index */
struct enet_cb *cbs; /* Rx ring buffer control block */
unsigned int size; /* Rx ring size */
@@ -549,6 +555,9 @@ struct bcmgenet_rx_ring {
unsigned int cb_ptr; /* Rx ring initial CB ptr */
unsigned int end_ptr; /* Rx ring end CB ptr */
unsigned int old_discards;
+ void (*int_enable)(struct bcmgenet_rx_ring *);
+ void (*int_disable)(struct bcmgenet_rx_ring *);
+ struct bcmgenet_priv *priv;
};
/* device context */
@@ -557,9 +566,6 @@ struct bcmgenet_priv {
enum bcmgenet_version version;
struct net_device *dev;
- /* NAPI for descriptor based rx */
- struct napi_struct napi ____cacheline_aligned;
-
/* transmit variables */
void __iomem *tx_bds;
struct enet_cb *tx_cbs;