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.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index e65d6617beea..df863bcc06f8 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -519,6 +519,23 @@ struct efx_phy_operations {
519 unsigned loopbacks; 519 unsigned loopbacks;
520}; 520};
521 521
522/**
523 * @enum efx_phy_mode - PHY operating mode flags
524 * @PHY_MODE_NORMAL: on and should pass traffic
525 * @PHY_MODE_TX_DISABLED: on with TX disabled
526 * @PHY_MODE_SPECIAL: on but will not pass traffic
527 */
528enum efx_phy_mode {
529 PHY_MODE_NORMAL = 0,
530 PHY_MODE_TX_DISABLED = 1,
531 PHY_MODE_SPECIAL = 8,
532};
533
534static inline bool efx_phy_mode_disabled(enum efx_phy_mode mode)
535{
536 return (mode & ~PHY_MODE_TX_DISABLED) != 0;
537}
538
522/* 539/*
523 * Efx extended statistics 540 * Efx extended statistics
524 * 541 *
@@ -661,7 +678,7 @@ union efx_multicast_hash {
661 * @phy_op: PHY interface 678 * @phy_op: PHY interface
662 * @phy_data: PHY private data (including PHY-specific stats) 679 * @phy_data: PHY private data (including PHY-specific stats)
663 * @mii: PHY interface 680 * @mii: PHY interface
664 * @tx_disabled: PHY transmitter turned off 681 * @phy_mode: PHY operating mode
665 * @link_up: Link status 682 * @link_up: Link status
666 * @link_options: Link options (MII/GMII format) 683 * @link_options: Link options (MII/GMII format)
667 * @n_link_state_changes: Number of times the link has changed state 684 * @n_link_state_changes: Number of times the link has changed state
@@ -735,7 +752,7 @@ struct efx_nic {
735 struct efx_phy_operations *phy_op; 752 struct efx_phy_operations *phy_op;
736 void *phy_data; 753 void *phy_data;
737 struct mii_if_info mii; 754 struct mii_if_info mii;
738 bool tx_disabled; 755 enum efx_phy_mode phy_mode;
739 756
740 bool link_up; 757 bool link_up;
741 unsigned int link_options; 758 unsigned int link_options;