aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon_boards.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-25 11:11:35 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-26 18:59:36 -0500
commit55edc6e6ff728681ebc10d418222740705376664 (patch)
tree66136e674adde15b9668f13d4e0486482b7f1851 /drivers/net/sfc/falcon_boards.c
parent1dfc5ceacd00365a9089e98643f4b26253d5a6aa (diff)
sfc: Split MAC stats DMA initiation and completion
From: Steve Hodgson <shodgson@solarflare.com> Currently we initiate MAC stats DMA and busy-wait for completion when stats are requested. We can improve on this with a periodic timer to initiate and poll for stats, and opportunistically poll when stats are requested. Since efx_nic::stats_disable_count and efx_stats_{disable,enable}() are Falcon-specific, rename them and move them accordingly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon_boards.c')
-rw-r--r--drivers/net/sfc/falcon_boards.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/sfc/falcon_boards.c b/drivers/net/sfc/falcon_boards.c
index ac1258ea677c..72d1c7834e6b 100644
--- a/drivers/net/sfc/falcon_boards.c
+++ b/drivers/net/sfc/falcon_boards.c
@@ -347,14 +347,14 @@ static ssize_t set_phy_flash_cfg(struct device *dev,
347 * MAC stats accordingly. */ 347 * MAC stats accordingly. */
348 efx->phy_mode = new_mode; 348 efx->phy_mode = new_mode;
349 if (new_mode & PHY_MODE_SPECIAL) 349 if (new_mode & PHY_MODE_SPECIAL)
350 efx_stats_disable(efx); 350 falcon_stop_nic_stats(efx);
351 if (falcon_board(efx)->type->id == FALCON_BOARD_SFE4001) 351 if (falcon_board(efx)->type->id == FALCON_BOARD_SFE4001)
352 err = sfe4001_poweron(efx); 352 err = sfe4001_poweron(efx);
353 else 353 else
354 err = sfn4111t_reset(efx); 354 err = sfn4111t_reset(efx);
355 efx_reconfigure_port(efx); 355 efx_reconfigure_port(efx);
356 if (!(new_mode & PHY_MODE_SPECIAL)) 356 if (!(new_mode & PHY_MODE_SPECIAL))
357 efx_stats_enable(efx); 357 falcon_start_nic_stats(efx);
358 } 358 }
359 rtnl_unlock(); 359 rtnl_unlock();
360 360
@@ -441,7 +441,7 @@ static int sfe4001_init(struct efx_nic *efx)
441 if (efx->phy_mode & PHY_MODE_SPECIAL) { 441 if (efx->phy_mode & PHY_MODE_SPECIAL) {
442 /* PHY won't generate a 156.25 MHz clock and MAC stats fetch 442 /* PHY won't generate a 156.25 MHz clock and MAC stats fetch
443 * will fail. */ 443 * will fail. */
444 efx_stats_disable(efx); 444 falcon_stop_nic_stats(efx);
445 } 445 }
446 rc = sfe4001_poweron(efx); 446 rc = sfe4001_poweron(efx);
447 if (rc) 447 if (rc)
@@ -504,7 +504,7 @@ static void sfn4111t_init_phy(struct efx_nic *efx)
504 return; 504 return;
505 505
506 efx->phy_mode = PHY_MODE_SPECIAL; 506 efx->phy_mode = PHY_MODE_SPECIAL;
507 efx_stats_disable(efx); 507 falcon_stop_nic_stats(efx);
508 } 508 }
509 509
510 sfn4111t_reset(efx); 510 sfn4111t_reset(efx);
@@ -531,7 +531,7 @@ static int sfn4111t_init(struct efx_nic *efx)
531 if (efx->phy_mode & PHY_MODE_SPECIAL) 531 if (efx->phy_mode & PHY_MODE_SPECIAL)
532 /* PHY may not generate a 156.25 MHz clock and MAC 532 /* PHY may not generate a 156.25 MHz clock and MAC
533 * stats fetch will fail. */ 533 * stats fetch will fail. */
534 efx_stats_disable(efx); 534 falcon_stop_nic_stats(efx);
535 535
536 return 0; 536 return 0;
537 537