From: Dhananjay Phadke Date: Fri, 8 May 2009 22:02:27 +0000 (+0000) Subject: netxen: cache msi register offset X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a2469ce4d8984722d65628969ad6f8b09da136f;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git netxen: cache msi register offset Store msi target status register offset in adapter struct. This avoids contention on msi_tgt_status table from interrupt hadlers of different pci function. Signed-off-by: Dhananjay Phadke Signed-off-by: David S. Miller --- diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 9350c8663fd..ab11c2b3f0f 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h @@ -1257,6 +1257,9 @@ struct netxen_adapter { u32 irq; u32 temp; + u32 msi_tgt_status; + u32 resv4; + struct netxen_adapter_stats stats; struct netxen_recv_context recv_ctx; diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 83dadfd78c3..edb4bcda71e 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -525,6 +525,8 @@ netxen_setup_intr(struct netxen_adapter *adapter) request_msi: if (use_msi && !pci_enable_msi(pdev)) { adapter->flags |= NETXEN_NIC_MSI_ENABLED; + adapter->msi_tgt_status = + msi_tgt_status[adapter->ahw.pci_func]; dev_info(&pdev->dev, "using msi interrupts\n"); } else dev_info(&pdev->dev, "using legacy interrupts\n"); @@ -1701,7 +1703,7 @@ static irqreturn_t netxen_msi_intr(int irq, void *data) /* clear interrupt */ adapter->pci_write_immediate(adapter, - msi_tgt_status[adapter->ahw.pci_func], 0xffffffff); + adapter->msi_tgt_status, 0xffffffff); napi_schedule(&sds_ring->napi); return IRQ_HANDLED;