aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 07:48:17 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 09:53:47 -0400
commitf8b87c17017f2ce1890fb9a7f85fb0fbf5643e37 (patch)
tree261a31a95d2fa296ef7abaf6019ff5b7c86bbc63 /drivers/net/sfc/net_driver.h
parent3594e131b23665b728b4c98daaf0b61b1d4aaa7a (diff)
sfc: Make PHY flash mode a device attribute, not a module parameter
This allows updating PHY firmware for one interface without removing all other interfaces handled by the driver. Replace tx_disabled flags and 10Xpress status enumeration with flags in enum efx_phy_mode. Prevent an interface from being brought up while in PHY flash mode. 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.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;