aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-02-08 22:20:19 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-08 22:20:19 -0500
commitb3df68f8f5a29888ae693fdb84ebabbc28ed9400 (patch)
tree01f37c627ae5a684efaa7b785d34454afa35cb74 /drivers
parentb991d2bc4a6e1821555bdc2a682f9aed24650c98 (diff)
netxen: fix msi-x interrupt handling
o Cut down msi-x vectors from 8 to 1 since only one is used for now. o Use separate handler for msi-x, that doesn't unnecessarily scrub msi status register. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/netxen/netxen_nic.h2
-rw-r--r--drivers/net/netxen/netxen_nic_main.c13
2 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 9c78c963b721..f4dd9acb6877 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -1203,7 +1203,7 @@ typedef struct {
1203#define NETXEN_IS_MSI_FAMILY(adapter) \ 1203#define NETXEN_IS_MSI_FAMILY(adapter) \
1204 ((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED)) 1204 ((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED))
1205 1205
1206#define MSIX_ENTRIES_PER_ADAPTER 8 1206#define MSIX_ENTRIES_PER_ADAPTER 1
1207#define NETXEN_MSIX_TBL_SPACE 8192 1207#define NETXEN_MSIX_TBL_SPACE 8192
1208#define NETXEN_PCI_REG_MSIX_TBL 0x44 1208#define NETXEN_PCI_REG_MSIX_TBL 0x44
1209 1209
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 645d384fe87e..3b17a7936147 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -76,6 +76,7 @@ static void netxen_nic_poll_controller(struct net_device *netdev);
76#endif 76#endif
77static irqreturn_t netxen_intr(int irq, void *data); 77static irqreturn_t netxen_intr(int irq, void *data);
78static irqreturn_t netxen_msi_intr(int irq, void *data); 78static irqreturn_t netxen_msi_intr(int irq, void *data);
79static irqreturn_t netxen_msix_intr(int irq, void *data);
79 80
80/* PCI Device ID Table */ 81/* PCI Device ID Table */
81#define ENTRY(device) \ 82#define ENTRY(device) \
@@ -1084,7 +1085,9 @@ static int netxen_nic_open(struct net_device *netdev)
1084 for (ring = 0; ring < adapter->max_rds_rings; ring++) 1085 for (ring = 0; ring < adapter->max_rds_rings; ring++)
1085 netxen_post_rx_buffers(adapter, ctx, ring); 1086 netxen_post_rx_buffers(adapter, ctx, ring);
1086 } 1087 }
1087 if (NETXEN_IS_MSI_FAMILY(adapter)) 1088 if (adapter->flags & NETXEN_NIC_MSIX_ENABLED)
1089 handler = netxen_msix_intr;
1090 else if (adapter->flags & NETXEN_NIC_MSI_ENABLED)
1088 handler = netxen_msi_intr; 1091 handler = netxen_msi_intr;
1089 else { 1092 else {
1090 flags |= IRQF_SHARED; 1093 flags |= IRQF_SHARED;
@@ -1612,6 +1615,14 @@ static irqreturn_t netxen_msi_intr(int irq, void *data)
1612 return IRQ_HANDLED; 1615 return IRQ_HANDLED;
1613} 1616}
1614 1617
1618static irqreturn_t netxen_msix_intr(int irq, void *data)
1619{
1620 struct netxen_adapter *adapter = data;
1621
1622 napi_schedule(&adapter->napi);
1623 return IRQ_HANDLED;
1624}
1625
1615static int netxen_nic_poll(struct napi_struct *napi, int budget) 1626static int netxen_nic_poll(struct napi_struct *napi, int budget)
1616{ 1627{
1617 struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi); 1628 struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi);