aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index fb8d72527a34..61d09a2fa724 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -544,12 +544,14 @@ static inline enum efx_fc_type efx_fc_resolve(enum efx_fc_type wanted_fc,
544 * struct efx_mac_operations - Efx MAC operations table 544 * struct efx_mac_operations - Efx MAC operations table
545 * @reconfigure: Reconfigure MAC. Serialised by the mac_lock 545 * @reconfigure: Reconfigure MAC. Serialised by the mac_lock
546 * @update_stats: Update statistics 546 * @update_stats: Update statistics
547 * @check_hw: Check hardware. Serialised by the mac_lock 547 * @irq: Hardware MAC event callback. Serialised by the mac_lock
548 * @poll: Poll for hardware state. Serialised by the mac_lock
548 */ 549 */
549struct efx_mac_operations { 550struct efx_mac_operations {
550 void (*reconfigure) (struct efx_nic *efx); 551 void (*reconfigure) (struct efx_nic *efx);
551 void (*update_stats) (struct efx_nic *efx); 552 void (*update_stats) (struct efx_nic *efx);
552 int (*check_hw) (struct efx_nic *efx); 553 void (*irq) (struct efx_nic *efx);
554 void (*poll) (struct efx_nic *efx);
553}; 555};
554 556
555/** 557/**
@@ -559,7 +561,7 @@ struct efx_mac_operations {
559 * @reconfigure: Reconfigure PHY (e.g. for new link parameters) 561 * @reconfigure: Reconfigure PHY (e.g. for new link parameters)
560 * @clear_interrupt: Clear down interrupt 562 * @clear_interrupt: Clear down interrupt
561 * @blink: Blink LEDs 563 * @blink: Blink LEDs
562 * @check_hw: Check hardware 564 * @poll: Poll for hardware state. Serialised by the mac_lock.
563 * @get_settings: Get ethtool settings. Serialised by the mac_lock. 565 * @get_settings: Get ethtool settings. Serialised by the mac_lock.
564 * @set_settings: Set ethtool settings. Serialised by the mac_lock. 566 * @set_settings: Set ethtool settings. Serialised by the mac_lock.
565 * @set_xnp_advertise: Set abilities advertised in Extended Next Page 567 * @set_xnp_advertise: Set abilities advertised in Extended Next Page
@@ -573,7 +575,7 @@ struct efx_phy_operations {
573 void (*fini) (struct efx_nic *efx); 575 void (*fini) (struct efx_nic *efx);
574 void (*reconfigure) (struct efx_nic *efx); 576 void (*reconfigure) (struct efx_nic *efx);
575 void (*clear_interrupt) (struct efx_nic *efx); 577 void (*clear_interrupt) (struct efx_nic *efx);
576 int (*check_hw) (struct efx_nic *efx); 578 void (*poll) (struct efx_nic *efx);
577 int (*test) (struct efx_nic *efx); 579 int (*test) (struct efx_nic *efx);
578 void (*get_settings) (struct efx_nic *efx, 580 void (*get_settings) (struct efx_nic *efx,
579 struct ethtool_cmd *ecmd); 581 struct ethtool_cmd *ecmd);
@@ -728,10 +730,10 @@ union efx_multicast_hash {
728 * @mac_lock: MAC access lock. Protects @port_enabled, @phy_mode, 730 * @mac_lock: MAC access lock. Protects @port_enabled, @phy_mode,
729 * @port_inhibited, efx_monitor() and efx_reconfigure_port() 731 * @port_inhibited, efx_monitor() and efx_reconfigure_port()
730 * @port_enabled: Port enabled indicator. 732 * @port_enabled: Port enabled indicator.
731 * Serialises efx_stop_all(), efx_start_all() and efx_monitor() and 733 * Serialises efx_stop_all(), efx_start_all(), efx_monitor(),
732 * efx_reconfigure_work with kernel interfaces. Safe to read under any 734 * efx_phy_work(), and efx_mac_work() with kernel interfaces. Safe to read
733 * one of the rtnl_lock, mac_lock, or netif_tx_lock, but all three must 735 * under any one of the rtnl_lock, mac_lock, or netif_tx_lock, but all
734 * be held to modify it. 736 * three must be held to modify it.
735 * @port_inhibited: If set, the netif_carrier is always off. Hold the mac_lock 737 * @port_inhibited: If set, the netif_carrier is always off. Hold the mac_lock
736 * @port_initialized: Port initialized? 738 * @port_initialized: Port initialized?
737 * @net_dev: Operating system network device. Consider holding the rtnl lock 739 * @net_dev: Operating system network device. Consider holding the rtnl lock
@@ -762,7 +764,8 @@ union efx_multicast_hash {
762 * @promiscuous: Promiscuous flag. Protected by netif_tx_lock. 764 * @promiscuous: Promiscuous flag. Protected by netif_tx_lock.
763 * @multicast_hash: Multicast hash table 765 * @multicast_hash: Multicast hash table
764 * @wanted_fc: Wanted flow control flags 766 * @wanted_fc: Wanted flow control flags
765 * @reconfigure_work: work item for dealing with PHY events 767 * @phy_work: work item for dealing with PHY events
768 * @mac_work: work item for dealing with MAC events
766 * @loopback_mode: Loopback status 769 * @loopback_mode: Loopback status
767 * @loopback_modes: Supported loopback mode bitmask 770 * @loopback_modes: Supported loopback mode bitmask
768 * @loopback_selftest: Offline self-test private state 771 * @loopback_selftest: Offline self-test private state
@@ -810,6 +813,7 @@ struct efx_nic {
810 struct falcon_nic_data *nic_data; 813 struct falcon_nic_data *nic_data;
811 814
812 struct mutex mac_lock; 815 struct mutex mac_lock;
816 struct work_struct mac_work;
813 bool port_enabled; 817 bool port_enabled;
814 bool port_inhibited; 818 bool port_inhibited;
815 819
@@ -830,6 +834,7 @@ struct efx_nic {
830 834
831 enum phy_type phy_type; 835 enum phy_type phy_type;
832 spinlock_t phy_lock; 836 spinlock_t phy_lock;
837 struct work_struct phy_work;
833 struct efx_phy_operations *phy_op; 838 struct efx_phy_operations *phy_op;
834 void *phy_data; 839 void *phy_data;
835 struct mii_if_info mii; 840 struct mii_if_info mii;
@@ -845,7 +850,6 @@ struct efx_nic {
845 bool promiscuous; 850 bool promiscuous;
846 union efx_multicast_hash multicast_hash; 851 union efx_multicast_hash multicast_hash;
847 enum efx_fc_type wanted_fc; 852 enum efx_fc_type wanted_fc;
848 struct work_struct reconfigure_work;
849 853
850 atomic_t rx_reset; 854 atomic_t rx_reset;
851 enum efx_loopback_mode loopback_mode; 855 enum efx_loopback_mode loopback_mode;