aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r--drivers/net/s2io.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 7309a178b1ac..049060cb6a05 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -84,7 +84,7 @@
84#include "s2io.h" 84#include "s2io.h"
85#include "s2io-regs.h" 85#include "s2io-regs.h"
86 86
87#define DRV_VERSION "2.0.17.1" 87#define DRV_VERSION "2.0.19.1"
88 88
89/* S2io Driver name & version. */ 89/* S2io Driver name & version. */
90static char s2io_driver_name[] = "Neterion"; 90static char s2io_driver_name[] = "Neterion";
@@ -2242,6 +2242,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, int ring_no)
2242 struct buffAdd *ba; 2242 struct buffAdd *ba;
2243 unsigned long flags; 2243 unsigned long flags;
2244 struct RxD_t *first_rxdp = NULL; 2244 struct RxD_t *first_rxdp = NULL;
2245 u64 Buffer0_ptr = 0, Buffer1_ptr = 0;
2245 2246
2246 mac_control = &nic->mac_control; 2247 mac_control = &nic->mac_control;
2247 config = &nic->config; 2248 config = &nic->config;
@@ -2342,7 +2343,14 @@ static int fill_rx_buffers(struct s2io_nic *nic, int ring_no)
2342 * payload 2343 * payload
2343 */ 2344 */
2344 2345
2346 /* save the buffer pointers to avoid frequent dma mapping */
2347 Buffer0_ptr = ((struct RxD3*)rxdp)->Buffer0_ptr;
2348 Buffer1_ptr = ((struct RxD3*)rxdp)->Buffer1_ptr;
2345 memset(rxdp, 0, sizeof(struct RxD3)); 2349 memset(rxdp, 0, sizeof(struct RxD3));
2350 /* restore the buffer pointers for dma sync*/
2351 ((struct RxD3*)rxdp)->Buffer0_ptr = Buffer0_ptr;
2352 ((struct RxD3*)rxdp)->Buffer1_ptr = Buffer1_ptr;
2353
2346 ba = &mac_control->rings[ring_no].ba[block_no][off]; 2354 ba = &mac_control->rings[ring_no].ba[block_no][off];
2347 skb_reserve(skb, BUF0_LEN); 2355 skb_reserve(skb, BUF0_LEN);
2348 tmp = (u64)(unsigned long) skb->data; 2356 tmp = (u64)(unsigned long) skb->data;
@@ -3307,6 +3315,7 @@ static void s2io_reset(struct s2io_nic * sp)
3307 u16 subid, pci_cmd; 3315 u16 subid, pci_cmd;
3308 int i; 3316 int i;
3309 u16 val16; 3317 u16 val16;
3318 unsigned long long reset_cnt = 0;
3310 DBG_PRINT(INIT_DBG,"%s - Resetting XFrame card %s\n", 3319 DBG_PRINT(INIT_DBG,"%s - Resetting XFrame card %s\n",
3311 __FUNCTION__, sp->dev->name); 3320 __FUNCTION__, sp->dev->name);
3312 3321
@@ -3372,6 +3381,11 @@ new_way:
3372 3381
3373 /* Reset device statistics maintained by OS */ 3382 /* Reset device statistics maintained by OS */
3374 memset(&sp->stats, 0, sizeof (struct net_device_stats)); 3383 memset(&sp->stats, 0, sizeof (struct net_device_stats));
3384 /* save reset count */
3385 reset_cnt = sp->mac_control.stats_info->sw_stat.soft_reset_cnt;
3386 memset(sp->mac_control.stats_info, 0, sizeof(struct stat_block));
3387 /* restore reset count */
3388 sp->mac_control.stats_info->sw_stat.soft_reset_cnt = reset_cnt;
3375 3389
3376 /* SXE-002: Configure link and activity LED to turn it off */ 3390 /* SXE-002: Configure link and activity LED to turn it off */
3377 subid = sp->pdev->subsystem_device; 3391 subid = sp->pdev->subsystem_device;
@@ -4279,9 +4293,7 @@ static void s2io_updt_stats(struct s2io_nic *sp)
4279 if (cnt == 5) 4293 if (cnt == 5)
4280 break; /* Updt failed */ 4294 break; /* Updt failed */
4281 } while(1); 4295 } while(1);
4282 } else { 4296 }
4283 memset(sp->mac_control.stats_info, 0, sizeof(struct stat_block));
4284 }
4285} 4297}
4286 4298
4287/** 4299/**