diff options
author | Veena Parat <Veena.Parat@neterion.com> | 2007-07-23 02:37:14 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-30 15:56:04 -0400 |
commit | 491abf2537a01bef52bffc67001f59cce1fd0047 (patch) | |
tree | ca8cff9731bf7808b0a0fb17b17dd78fd297813e /drivers/net/s2io.h | |
parent | eccb8628ab97f5b43e04425e983db1495fc0ef32 (diff) |
S2IO: Checking for the return value of pci map function
- Checking for the return value of pci map function
- Implemented Francois Romieu's comments on eliminating code duplication
using goto
- Implemented Francois Romieu's comments on using a temporary variable for
accessing statistics structure
Signed-off-by: Veena Parat <veena.parat@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/s2io.h')
-rw-r--r-- | drivers/net/s2io.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index aa5428c4368e..92983ee7df8c 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h | |||
@@ -74,6 +74,10 @@ static int debug_level = ERR_DBG; | |||
74 | /* DEBUG message print. */ | 74 | /* DEBUG message print. */ |
75 | #define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args) | 75 | #define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args) |
76 | 76 | ||
77 | #ifndef DMA_ERROR_CODE | ||
78 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) | ||
79 | #endif | ||
80 | |||
77 | /* Protocol assist features of the NIC */ | 81 | /* Protocol assist features of the NIC */ |
78 | #define L3_CKSUM_OK 0xFFFF | 82 | #define L3_CKSUM_OK 0xFFFF |
79 | #define L4_CKSUM_OK 0xFFFF | 83 | #define L4_CKSUM_OK 0xFFFF |
@@ -97,6 +101,7 @@ struct swStat { | |||
97 | unsigned long long num_aggregations; | 101 | unsigned long long num_aggregations; |
98 | /* Other statistics */ | 102 | /* Other statistics */ |
99 | unsigned long long mem_alloc_fail_cnt; | 103 | unsigned long long mem_alloc_fail_cnt; |
104 | unsigned long long pci_map_fail_cnt; | ||
100 | unsigned long long watchdog_timer_cnt; | 105 | unsigned long long watchdog_timer_cnt; |
101 | unsigned long long mem_allocated; | 106 | unsigned long long mem_allocated; |
102 | unsigned long long mem_freed; | 107 | unsigned long long mem_freed; |