aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_main.c
diff options
context:
space:
mode:
authorSathya Perla <sathyap@serverengines.com>2009-07-27 18:52:23 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-02 02:06:26 -0400
commiteec368fb3ce3ee9e7bb042bbafb03f297d96e55e (patch)
tree1aa525ff817ea1cbcc6c95bc5beb1d01d38b1e26 /drivers/net/benet/be_main.c
parent8788fdc2a53cf012a43808877eaa6ac7e3c923b4 (diff)
be2net: remove pci_func field from be_adapter struct
pci function is available as PCI_FUNC(pdev->devfn); no need for a separate field. Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r--drivers/net/benet/be_main.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index da5341f10384..9c8654d9c508 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1279,7 +1279,7 @@ static irqreturn_t be_intx(int irq, void *dev)
1279 int isr; 1279 int isr;
1280 1280
1281 isr = ioread32(adapter->csr + CEV_ISR0_OFFSET + 1281 isr = ioread32(adapter->csr + CEV_ISR0_OFFSET +
1282 adapter->pci_func * CEV_ISR_SIZE); 1282 be_pci_func(adapter) * CEV_ISR_SIZE);
1283 if (!isr) 1283 if (!isr)
1284 return IRQ_NONE; 1284 return IRQ_NONE;
1285 1285
@@ -1446,7 +1446,7 @@ static void be_msix_enable(struct be_adapter *adapter)
1446 1446
1447static inline int be_msix_vec_get(struct be_adapter *adapter, u32 eq_id) 1447static inline int be_msix_vec_get(struct be_adapter *adapter, u32 eq_id)
1448{ 1448{
1449 return adapter->msix_entries[eq_id - 8 * adapter->pci_func].vector; 1449 return adapter->msix_entries[eq_id - 8 * be_pci_func(adapter)].vector;
1450} 1450}
1451 1451
1452static int be_msix_register(struct be_adapter *adapter) 1452static int be_msix_register(struct be_adapter *adapter)
@@ -1743,7 +1743,6 @@ static int be_ctrl_init(struct be_adapter *adapter)
1743 struct be_dma_mem *mbox_mem_alloc = &adapter->mbox_mem_alloced; 1743 struct be_dma_mem *mbox_mem_alloc = &adapter->mbox_mem_alloced;
1744 struct be_dma_mem *mbox_mem_align = &adapter->mbox_mem; 1744 struct be_dma_mem *mbox_mem_align = &adapter->mbox_mem;
1745 int status; 1745 int status;
1746 u32 val;
1747 1746
1748 status = be_map_pci_bars(adapter); 1747 status = be_map_pci_bars(adapter);
1749 if (status) 1748 if (status)
@@ -1764,9 +1763,6 @@ static int be_ctrl_init(struct be_adapter *adapter)
1764 spin_lock_init(&adapter->mcc_lock); 1763 spin_lock_init(&adapter->mcc_lock);
1765 spin_lock_init(&adapter->mcc_cq_lock); 1764 spin_lock_init(&adapter->mcc_cq_lock);
1766 1765
1767 val = ioread32(adapter->pcicfg + PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET);
1768 adapter->pci_func = (val >> MEMBAR_CTRL_INT_CTRL_PFUNC_SHIFT) &
1769 MEMBAR_CTRL_INT_CTRL_PFUNC_MASK;
1770 return 0; 1766 return 0;
1771} 1767}
1772 1768