From 35efa7c1f4aa868d4a948a9069f20ccef1b3b28d Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Thu, 20 Dec 2007 19:56:37 -0800 Subject: [BNX2]: Introduce new bnx2_napi structure. Introduce a bnx2_napi structure that will hold a napi_struct and other fields to handle NAPI polling for the napi_struct. Various tx and rx indexes and status block pointers will be moved from the main bnx2 structure to this bnx2_napi structure. Most NAPI path functions are modified to be passed this bnx2_napi struct pointer. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/bnx2.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'drivers/net/bnx2.h') diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 1accf0093126..345b6db9a947 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h @@ -6503,6 +6503,14 @@ struct bnx2_irq { char name[16]; }; +struct bnx2_napi { + struct napi_struct napi ____cacheline_aligned; + struct bnx2 *bp; + struct status_block *status_blk; + u32 last_status_idx; + u32 int_num; +}; + struct bnx2 { /* Fields used in the tx and intr/napi performance paths are grouped */ /* together in the beginning of the structure. */ @@ -6511,13 +6519,8 @@ struct bnx2 { struct net_device *dev; struct pci_dev *pdev; - struct napi_struct napi; - atomic_t intr_sem; - struct status_block *status_blk; - u32 last_status_idx; - u32 flags; #define PCIX_FLAG 0x00000001 #define PCI_32BIT_FLAG 0x00000002 @@ -6539,6 +6542,8 @@ struct bnx2 { u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES))); u16 hw_tx_cons; + struct bnx2_napi bnx2_napi; + #ifdef BCM_VLAN struct vlan_group *vlgrp; #endif @@ -6672,6 +6677,7 @@ struct bnx2 { u32 stats_ticks; + struct status_block *status_blk; dma_addr_t status_blk_mapping; struct statistics_block *stats_blk; -- cgit v1.2.3-59-g8ed1b