diff options
author | Michael Chan <mchan@broadcom.com> | 2007-12-20 22:56:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:57:35 -0500 |
commit | 35efa7c1f4aa868d4a948a9069f20ccef1b3b28d (patch) | |
tree | 9369da5bfcd93139ce0ac961059d29b57c66626c /drivers/net/bnx2.h | |
parent | 6d866ffc69b0c3e584782f212a3f783708d31e9a (diff) |
[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 <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r-- | drivers/net/bnx2.h | 16 |
1 files changed, 11 insertions, 5 deletions
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 { | |||
6503 | char name[16]; | 6503 | char name[16]; |
6504 | }; | 6504 | }; |
6505 | 6505 | ||
6506 | struct bnx2_napi { | ||
6507 | struct napi_struct napi ____cacheline_aligned; | ||
6508 | struct bnx2 *bp; | ||
6509 | struct status_block *status_blk; | ||
6510 | u32 last_status_idx; | ||
6511 | u32 int_num; | ||
6512 | }; | ||
6513 | |||
6506 | struct bnx2 { | 6514 | struct bnx2 { |
6507 | /* Fields used in the tx and intr/napi performance paths are grouped */ | 6515 | /* Fields used in the tx and intr/napi performance paths are grouped */ |
6508 | /* together in the beginning of the structure. */ | 6516 | /* together in the beginning of the structure. */ |
@@ -6511,13 +6519,8 @@ struct bnx2 { | |||
6511 | struct net_device *dev; | 6519 | struct net_device *dev; |
6512 | struct pci_dev *pdev; | 6520 | struct pci_dev *pdev; |
6513 | 6521 | ||
6514 | struct napi_struct napi; | ||
6515 | |||
6516 | atomic_t intr_sem; | 6522 | atomic_t intr_sem; |
6517 | 6523 | ||
6518 | struct status_block *status_blk; | ||
6519 | u32 last_status_idx; | ||
6520 | |||
6521 | u32 flags; | 6524 | u32 flags; |
6522 | #define PCIX_FLAG 0x00000001 | 6525 | #define PCIX_FLAG 0x00000001 |
6523 | #define PCI_32BIT_FLAG 0x00000002 | 6526 | #define PCI_32BIT_FLAG 0x00000002 |
@@ -6539,6 +6542,8 @@ struct bnx2 { | |||
6539 | u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES))); | 6542 | u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES))); |
6540 | u16 hw_tx_cons; | 6543 | u16 hw_tx_cons; |
6541 | 6544 | ||
6545 | struct bnx2_napi bnx2_napi; | ||
6546 | |||
6542 | #ifdef BCM_VLAN | 6547 | #ifdef BCM_VLAN |
6543 | struct vlan_group *vlgrp; | 6548 | struct vlan_group *vlgrp; |
6544 | #endif | 6549 | #endif |
@@ -6672,6 +6677,7 @@ struct bnx2 { | |||
6672 | 6677 | ||
6673 | u32 stats_ticks; | 6678 | u32 stats_ticks; |
6674 | 6679 | ||
6680 | struct status_block *status_blk; | ||
6675 | dma_addr_t status_blk_mapping; | 6681 | dma_addr_t status_blk_mapping; |
6676 | 6682 | ||
6677 | struct statistics_block *stats_blk; | 6683 | struct statistics_block *stats_blk; |