diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-04-07 18:50:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-08 18:58:24 -0400 |
commit | e98e3350c03af4187e1d5fe007c7b460e378990c (patch) | |
tree | 5245bf0e0662ab27d1f8b33e629e4b0d118aa189 /drivers/net/netxen/netxen_nic_hw.c | |
parent | 577c9c456f0e1371cbade38eaf91ae8e8a308555 (diff) |
netxen: code cleanup
o remove unused structure defs.
o remove unnecessary includes.
o replace enums with specific #defines.
o reduce footprint of stats structure.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_hw.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 5026811c04ce..67d63eecc9cb 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -48,6 +48,21 @@ | |||
48 | #define CRB_HI(off) ((crb_hub_agt[CRB_BLK(off)] << 20) | ((off) & 0xf0000)) | 48 | #define CRB_HI(off) ((crb_hub_agt[CRB_BLK(off)] << 20) | ((off) & 0xf0000)) |
49 | #define CRB_INDIRECT_2M (0x1e0000UL) | 49 | #define CRB_INDIRECT_2M (0x1e0000UL) |
50 | 50 | ||
51 | #ifndef readq | ||
52 | static inline u64 readq(void __iomem *addr) | ||
53 | { | ||
54 | return readl(addr) | (((u64) readl(addr + 4)) << 32LL); | ||
55 | } | ||
56 | #endif | ||
57 | |||
58 | #ifndef writeq | ||
59 | static inline void writeq(u64 val, void __iomem *addr) | ||
60 | { | ||
61 | writel(((u32) (val)), (addr)); | ||
62 | writel(((u32) (val >> 32)), (addr + 4)); | ||
63 | } | ||
64 | #endif | ||
65 | |||
51 | #define CRB_WIN_LOCK_TIMEOUT 100000000 | 66 | #define CRB_WIN_LOCK_TIMEOUT 100000000 |
52 | static crb_128M_2M_block_map_t crb_128M_2M_map[64] = { | 67 | static crb_128M_2M_block_map_t crb_128M_2M_map[64] = { |
53 | {{{0, 0, 0, 0} } }, /* 0: PCI */ | 68 | {{{0, 0, 0, 0} } }, /* 0: PCI */ |
@@ -2148,7 +2163,7 @@ int netxen_nic_get_board_info(struct netxen_adapter *adapter) | |||
2148 | board_type = NETXEN_BRDTYPE_P3_10G_TP; | 2163 | board_type = NETXEN_BRDTYPE_P3_10G_TP; |
2149 | } | 2164 | } |
2150 | 2165 | ||
2151 | switch ((netxen_brdtype_t)board_type) { | 2166 | switch (board_type) { |
2152 | case NETXEN_BRDTYPE_P2_SB35_4G: | 2167 | case NETXEN_BRDTYPE_P2_SB35_4G: |
2153 | adapter->ahw.port_type = NETXEN_NIC_GBE; | 2168 | adapter->ahw.port_type = NETXEN_NIC_GBE; |
2154 | break; | 2169 | break; |