提交 b3df68f8 编写于 作者: D Dhananjay Phadke 提交者: David S. Miller

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: NDhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b991d2bc
...@@ -1203,7 +1203,7 @@ typedef struct { ...@@ -1203,7 +1203,7 @@ typedef struct {
#define NETXEN_IS_MSI_FAMILY(adapter) \ #define NETXEN_IS_MSI_FAMILY(adapter) \
((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED)) ((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED))
#define MSIX_ENTRIES_PER_ADAPTER 8 #define MSIX_ENTRIES_PER_ADAPTER 1
#define NETXEN_MSIX_TBL_SPACE 8192 #define NETXEN_MSIX_TBL_SPACE 8192
#define NETXEN_PCI_REG_MSIX_TBL 0x44 #define NETXEN_PCI_REG_MSIX_TBL 0x44
......
...@@ -76,6 +76,7 @@ static void netxen_nic_poll_controller(struct net_device *netdev); ...@@ -76,6 +76,7 @@ static void netxen_nic_poll_controller(struct net_device *netdev);
#endif #endif
static irqreturn_t netxen_intr(int irq, void *data); static irqreturn_t netxen_intr(int irq, void *data);
static irqreturn_t netxen_msi_intr(int irq, void *data); static irqreturn_t netxen_msi_intr(int irq, void *data);
static irqreturn_t netxen_msix_intr(int irq, void *data);
/* PCI Device ID Table */ /* PCI Device ID Table */
#define ENTRY(device) \ #define ENTRY(device) \
...@@ -1084,7 +1085,9 @@ static int netxen_nic_open(struct net_device *netdev) ...@@ -1084,7 +1085,9 @@ static int netxen_nic_open(struct net_device *netdev)
for (ring = 0; ring < adapter->max_rds_rings; ring++) for (ring = 0; ring < adapter->max_rds_rings; ring++)
netxen_post_rx_buffers(adapter, ctx, ring); netxen_post_rx_buffers(adapter, ctx, ring);
} }
if (NETXEN_IS_MSI_FAMILY(adapter)) if (adapter->flags & NETXEN_NIC_MSIX_ENABLED)
handler = netxen_msix_intr;
else if (adapter->flags & NETXEN_NIC_MSI_ENABLED)
handler = netxen_msi_intr; handler = netxen_msi_intr;
else { else {
flags |= IRQF_SHARED; flags |= IRQF_SHARED;
...@@ -1612,6 +1615,14 @@ static irqreturn_t netxen_msi_intr(int irq, void *data) ...@@ -1612,6 +1615,14 @@ static irqreturn_t netxen_msi_intr(int irq, void *data)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static irqreturn_t netxen_msix_intr(int irq, void *data)
{
struct netxen_adapter *adapter = data;
napi_schedule(&adapter->napi);
return IRQ_HANDLED;
}
static int netxen_nic_poll(struct napi_struct *napi, int budget) static int netxen_nic_poll(struct napi_struct *napi, int budget)
{ {
struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi); struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册