aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 07:49:02 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 09:53:48 -0400
commit8c8661e4cefdd1ddbfe7d5120f046694555d9e5c (patch)
tree0618e0392140bccadf012381e64a795dfe2e41a4 /drivers/net/sfc/net_driver.h
parenta515089c963b045f65c495cee1d344d8cb75e1d1 (diff)
sfc: Extend self-tests
Include PMA/PMD in loopback self-tests as intended. Add NVRAM checksum validation and include it in self-tests. Add register self-tests. Run PHY self-tests where available. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index df863bcc06f8..531d939b574f 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -515,6 +515,7 @@ struct efx_phy_operations {
515 void (*clear_interrupt) (struct efx_nic *efx); 515 void (*clear_interrupt) (struct efx_nic *efx);
516 int (*check_hw) (struct efx_nic *efx); 516 int (*check_hw) (struct efx_nic *efx);
517 void (*reset_xaui) (struct efx_nic *efx); 517 void (*reset_xaui) (struct efx_nic *efx);
518 int (*test) (struct efx_nic *efx);
518 int mmds; 519 int mmds;
519 unsigned loopbacks; 520 unsigned loopbacks;
520}; 521};
@@ -533,7 +534,7 @@ enum efx_phy_mode {
533 534
534static inline bool efx_phy_mode_disabled(enum efx_phy_mode mode) 535static inline bool efx_phy_mode_disabled(enum efx_phy_mode mode)
535{ 536{
536 return (mode & ~PHY_MODE_TX_DISABLED) != 0; 537 return !!(mode & ~PHY_MODE_TX_DISABLED);
537} 538}
538 539
539/* 540/*
@@ -655,13 +656,14 @@ union efx_multicast_hash {
655 * This field will be %NULL if no EEPROM device is present. 656 * This field will be %NULL if no EEPROM device is present.
656 * @n_rx_nodesc_drop_cnt: RX no descriptor drop count 657 * @n_rx_nodesc_drop_cnt: RX no descriptor drop count
657 * @nic_data: Hardware dependant state 658 * @nic_data: Hardware dependant state
658 * @mac_lock: MAC access lock. Protects @port_enabled, efx_monitor() and 659 * @mac_lock: MAC access lock. Protects @port_enabled, @phy_mode,
659 * efx_reconfigure_port() 660 * @port_inhibited, efx_monitor() and efx_reconfigure_port()
660 * @port_enabled: Port enabled indicator. 661 * @port_enabled: Port enabled indicator.
661 * Serialises efx_stop_all(), efx_start_all() and efx_monitor() and 662 * Serialises efx_stop_all(), efx_start_all() and efx_monitor() and
662 * efx_reconfigure_work with kernel interfaces. Safe to read under any 663 * efx_reconfigure_work with kernel interfaces. Safe to read under any
663 * one of the rtnl_lock, mac_lock, or netif_tx_lock, but all three must 664 * one of the rtnl_lock, mac_lock, or netif_tx_lock, but all three must
664 * be held to modify it. 665 * be held to modify it.
666 * @port_inhibited: If set, the netif_carrier is always off. Hold the mac_lock
665 * @port_initialized: Port initialized? 667 * @port_initialized: Port initialized?
666 * @net_dev: Operating system network device. Consider holding the rtnl lock 668 * @net_dev: Operating system network device. Consider holding the rtnl lock
667 * @rx_checksum_enabled: RX checksumming enabled 669 * @rx_checksum_enabled: RX checksumming enabled
@@ -671,14 +673,16 @@ union efx_multicast_hash {
671 * can provide. Generic code converts these into a standard 673 * can provide. Generic code converts these into a standard
672 * &struct net_device_stats. 674 * &struct net_device_stats.
673 * @stats_buffer: DMA buffer for statistics 675 * @stats_buffer: DMA buffer for statistics
674 * @stats_lock: Statistics update lock 676 * @stats_lock: Statistics update lock. Serialises statistics fetches
677 * @stats_enabled: Temporarily disable statistics fetches.
678 * Serialised by @stats_lock
675 * @mac_address: Permanent MAC address 679 * @mac_address: Permanent MAC address
676 * @phy_type: PHY type 680 * @phy_type: PHY type
677 * @phy_lock: PHY access lock 681 * @phy_lock: PHY access lock
678 * @phy_op: PHY interface 682 * @phy_op: PHY interface
679 * @phy_data: PHY private data (including PHY-specific stats) 683 * @phy_data: PHY private data (including PHY-specific stats)
680 * @mii: PHY interface 684 * @mii: PHY interface
681 * @phy_mode: PHY operating mode 685 * @phy_mode: PHY operating mode. Serialised by @mac_lock.
682 * @link_up: Link status 686 * @link_up: Link status
683 * @link_options: Link options (MII/GMII format) 687 * @link_options: Link options (MII/GMII format)
684 * @n_link_state_changes: Number of times the link has changed state 688 * @n_link_state_changes: Number of times the link has changed state
@@ -733,6 +737,7 @@ struct efx_nic {
733 737
734 struct mutex mac_lock; 738 struct mutex mac_lock;
735 bool port_enabled; 739 bool port_enabled;
740 bool port_inhibited;
736 741
737 bool port_initialized; 742 bool port_initialized;
738 struct net_device *net_dev; 743 struct net_device *net_dev;
@@ -744,6 +749,7 @@ struct efx_nic {
744 struct efx_mac_stats mac_stats; 749 struct efx_mac_stats mac_stats;
745 struct efx_buffer stats_buffer; 750 struct efx_buffer stats_buffer;
746 spinlock_t stats_lock; 751 spinlock_t stats_lock;
752 bool stats_enabled;
747 753
748 unsigned char mac_address[ETH_ALEN]; 754 unsigned char mac_address[ETH_ALEN];
749 755